User Tools

Site Tools


lkmp:lkmp_project_list

This is an old revision of the document!


Linux Kernel Mentorship Program Project List

Mentees, please pick 1 or 2 projects and inform Shuah Khan. Please don't send email to mentors until introductions are made. Please include Shuah Khan on all your patch contributions.

Mentors, please send project summary to Shuah Khan. If you would like to get help with syzbot bugs/issues in your area, please create a project around it. The goal is teaching bug analysis techniques and fix problems as needed.

Please refer to Linux Kernel Mentorship Summer and Fall 2019 Project List for previous projects.

Develop Methods for Tracking Tool Analysis Findings over Time

We use a number of tools, checkpatch.pl, coccinelle scripts, sparse, etc. and these tools report certain findings. While the valid ones are addressed by the kernel developers, the invalid tool findings are manually assessed and not acted upon. Over time with addressing the valid findings, the proportion of invalid findings increase compared to newly appearing valid findings, as invalid findings of those tools are not marked and tracked over the various versions.

In this project, the mentee should work out methods and tools to track the tool findings and make these tools useful in the Linux kernel community.

Required Knowledge:

  • Required: Very good knowledge of C, skill to READ AND UNDERSTAND source code in the Linux kernel in independent work
  • Required: Very good knowledge of python
  • Required: Good understanding of git
  • Recommended: Some understanding of static analysis tools
  • Recommended: Some understanding of coccinelle

Mentor(s): Lukas Bulwahn, Nicholas Mc Guire

Number of candidates applying for this project: 0

Patch Trace Analysis with PaStA

The PaStA tool, developed by Ralf Ramsauer, relates patch emails sent on the mailing lists to commits in the git repository. This allows to analyse the development process on the mailing list, measure some interesting metrics on the development, and identify outliers with respect to some central properties.

The issue tracker, https://github.com/lfd/PaStA/issues, provides a good overview of possible mentee activities in this project related to PaStA. A mentee start look into those issues and determine a suitable selection of tasks and goals from that issue tracker that can be handled within the timeframe of the Linux Kernel Mentorship project. A project proposal should breakdown the goals stated in the issue tracker to a more detailed plan of activities, needed extensions of PaStA and the implementation tasks.

Mentor: Ralf Ramsauer

Number of candidates applying for this project: 1

Linux dev-tools - Handling Complex Types and Attributes in Coccinelle

Coccinelle, developed by Julia Lawall and her group, is a program matching and transformation engine which provides the language SmPL (Semantic Patch Language) for specifying desired matches and transformations in C code. The project proposal would be to improve the management of complex types and attributes (const, __user, etc) in the program matching and transformation tool Coccinelle. Currently, complex types are represented incorrectly, which makes it impossible to match against them in a general way. Various kinds of attributes are increasingly used in Linux kernel code, and it is important to be able to check these annotations and add them where they are missing. This project is relevant to Linux, Zephyr and many more applications.

Mentor: Julia Lawall

Number of candidates applying for this project: 1

RCU Hardening

This project has 3 parts as listed below, and all parts are part of the same project. All parts will be completed by the intern during the project.

1. RCU Hardening - list_for_each_entry_rcu() hardening

A recent work has added basic support for RCU pointer-checking to list_for_each_entry_rcu() to avoid corruption of a list when the list is accessed without holding the rcu_read_lock(). rcu_dereference() has done this kind of pointer-checking all along. With support for list_for_each_entry_rcu() to do the same in upstream, drivers can now be converted to the API modifications for list_for_each_entry_rcu(). Once all drivers have been converted to use the new API, CONFIG_PROVE_RCU_LIST can be enabled by default without false-positives. Please refer to Harden list_for_each_entry_rcu() and family for details on the conversion that has been completed so far.

2. RCU Hardening: RCU Sparse checking - convert RCU pointers to __rcu notation

