LTC bulletin: May 21, 2001

News in brief from IBM's Linux Technology Center

Maya Stodte (mstodte@us.ibm.com)
Contributing editor, developerWorks

May 2001

Our biweekly news in brief from the Linux Technology Center -- where all the Linux-related technologies happening inside IBM are tracked -- includes several new version releases, a new project (GKHI), a port to FreeBSD, suggestions for big changes to the kernel by the Linux/390 team, and a patch by Maneesh Soni from the LTC in India that was picked up by the news media. You'll find quick summaries here, along with links to the Linux Technology Center for greater detail.

Generalised Kernel Hooks Interface
GKHI has released version 1.1. Changes in version 1.1 include conditional return hooks, named hooks, dynamically initialized hooks, and hooks defined in both kernel modules and the kernel.

The GKHI generalized mechanism manages exits in kernel space; it is suitable for use in first failure data capture applications, security hooks, and optional serviceability tools. Richard Moore, the project leader, offers a bit more detail on how GKHI works: "GKHI allows the kernel or kernel modules to provide exit-points or hooks at very little overhead when not in use."

Why the need for hooks? "The kernel, in particular, cannot code calls to external modules in the normal way. This is because it is loaded before anything else. If such a normal call were coded, the target address could not be resolved at load time. So the hooking mechanism allows call-outs from the kernel to be defined but to be hidden until a later time when the target is present."

Where is this useful? "It's used in cases where additional and optional function needs to be brought in dynamically. There are many examples of this type of function: security packages, performance monitors, serviceability packages, diagnostics, debugging packages, file system filters, etc. If any of these can't be supported by a hooking mechanism, they have to be present permanently whether or not they are permanently needed. For Linux this has a particularly nasty side effect: kernel modifications are supplied as source patches. Co-existence of multiple modifications at various maintenance levels becomes a major manual task. Providing a hooking mechanism to externalize most of this additional function simplifies the task of co-existence quite considerably. There are also issues of performance and size if a kernel is built to include a vast number of optional facilities.

"The same issue applies to device drives and kernel modules that want to provide interfaces for additional optional functions. We designed the inactive hook to be simply a jump over a jump. When the hook becomes active, the first jump is nullified and the second jump diverts execution to a hook-dispatching routine."

GKHI is licensed under the GNU General Public License version 2 or later.

Next Generation POSIX Threading
The NGPT has released its first beta version. It should be now be completely POSIX compliant, except where noted in the release notes. The NGPT derives from the GNU Pth package. It aims to solve problems associated with the pthreads library on Linux.

"There are many threading problems related to signal handling on Linux," says Bill Abt, senior software engineer on the NGPT project. "In POSIX, signals are delivered to the process and the process then delivers it to a thread in the process that does not block it. But LinuxThreads delivers it to the specified thread even if it blocks it. LinuxThreads also has problems with setuid(). If a thread changes a setuid() to root access, POSIX says all the threads in the process should also have root access. But this doesn't happen. Only the thread doing the setuid() call gets root access. And then there are problems with certain flags not being supported. And because LinuxThreads are process-based, it scales miserably."

The beta version of NGPT achieves virtually all the project goals, now providing complete POSIX compliant threading to the Linux community. It is buildable on the x86 and S/390 platforms; support for additional platforms such as PowerPC and IA64 are expected before the 1.0 release.

Linux Standards Base
The Linux Standards Base specification 0.8.1 is available for review. The LSB is a family of specifications defining a binary system interface for compiled applications in order to insure a uniform industry-standard environment. The specification consists of a generic LSB and an architecture-specific LSB. The Linux Standard Base (LSB) works to advance these standards among Linux distributions so that all Linux software can run on compliant systems. The LSB is also involved in development efforts and recruits vendors to the Linux platform.

JFS
Beta 3 of JFS for Linux has been released. The Journaled File System technology for Linux provides a log-based, byte-level file system designed for servers and e-business applications.

Changes to JFS in the beta 3 release, according to the changelog, focus on fixes to the file system. "The rest of the utilities have been changed to use standard types. Both the file system and the utilities have been changed to use endian macros, so that JFS will now store the meta-data as little endian when running on all architectures. This change requires reformatting all of the JFS partitions using the new mkfs.jfs included in this drop, if you are running on a big-endian system."

Internationalization patches for GNU bash and GNU awk
Internationalization patches were updated for GNU bash and GNU awk. The patch for bash is against bash-2.05 for readline and bash itself. "Both changes are to support multi-byte character sets and locale-sensitive behavior," according to Steve Fox of the LTC.

