Novell Home

Patching the SUSE Kernel- FAQ

Novell Cool Solutions: Feature
By Susanne Oberhauser

Rate This Page

Reader Rating  stars  from 2 ratings

Digg This - Slashdot This

Posted: 2 Jun 2004
 

Q: I need some special patches in the SUSE kernel to make my closed source kernel module to work. Is there a way to do this?

A: The short answer is: No.

Rationale: After many long and hard discussions within the Linux community concerning closed source kernel modules, the kernel maintainers added interfaces to the kernel to address the needs of closed source kernel module developers. It is the official policy of the kernel maintainers not to accept any kernel modules that use any other interfaces than these. In the past, SUSE accidentally undermined this policy by patching the SUSE kernel. SUSE was publicly criticized for doing so and has since complied by using the new kernel interfaces. We expect the same from our partners.

The longer answer is: If you really need to patch the kernel you can do it by:

  1. Creating kernel hooks that are of general use (enabling coopetition) and submitting them back to the kernel maintainers to be included in the official kernel. SUSE can help you back port the hooks to previous SUSE kernel versions if feasible, and if they are 'good kernel patches' (see below).

  2. Make your kernel modules Open Source. We can then add the hooks alongside the kernel modules provided the hooks are 'good kernel patches' (see below).

Q: Our kernel patch is Open Source. Nevertheless it has been rejected by SUSE because it was 'not a good kernel patch'. What is a good kernel patch?

A: A good kernel patch is:

1. A patch that has been accepted up-stream in the same major kernel version (if it is rejected it may be that the feature is too specialized or too new to make it into an official kernel release).

This Acceptance implies that:

- The patch passes the review of the respective kernel area maintainer.

- The patch passes the review of the respective kernel area maintainer.

- The patch complies to the kernel source conventions (see ?/usr/src/linux/Documentation/CodingStyle?).

- The patch applies to a relatively large user base and it has proven reliable in the field.

- The patch does not taint the official kernel policies of the open source community.

- The patch does not break the layering of kernel components but uses the existing infrastructure meant for that purpose.

- The patch does not duplicate existing functionality even in slightly different ways.

Rationale: Upstream patches have thoroughly been reviewed and tested in the field for interaction with the rest of the kernel by the open source community.
2. A patch that is non-intrusive (which means the changes are localized and obvious in what it is doing with the kernel); the more kernel files a patch touches, the more intrusive it is.

Rationale: Intrusiveness makes it difficult to maintain the rest of the kernel.
3. A patch hat has been tested and runs with the current SUSE kernel, not only with an upstream kernel version.

4. A patch that, if it does introduce new functionality and the code is non-trivial, SUSE can provide backend (level 3) support for this code in case our customers run into subsequent problems.

5. A patch that has been tested on all architectures to which it is applicable. This implies the code is portable (64bit aware, clean alignment and endian-clean), and that any assembly sections are included for all applicable architectures.

Rationale: SUSE currently supports seven architectures (i386, s390, ppc, x86-64, s390x, ia64, ppc64) with a single code base.
6. The patch compiles without warnings (if using gcc, the option -Wall).
Rationale:SUSE currently supports seven architectures (i386, s390, ppc, x86-64, s390x, ia64, ppc64) with a single code base and toolchain.

Q: What is the latest date I can send SUSE a ?good kernel patch? for inclusion in an upcoming SUSE Linux release?

A: After feature freeze, which is after the early betas. The actual dates for a given release can be obtained contacting the Novell partnering organization.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.