Sparse has shown many incorrect RCU pointer usage issues in the Linux kernel but it works only when RCU pointers are marked with __rcu. It is quite important to do this marking, because with such marking, the RCU API does additional sparse checking. Many pointers in the Linux kernel have been converted to use __rcu annotations, but there are several more that need to be converted. Conversions in scheduler are complete and can be used a a reference. The goal for this project is converting core kernel subsystems at first and then attempt to convert drivers.

3. Sparse checking - Improve RCU Sparse checking

Sparse is a static analysis tool that has shown incorrect RCU usage issues. For example, if an RCU pointer is incorrectly dereferenced or assigned to something. However, the sparse tool is really noisy and shows false positives. This work item is to conduct a study of the usage of sparse tool on kernel code, specifically for RCU and to see if we can improve sparse or the code it is analyzing, make sparse less noisy for RCU (by removing false-positives) and prioritize the errors it is showing.

Mentor: Joel Fernandes

Number of candidates applying for this project: 3

Add PR_SET_VMA support to Linux Kernel (not available - deferred for later session)

PR_SET_VMA mechanism is used heavily in Android for naming memory regions. It is passed to the prctl(2) system call along with the range of addresses to be named. The name appears in /proc/pid/maps and can be used to identify memory regions for debugging and accounting purposes. The patch has been carried in the Android tree for several years. The patch needs to be adapted to mainline, improved and finally upstreamed. This project will give the mentee a good understanding of virtual memory area structures in the Linux kernel as the name for the memory region is stored in these structures and there are various cases where a memory map needs to be split or merged depending on its name compared to its immediate neighbors.

Mentor: Joel Fernandes

Number of candidates applying for this project: 2

Linux kernel trace events in pstore

Pstore is a subsystem in the Linux kernel that is used to store kernel logs which can retrieved after a machine warm-reboots.

Currently, during ftrace tracing, ftrace events in the kernel are lost when a machine hard-locks up. There is a need for writing these events into the pstore so that after a lock up, the trace events that led to the crash can be retrieved from the Pstore after a warm reboot. This has to be done in a scalable way so that tracing a live system does not impact performance of the system – ftrace is extremely fast. Initial patches posted to write and retrieve events to/from pstore are not scalable due to locking and other issues. Introducing a scalable approach will open up more possibilities for crash analysis. Prototypes from Qualcomm (Sai Prakash) are available as a reference. These prototypes are not merge ready and suffer from scalablity issues but could be used as a starting point. Sai Prakash is presenting work done on the initial set of patches at Linaro Connect: https://linaroconnectsandiego.sched.com/event/Sue7/event-tracing-and-pstore-with-a-pinch-of-dynamic-debug but further work or re-design of the approach is needed.

Mentor: Joel Fernandes

Number of candidates applying for this project: 2

Linux Media - Virtual DVB test driver

Write a virtual DVB test front-end driver for ATSC, DVB C/S/S2 and ISDB-T. The goal for this Spring 2020 session is adding one front-end driver.

Mentor: Mauro Chehab

Number of candidates applying for this project: 1

Linux Media - Convert Videobuf v1 to Videobus v2 (9 projects)

Convert A requirement is that the developer has to have access to devices with use VB1 - either directly or we need to coordinate with someone with has the hardware for testing purposes. There are ~9 drivers that could be converted. Each driver is an independent project and will require 9 mentees.

Mentor: Mauro Chehab

Number of candidates applying for this project: 0

Documentation - Convert (or add) kAPI/uAPI kerneldoc comments

Convert (or add) kAPI/uAPI kerneldoc comments, replacing or complementing existing .rst files

Mentor: Mauro Chehab

Number of candidates applying for this project: 1

Documentation - Update obsolete .rst files

Update obsolete documentation files.

Mentor: Mauro Chehab

Number of candidates applying for this project: 0

Compile cross platforms drivers when COMPILE_TEST set

