Shuah Khan

Shuah Khan

About Shuah Khan

Shuah Khan is a Senior Linux Kernel Developer at Samsung's Open Source Group. She is a Linux Kernel Maintainer and Contributor who focuses on Linux Media Core and Power Management. She maintains Kernel Selftest framework. She has contributed to IOMMU, and DMA areas. In addition, she is helping with stable release kernel testing. She authored Linux Kernel Testing and Debugging paper published on the Linux Journal and writes Linux Journal kernel news articles. She has presented at several Linux conferences and Linux Kernel Developer Keynote Panels. She served on the Linux Foundation Technical Advisory Board. Prior to joining Samsung, she worked as a kernel and software developer at HP and Lucent.

  • Projects

    Linux Kernel
  • Role

    Senior Linux Kernel Developer

Posts by Shuah Khan

  • I recently installed Ubuntu 15.10 on Odroid-XU4 and set out to run the upstream kernel on it. After several trials and errors and being forced to reference various forums, I now have Odroid running the Linux 4.6 Kernel. In this article, I will share how to quickly get from unboxing to running the latest kernel with a short detour to upgrade to the Ubuntu 16.04 release. Without further ado, let’s get started. First of all, download the Ubuntu 15.10 image. You can find the release notes and self installing image here: Release notes for Ubuntu 15.10 (v1.0) ubuntu-15.10-mate-odroid-xu3-20160114.img.xz Prepare the microSD Card Once you’ve downloaded the image from the 2nd link above, follow the following steps to create a bootable microSD card with the image; I used a 32 GB Samsung microSD card. Insert the microSD card in its SD card adapter case in the SD card slot on your host PC or […]

    Read More
  • March 11, 2016 - Shuah Khan

    The Linux Kernel Has Bugs! Really!

    A Guide to Finding and Fixing Linux Kernel Bugs “Our new Constitution is now established, and has an appearance that promises permanency; but in this world nothing can be said to be certain, except death and taxes.” said Benjamin Franklin, in a letter to Jean-Baptiste Leroy, 1789. If he were to be around today, he might have added software bugs to the list of unavoidable things. Software and bugs go together, and the Linux Kernel is no exception. Some bugs are easy to find, but some are harder to reproduce and could require several attempts to piece together the right set of conditions to trigger them. While bugs that result in a system crash or hang are easier spot, it is often more challenging to gather the information necessary to debug and fix them. In many cases, Kernel logs can provide insight into these bugs, but when a system crashes or freezes Kernel logs might not get the chance to […]

    Read More
  • The Next Generation Media Controller added several new interfaces to add and remove media graph objects. I started running tests with KASan enabled to detect dynamic memory errors introduced in this work, and I ended up finding some out-of-bounds address access and use-after-free bugs. This article will introduce you to KASan and provide some examples of how it can be valuable. What is KASan? Kernel Address sanitizer (KASan) is a dynamic memory error detector. It provides a fast and comprehensive solution for finding use-after-free and out-of-bounds bugs. KASan uses compile-time instrumentation to allocate shadow memory to keep track of out-of-bounds and use-after-free bugs. Each memory allocation gets the same area allocated in the shadow memory and accesses to allocated areas results in corresponding shadow memory accesses which then KASan flags when out-of-bounds access or use-after-free accesses occur. How to Use KASan The dependencies are: gcc 4.9.2 or later gcc 5.2 or later is required […]

    Read More
  • Media devices have hardware resources that are shared across several functions. However, media drivers have no knowledge of which resources are shared. At the root of this problem is a lack of a common locking mechanism that can provide access control. I have been working on solving the sharing problem for a year or so. At the Media Summit in San Jose back in March of this year, we reviewed my Media Token API patch series. It solved the problem with minimal changes to drivers, however, it introduced a new framework, in addition to the existing ones. Every new framework adds maintenance cost. This led to a discussion that identified the existing Media Controller API as a better alternative in the interest of avoiding adding a new framework. Since then, I’ve worked on implementing the solution using the Media Controller API, and I’ve ported it over to Media Controller Next Gen API. In this article, […]

    Read More
  • Last week, I was elected to the Linux Foundation Technical Advisory Board (TAB) during the Linux Kernel Summit in Seoul, South Korea. If anybody told me a couple of years ago, you are going to be elected to the TAB, I would have said “Are you kidding me?” Amazing things do happen! What Do We Do? The Linux Foundation Technical Advisory Board is responsible for advising the Linux Foundation board of directors on technical, social, and political issues regarding Linux and Open Source. The TAB consists of 10 voting members elected by a vote amongst all invitees of the Linux Kernel Summit for a 2 year term. The TAB members are elected by the Linux Kernel Community to represent the views of Linux developers and to foster constructive communication between the Linux Foundation leadership and the Linux developer community. The TAB also acts in the background to identify and resolve […]

    Read More
  • Entering any technical field is very challenging and requires a high amount of commitment, passion and grit to be successful. Yet, the work is highly rewarding and fulfilling, which makes the payoff completely worth the effort. In this article, I will share my journey into the highly technical software engineering/open source field as a woman, explaining how I stayed focused and motivated to find my way into vital software projects and endeavors.  My hope is that my story can inspire others who may be unsure whether they should take on this challenge to go for it! My Choice to Launch an Engineering Career Every career has a beginning, and mine started with the conscious decision to become an engineer when I was young. I loved math, physics and chemistry, and I tended to gravitate toward analytical and logical pursuits. There were some doubters and detractors, including my grandfather who said […]

    Read More
  • May 20, 2015 - Shuah Khan

    How Can IOMMU Event Tracing Help You?

    Input/Output Memory Management Unit (IOMMU) event tracing can be extremely beneficial when debugging IOMMU hardware, BIOS, and firmware problems. In addition, IOMMU event tracing can be used to debug  Linux kernel IOMMU driver, device assignment, and performance problems related to device assignment in virtualized and non-virtualized environments. If you aren’t familiar with IOMMU Event Tracing, the first article in this series covered the fundamental concepts behind it, in addition to how tracing can be used to track information about devices as they are moved between guest and host environments. This article will focus on how to use IOMMU event tracing effectively, and will provide a few examples of IOMMU event tracing in action. How to Enable IOMMU Event Tracing at Boot-Time IOMMU trace events can be enabled using the Kernel boot option trace_event. The following enables all IOMMU trace events at boot-time:

    The following enables map and unmap events at […]

    Read More
  • April 29, 2015 - Shuah Khan

    What Is IOMMU Event Tracing?

    The IOMMU event tracing feature enables reporting IOMMU events in the Linux Kernel as they happen during boot-time and run-time. IOMMU event tracing provides insight into IOMMU device topology in the Linux Kernel. This information helps understand which IOMMU group a device belongs to, as well as run-time device assignment changes as devices are moved from hosts to guests and back by the Kernel. The Linux Kernel moves devices from host to guest when users requests such a change. In addition, IOMMU event tracing helps debug BIOS and firmware problems related to IOMMU hardware and firmware implementation, IOMMU drivers, and device assignment. For example, tracing occurs when a device is detached from the host and assigned to a virtual machine, or the device gets moved from the host domain to the VM domain and allows debugging to occur for each of these processes. The primary purpose of IOMMU event tracing is to […]

    Read More