OpenAFS
Version 1.0.4 of OpenAFS has been released. AFS is a distributed enterprise file system with a data management model that was open sourced by IBM's Transarc lab last September. It offers a client-server architecture for file sharing in which files stored in AFS are accessed through user installations.

New in AFS version 1.0.4, according to Steve Fox, are, "new binary releases including Darwin and Windows NT, fixes to the cache manager for Linux, ubik changes to fix problems from clone server support integration, fileserver change to correctly deal with a client changing IP addresses, and miscellaneous bug fixes."

In addition to a gzipped tarfile of source, binary distributions are available for AIX 4.3.3, Darwin, Digital Unix 4.0A, Irix 6.5, Solaris 7 and Solaris 8 in gzipped tar format, MacOS X in a tar file, Debian Potato i386 in dpkg format, Redhat 6.2, 7.0, and 7.1 i386 in RPM format, and Windows NT in ZIP file format (installer included).

Enterprise Volume Management System
Version 0.3 of EVMS has been released. EVMS does logical volume management with plug-in model architecture in order to maximize extensibility and flexibility.

"We look at EVMS as being the next step in the evolution of Volume Managers," says John Stiles of the LTC. "Volume Management in most systems has been used to provide a more flexible approach to managing disk storage devices. With the proliferation of new storage devices such as SANs, the requirements to manage storage are quickly exceeding the ability of monolithic Volume Managers to change to accommodate them. Our team is creating a Volume Manager that can be changed via plug-in modules to add functionality or even emulate other Volume Managers."

"Version 0.3 of EVMS," according to Steve Fox, "features read capability of LVM snapshot volumes and some new IOCTLs."

ACP modem
MWave, the ACP modem driver version 20010206 has been ported to FreeBSD, although it is still licensed under the GPL. "Each operating system kernel is different," according to Steve Fox, "and therefore modifications almost always need to be made to make a device driver run on an additional operating system. MWave can not be included in the FreeBSD project proper because of licensing differences between the GPL (which the MWave driver is licensed under) and the BSD license (which FreeBSD uses). FreeBSD users will have to compile the driver themselves."

Linux/390
The Linux/390 team has proposed a patch to remove "jiffies" from the kernel, which would change Linux's timekeeping technique. The jiffies counter, a variable in the clock interrupt handler, measures the uptime of the system and does other time-related kernel tasks.

PowerPC and iSeries
Updated iSeries Linux kernel patches are available. They are to be applied against the 2.4.3 kernel source trees from the Linux kernel archives. The iSeries project also has new notes for the F80, for which SuSE 7.0 can be used, unsupported.

The IBM e-server iSeries is a set of enterprise servers designed for e-business solutions. Although Linux distributions for the iSeries are yet to be made available, you can run Linux on the iSeries unsupported. Note that this requires the next version of OS/400, which is still in beta testing.

Updated Linux Kernel patches for the iSeries, according to Steve Fox, features additional support for running Linux in a logical partition on the iSeries.

New installation notes are for installing Linux on the pSeries F80 model hardware, according to Steve Fox. The F80 is a 64-bit machine still running on the 32-bit kernel, although this is due to change soon.

In other news from the PowerPC Linux team, there has been an SMP fix patch for PowerPC. Previously, when the MSR_FP bit in the regs.msr was on, do_fork (via copy_thread) called giveup_fpu. giveup_fpu got a pointer to the (current's) last register savearea via current->thread.regs, and using that pointer it turned off the MSR_FP, MSR_FE0 and MSR_FE1 bits. This pointer is now pointing to some arbitrary point within the stack.

In the news
Linux Weekly News picked up Maneesh Soni's Scalable FD Management patch. The patch is for the file descriptor management for the SMP linux kernel and uses the read-copy-update mechanism published on SourceForge by the Linux Scalability Effort.

Maneesh has been working with the IBM Software Lab, India since December 1997 and was part of the team that provided worldwide support for OS/2. He has experience with the operating system kernel and file system components for OS/2 and now Linux. Currently he is part of the Linux Scalability Effort and is working on new Locking Primitives for Linux.

Upcoming events
Richard Moore will give a presentation on GKHI (Generalised Kernel Hooks Interface) and its potential uses at the UKUUG Linux Developers Conference 2001, which takes place June 29 - July 1 in Manchester, England.

Read about papers being presented at the USENIX Annual Technical Conference in Boston June 25 - 30 and the Ottowa Linux Symposium July 25 - 28 in the first installment of this column.

Resources

About the author
Maya Stodte is a contributing writer and editor for developerWorks. She can be reached at mstodte@us.ibm.com.

Copyright 2001