User Tools

Site Tools


lkmp:lkmp_required_contributions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lkmp:lkmp_required_contributions [2019/04/04 22:08]
ShuahKhanLF
lkmp:lkmp_required_contributions [2021/01/20 17:55] (current)
ShuahKhanLF
Line 1: Line 1:
 ====== Linux Kernel Mentorship Program Required Contributions ====== ====== Linux Kernel Mentorship Program Required Contributions ======
  
-The required contributions are designed to enhance the mentorship experience by participating in the kernel release process.+The required contributions are designed to enhance the mentorship experience by participating in the kernel release process. ​Please note that quality of patches is what will add value, not the quantity. If one candidate has 10 white-space patches, and another has fewer more substantial patches, substantial work carries more weight.  
 + 
 +**Updates in progress for Spring program - Applications open on Oct 28th 2019. Wait for this page to be updated and stay tuned for announcements on the IRC channel.**
  
 ==== Participate in Stable release process ==== ==== Participate in Stable release process ====
  
-Participating in the [[https://​www.kernel.org/​category/​releases.html|kernel release process]] will help understand ​the kernel release process ​and how fixes flow from the mainline kernel into stable releases. ​**Boot test at least 2 or 3 stable releases during the 6 week application process.**+Participating in the [[https://​www.kernel.org/​category/​releases.html|kernel release process]] will help understand ​how it works and how fixes flow from the mainline kernel into stable releases.
  
   * Subscribe to [[http://​vger.kernel.org/​vger-lists.html#​stable|Stable release mailing list]]   * Subscribe to [[http://​vger.kernel.org/​vger-lists.html#​stable|Stable release mailing list]]
-  * An example email for [[https://lkml.org/lkml/2019/4/1/1212|5.0.6-stable review]]+  * [[lkmp:​lkmp_stable_release|Assist stable release maintainer(s)]] 
 +  * **Boot test at least 3 stable releases during the 6 week application process and report results.** 
 + 
 +====  Debugging ​ ==== 
 + 
 +What do you do when kernel doesn'​t boot or kernel is crashing or driver isn't working the way it should? It is time to debug the kernel. This is intended to be a self study on learning to [[https://www.kernel.org/doc/html/latest/admin-guide/bug-hunting.html|hunt bugs]], [[https://​www.kernel.org/​doc/​html/​latest/​admin-guide/​bug-bisect.html|bisecting a bug]], learn about debug configuration options in the kernel config file, and how to use [[https://​www.kernel.org/​doc/​html/​latest/​admin-guide/​dynamic-debug-howto.html|Dynamic debugging]]. Another great resource for looking at the history of changes made to source files is [[https://​cregit.linuxsources.org/​|Contributors to the Linux Kernel]]. Please refer to [[http://​www.gonehiking.org/​ShuahLinuxBlogs/​blog/​2018/​10/​18/​who-made-that-change-and-when-using-cregit-for-debugging/​|Who Made That Change and When: Using Cregit for Debugging]].
  
-Start by cloning the stable kernel git, building and installing the latest stable kernelYou can find information on the latest stable ​and mainline releases at [[https://www.kernel.org|The Linux Kernel Archive]].+Find 2 to 3 [[https://​syzkaller.appspot.com/​syzbot|Syzbot]] null pointer deference ​and WARN bug reports which include reproducer to analyze. As an example this report ​[[https://syzkaller.appspot.com/​bug?​id=163388d1fb80146cd3ba22a11a5a1995c3eaaafe|[upstream] WARNING in dma_buf_vunmap]] includes reproducers
  
-<​code>​ +  * Run the reproducer to see if you can reproduce ​the problem
-# Clone the git repo specified and in the email. A new directory linux-5.0.y +  * Look at the crash report and walk through ​sources ​for a possible cause
-# gets created which contains ​the kernel ​sources. +  * Write-up a short report ​for each of the bugs you analyzed and share them with [[skhan@linuxfoundation.org| Shuah Khan]] and linux-kernel-mentees mailing list.
-git clone git://​git.kernel.org/​pub/​scm/​linux/​kernel/​git/​stable/​linux-stable-rc.git linux-5.0.y +
-cd linux-5.0.y +
-# Starting out with the distribution configuration file is the safest approach +
-for the very first kernel install on any systemYou can do so by copying the +
-# configuration for your current kernel from /boot. +
-cp /​boot/<​currentconfig>​ .config +
-# Once this step is complete, it is time to compile the kernel. +
-make -j2 all +
-# Check for errors if any +
-echo $? +
-# Install the new kernel ​and run update-grub to add the new kernel to +
-# the grub menuNow it is time to reboot the system to boot the newly +
-# installed kernel. +
-su -c "make modules_install install"​ +
-</​code>​+
  
-Altenrnately,​ you can download and apply the patch. The following is my workflow for getting repo ready, apply the patch, compile, and install. I apply patches and use the same repo to be able to detect regressions. I save dmesg for the current rc to compare with the next rc. Please feel free to make changes to suit your needs.+====  Documentation tasks (Optional) ====
  
-<​code>​ +Convert two .txt files to ReST formatYou will find the tasks listed in [[lkmp:lkmp_task_list|Linux Kernel Task List]]
-git clone git://git.kernel.org/​pub/​scm/​linux/​kernel/​git/​stable/​linux-stable.git +
-cd linux-stable +
-git checkout linux-5.0.y +
-# Copy current config +
-cp /​boot/<​currentconfig>​ .config +
-wget https://​www.kernel.org/​pub/​linux/​kernel/​v5.x/​stable-review/​patch-5.0.6-rc1.gz +
-git reset --hard +
-make clean +
-git pull +
-gunzip patch-5.0.6-rc1.gz +
-git apply --index patch-5.0.6-rc1 +
-echo "Patch applied"​ +
-head Makefile +
-make -j2 all +
-echo $? +
-su -c "make modules_install install"​ +
-</​code>​+
  
-Now it is time to reboot the system to boot the newly installed kernel. Before we do that, let's save logs from the current kernel to compare and look for regressions and new errors, if any.+==== Kernel Tasks (Optional) ====
  
-<​code>​ +Pick two kernel tasks from the [[lkmp:​lkmp_task_list|Linux Kernel Task List]] and send patches to fix the issues.
-dmesg -t > dmesg_current +
-dmesg -t -k > dmesg_kernel +
-dmesg -t -l emerg > dmesg_current_emerg +
-dmesg -t -l alert > dmesg_current_alert +
-dmesg -t -l crit > dmesg_current_alert +
-dmesg -t -l err > dmesg_current_err +
-dmesg -t -l warn > dmesg_current_warn +
-</​code>​+
  
-In general, dmesg should be clean with no emerg, alert, crit, and err level messages. If you see any of these, it might indicate some hardware and/or kernel problem.+====  Staging tree coding style cleanups (Learning task practice patch process) ====
  
-A couple more important steps before trying out the newly installed kernel. There is no guarantee that the new kernel ​will bootAs safe guard, please ensure that there is at least one good kernel installedChange the default grub configuration ​file /​etc/​default/​grub to:+The staging tree is a good place to start to learn the kernel ​development process and getting your patches into the mainlinePick staging area driver and run checkpatch.pl on a file. Fix coding style problems if any.
  
-Enable printing early boot messages to vga using earlyprink=vga kernel boot option +====  Static code analysis error fixing ​ (Learning task practice patch process) ====
-Increase the GRUB_TIMEOUT value to 30 seconds, so grub pauses in menu allowing time to choose kernel to boot from grub menu, and comment out GRUB_TIMEOUT_STYLE=hidden+
  
-<code+Static ​code analysis is the process of detecting errors and flaws in the source ​code. The Linux kernel Makefile can be invoked with options ​to enable to run the [[https://​www.kernel.org/​doc/​html/​latest/​dev-tools/​sparse.html|Sparse source code checker]] on all source file or only the re-compiled files. Compile kernel with source code checker enabled and find errors and fix as needed.
-GRUB_CMDLINE_LINUX="​earlyprink=vga"​ +
-#​GRUB_TIMEOUT_STYLE=hidden +
-GRUB_TIMEOUT=30 +
-</code+
-Run update-grub ​to update ​the grub configuration in /boot+
  
-<​code>​ 
-sudo update-grub 
-</​code>​ 
  
-Now restart the system. Once the new kernel comes up, compare the saved dmesg from the old kernel with the new one and see if there are any regressions. If the newly installed kernel fails to boot, you will have to boot a good kernel and then investigate why the new kernel failed to boot. 
  
-Run [[https://​www.kernel.org/​doc/​Documentation/​dev-tools/​kselftest.rst|Kernel Selftests]] and check results. 
  
-<​code>​ 
-make kselftest 
-</​code>​ 
  
-====  Debugging and tracing ==== 
  
-====  Staging tree coding style cleanups ==== 
lkmp/lkmp_required_contributions.1554415694.txt.gz · Last modified: 2019/04/04 22:08 by ShuahKhanLF