There are some drivers in Linux which get compiled on a limited set of platforms. Sometimes compilation of a driver is needed for compilation test coverage. In Linux we can check other platforms driver compilation by using COMPILE_TEST. This kind of driver may not load or work on the system but we can check its compilation. On x86 platform there are lot of other platform drivers which are not getting compiled by default. We can make those drivers compile using COMPILE_TEST.

Mentor: Sandhya Bankar

Number of candidates applying for this project: 0

PCI: Clean up NUMA interfaces

The pcibus_to_node() and cpumask_of_pcibus() definitions in include/asm-generic/topology.h are special cases just for PCI, and we should be able to use generic device NUMA information instead.

Most arches implement cpumask_of_pcibus(), but it's only called a few times. I think we could use cpumask_of_node(dev_to_node(&pdev→dev)) instead and remove cpumask_of_pcibus().

Removing cpumask_of_pcibus() would remove many of the uses of pcibus_to_node(). We can probably replace the remaining uses with dev_to_node() and then remove pcibus_to_node().

Mentor: Bjorn Helgaas

Number of candidates applying for this project: 0

PCI: Align ''pcie_capability_read_word()'' error returns with other config read accessors

The pci_read_config_word() and similar interfaces set *val = ~0 when they fail, either because pci_dev_is_disconnected() or because a PCIe hardware error is usually converted to ~0 data by the PCI host bridge.

But pcie_capability_read_word() sets *val = 0 when pci_read_config_word() fails, so callers have to check for failure differently than for pci_read_config_word(). These should be aligned so all the config readers set *val = ~0 to indicate “possible PCI error response”.

This will require changes to some callers of pci_read_config_word() that assume the read returns 0 on error.

Mentor: Bjorn Helgaas

Number of candidates applying for this project: 0

PCI: Audit ''pci_get_device()'' and ''for_each_pci_dev()'' uses for reference count issues

pci_get_device() takes a reference on the pci_dev it returns. The caller is responsible for releasing the reference, either explicitly with pci_dev_put() or by passing the pci_dev into another call of pci_get_device().

Sample problems in pasemi_dma_init():

  • If we find iob_pdev but not dma_pdev, we leak the iob_pdev reference
  • Repeated pci_get_device(…, 0xa006) expression (more typical is a while loop as in alphabook1_init_pci())
  • Pointless pci_dev_put(pdev) when pdev is NULL after exiting the for() loops

and pas_setup_mce_regs():

  • if we exit the loop because reg >= MAX_MCE_REGS, we leak the last reference

Mentor: Bjorn Helgaas

Number of candidates applying for this project: 0

PCI: Remove legacy power management

The current generic power management framework using struct dev_pm_ops was introduced over ten years ago. The previous “legacy” framework uses .suspend() and .resume() methods in the struct pci_driver. We should convert all drivers from the legacy framework to the generic framework and remove the legacy code from the PCI core. Examples of doing this include:

The drivers can be converted one-by-one and the PCI core code removed when it is no longer used.

Mentor: Bjorn Helgaas

Number of candidates applying for this project: 0

PCI: Clean up HEST parsing

__aer_firmware_first and __aer_firmware_first_valid are awkward. Maybe the HEST parsing could be done in pci_acpi_setup() or somewhere similar, __aer_firmware_first could be renamed and moved under the #ifdef CONFIG_PCIEAER, and __aer_firmware_first_valid removed completely.

Mentor: Bjorn Helgaas

Number of candidates applying for this project: 0

Add support for Latency Tolerance Reporting _DSM

Latency Tolerance Reporting is used to help manage ASPM (Active State Power Management). Some of the LTR values are platform-dependent and must be learned from platform firmware. Linux currently does not ask firmware for this information. I don't know exactly how this information needs to be incorporated into the ASPM support, but I think it's something we should figure out. See the PCI Firmware Spec, r3.2, sec 4.6.6.

Mentor: Bjorn Helgaas

Number of candidates applying for this project: 0

lkmp/lkmp_project_list.1576281194.txt.gz · Last modified: 2019/12/13 23:53 by BjornHelgaas