This is a list of tasks for beginners that should take few evening to complete.

Looking for the same type of page - but for ports? Look at WantedPorts

What about other ideas? Look at IdeasPage

Also see GoogleCodeIn/2012Tasks

General kernel work hints

How to submit patches

Mail technical contact and inline the patch (don't attach, have it as a part of the mail). It may be your e-mail client or something along the way will mess with the patch, so consider providing an url as a backup. The patch should be against head and in unified format (diff -u, git diff, svn diff etc.).

Kernel projects

Avoid taking sysctl lock where possible

Technical Contact: mjg@

Difficulty

Hard

Description

Currently the kernel takes sysctl lock, looks up the sysctl handler and increments a reference counter to pin prevent destruction of found node. Then the lock is dropped, handler executed, locked picked up again and reference counter decremented.

Reference counter modification is avoided for static (i.e. unloadable) sysctls, but the lock is still taken.

While the lock is necessary for lookup part, it can be avoided later.

For static sysctls it is plain unnecessary.

For dynamic ones, it will be needed only if reference counter would transition to 0.

Modify sysctl_root_handler_locked - replace the current atomic_fetchadd_int call with a different scheme which will only lock if the counter would transition to 0 (see uifree in kern/kern_resource.c for an idea how to do that).

Give callers a way to indicate whether they want the lock to be held on return.

Requirements

Free old file descriptor tables

Technical Contact: mjg@

Difficulty

Easy

Description

File descriptor tables can be shared between multiple processes (see fdshare).

The kernel performs lockless file descriptor lookup, but file descriptor table can be reallocated by fdgrowtable at any time. To deal with this problem old tables are kept around until all processes possibly using them exit.

However, we can safely free the old table if given process has only one thread and the table is not shared.

Implement freeing such tables and submit a test program showing that it works.

Requirements

Rework functions allocating credentials

Technical Contact: mjg@

Difficulty

Easy

Description

Credentials are copy-on-write, i.e. once assigned to a process are never modified. Allocation of new credentials involved allocating one buffer for struct ucred and second one for groups. Then, if old creds have more groups than the default, we have to reallocate group buffer. crget and the like can be extended to accept old credentials as an argument and derive expected number of groups from that.

Groups in credentials are always stored sorted. But the function used to store groups always sorts them. even though we can tell they have to be sorted already.

Rework the code to be more efficient and not do unnecessary work.

Requirements

Intel Bay Trail SoC support (for Minnowboard Max)

Technical Contact: emaste@

Difficulty

Easy

Description

The Intel Bay Trail SoC (as found on Minnowboard Max, for example) includes UARTs that are mostly 16550-compatible, but have some extra capabilities and need some additional configuration.

Information on accessing the UART is in the SIO - High Speed UART chapter of the Bay Trail datasheet. The Linux change that added Bay Trail support can be used as a reference. This issue is also tracked in PR 194952.

Requirements

Various kernel man pages needed

Technical Contact: jmg@

Difficulty

Easy

Description

Add missing man pages for parts of the FreeBSD kernel. Currently known missing:

Requirements

User space projects

Tidy up some ELF toolchain loose ends

Technical Contact: emaste@

Difficulty

Medium

Description

We've migrated to using the ELF toolchain version of tools like size, strip, nm, etc. Some of the ELF toolchain tools are derivatives of tools that first appeared in the FreeBSD tree, and others are new. There are a few remaining tasks in the ELF toolchain project.

Requirements

Build projects

Reduce Duplication in sys/*/include files

Technical Contact: imp@

Difficulty

Easy, but tedious

Description

There's much duplication between the different sys/*/include files in the system. Some of this duplication is unavoidable since the machine are just a little bit different. However, there's two areas where it is avoidable. First, all machines that FreeBSD currently runs on support either no floating point at all, or IEEE floating point (or sometimes IEEE with one or two additions). It would be nice to collapse the identical copies of the IEEE float stuff down to one copy. Second, there's a number of constants / design decisions that are identical across all ILP32 implementations and across all LP64 implementations that are currently just copied between the directories. It would be nice to clean these up.

One possible design would be to create a sys/abi directory in the kernel sources. Install this as /usr/include/abi. Have this directory have files named <abi>-<thing>.h to replace the machine/_thing.h files we have now. Here, abi is kinda fuzzy, and would be strings like ieee-fp or lp64 or ilp32. And "thing" would be stuff like _inttypes and the like. the machine/_thing.h file would then turn into a #include <api/lp64-_thing.h> or #include <api/ilp32-thing.h> (or both on some architectures depending on pre-processor predefines).

Requirements

o Knowledge of C, especially integer promotion o Knowledge of build system

Past projects

Validate coredump format string

Technical Contact: mjg@ Valid patch received.

Difficulty

Easy

Description

The pattern can be set with the kern.corefile sysctl. No validation is performed.

However, errors are detected during traversal.

Modify the code so that it validates the pattern prior to accepting it.

Convert mountlist_mtx to rwlock

Technical Contact: mjg@ Valid patch received.

Difficulty

Easy

Description

Self-explanatory.

Rename it to mountlist_lock.

Note that mountlist is rarely modified and even shared locking with rwlocks introduces overhead. Interested person can upgrade this task to non-junior by coming up with a solution exploiting rare need to modify the list. Example approaches include designing a locking primitive with cheap shared locking (think: per-cpu) at the expense of exclusive locking.

Requirements

Fix corefilename race

Technical Contact: mjg@

Committed as r280312.

Difficulty

Easy

Description

The kernel keeps core file pattern in corefilename array. It can be modified at any time, including when it is being accessed to generate core names.

Fix the problem.

sysctl reporting current working directory

Technical Contact: mjg@

Committed as r274167.

Difficulty

Medium

Description

Right now current working directory of a differnent process can be obtained with kern.proc.filedesc sysctl. But it also returns the list of open file descriptors which adds a lot of overhead if the list is long (e.g. 10k entries). One frequent user of this sysctl is tmux which wants current working directory of various processes, but has to obtain the whole list.

Add a sysctl which returns only current working directory or all special entries (see procstat -f output for the list), but no files.

Provide an example patch for tmux utilizing this new functionality.

Requirements

Embedd group table into struct ucred

Technical Contact: mjg@

Committed as r274122.

Difficulty

Easy

Description

Each instance of strut ucred has a pointer to a table with groups. Current size of struct ucred is 160 bytes, while it occupies space in 256-byte slab (i.e. we waste almost 100 bytes). On the other hand default group limit is 16 which gives 64 byte allocated from 64-byte slab.

Extend struct ucred with gid_t table of XU_NGROUPS elements and use it unless a bigger size is requested, in which case allocate memory just like current code does.

Temporary buffer in setgroups

Technical Contact: mjg@

Committed as r273684.

Difficulty

Easy

Description

Currently setgroups always allocates a temporary buffer. But most callers will provide small number of groups and for such cases a buffer on the stack will work just fine. Provide a temporary buffer capable of holding XU_NGROUPS groups and update the code to use it when appropriate. See sys_poll implementation in kern/sys_generic.c for an example of this approach.

A harder solution would be to pass it down to kern_getgroups which allocates memory anyway and copyin directly to new cred buffer.

Requirements

Replace loginclass mutex with rwlock

Technical Contact: mjg@

Committed as r273763.

Difficulty

Medium

Description

kern/kern_loginclass.c uses a mutex, even though rwlocks seem to be more suitable. While here update loginclass_find to lookup first and only allocated when needed, but beware of typical races. See uifind in kern/kern_resource.c for an idea how it should look like.

Requirements

JuniorJobs (last edited 2015-05-08 03:42:17 by MateuszGuzik)