LWN.net Logo

LWN.net Weekly Edition for December 10, 2009

A look at Qt 4.6

December 9, 2009

This article was contributed by Nathan Willis

Nokia updated its Qt application framework to version 4.6 on December 1st, adding support for several operating systems — most notably its own mobile platforms: the recently open source Symbian and the Linux-based Maemo. Qt 4.6 introduces new graphics features, new input methods, and updates to the QtScript scripting engine. Along with the framework itself, Nokia updated its cross-platform Qt integrated development environment (IDE) Qt Creator to support the new features and new target platforms.

Qt everywhere

Previous releases of Qt have supported Linux, similar X11-based Unix clones, Mac OS X, and Windows desktop operating systems, plus embedded Linux systems and the Windows smartphone platforms (Windows CE and Windows Mobile). Qt 4.6 updates the proprietary platform support to the latest offerings from Apple and Microsoft: Mac OS X 10.6 and Windows 7.

More interesting to open source users is the official addition of three mobile platforms to the line-up: Symbian S60, Maemo 5 "Fremantle," and the still-in-development Maemo 6 "Harmattan." S60 was Nokia's platform of choice for high-end smartphones for years, but its recent moves indicate it is positioning Symbian as a lower-end phone operating system and cultivating Maemo for high-end devices. "Preview" Qt releases for both S60 and Maemo 5 have been periodically released over the past year, but the platforms' official support in 4.6 is new.

Given that the first Maemo 5 device (Nokia's N900) only started shipping in November, support for Maemo 6 may sound premature. The early release is in line with Nokia's past Maemo development behavior, however. The core Nokia-developed applications in Maemo 6 will be rewritten in Qt instead of GTK+ and Hildon, and Qt will be designated the officially supported toolkit for application development. Nokia has long tried to get development tools into the hands of the open source community as early as possible to accelerate Maemo application development, and the Maemo 6 shift in toolkits is undoubtedly a disruption the company wants to minimize.

Inside the release

The headlining new features in 4.6 are the Qt Animation Framework and State Machine Framework. The two APIs work together; more generally the state machine framework allows application developers to construct their code around state graphs, in which the system reacts to stimuli such as user input by changing between pre-defined states — hopefully leading to better dynamic user interfaces. As the documentation points out, writing a state-based application is not required, and simple applications may not see the benefit. But using the state machine does open up some other useful APIs, including animation.

The animation framework allows developers to animate transitions between states, rather than defining animations as timeline-based behavior triggered by events. The animation framework automatically interpolates between the "start" and "stop" states of the animated object, and handles pausing, synchronizing multiple animations, and other details.

Two new input methods debut in 4.6, gesture input and multi-touch. Multi-touch builds on the existing touch-sensitive interface of the QTouchEvent class. Qt now handles multiple QTouchEvents simultaneously, and can send different events to different widgets, or to the same widget. The framework maintains backward-compatibility with older code by translating QTouchEvents into QMouseEvents for multi-touch unaware applications. Gestures are built on top of multi-touch, as gestures may involve multiple touch points. The QGestureEvent class provides gesture descriptions and handling.

The QGraphicsEffect class allows Qt to perform basic visual effects on arbitrary elements, including blurring, drop-shadowing, colorization, and changing opacity. There are also new classes in 4.6 to handle audio, and a Qt3D API to simplify writing 3-D applications.

Nokia highlights several changes as "performance optimizations." Some, like a new renderer for the QGraphicsView class, are enhancements to existing features. Others, such as the QContiguousCache class (which enables more efficient memory caching by keeping larger chunks of cached data in contiguous locations) and hardware-acceleration for 2-D vector graphics via the OpenVG API, qualify as new features in their own right.

Several key pieces of code for web integration made their way into 4.6. QtScript, the framework's JavaScript/ECMAScript scripting engine, has a new backend in 4.6 based on WebKit's JavaScriptCore, which is reportedly considerably faster. The QWebElement class provides an API to access and manipulate the document object model (DOM) of both web pages and XML documents.

Qt Creator and ... world domination?

[Qt Creator]

The Qt Creator IDE was bumped to version 1.3 when Qt 4.6 was released and supports the new features of the toolkit. The official changelog details a long list of improvements, most of which fall under the category of regular enhancements to a still-growing IDE: improved syntax highlighting and semantic parsing, better searching, better code refactoring, and so on.

It is telling, however, that here again Nokia's press releases lead off with the fact that Qt Creator now supports Symbian as a target platform. Nokia's corporate interest is in building Qt into a cross-platform toolkit and SDK that can run on every platform available. Linux users may occasionally lose sight of that fact because of the framework's prominence in desktop projects like KDE (which will be migrating to 4.6 in version 4.4.0). But in the broader technology market, the sheer number of Symbian-powered phones (half of all smartphones, on the order of hundreds of millions) dwarfs the desktop Linux market easily.

Symbian is now open source, of course, following its 2008 acquisition by Nokia. Maemo may be the company's ace in the hole for future smartphone products, but Qt is the tool it will use to keep the programmers developing for those millions of smartphones from migrating to other platforms as Maemo matures.

Fortunately for open source users, Nokia seems to be working well with the community. In addition to its code contributions, Nokia has also opened up the Qt development process itself, accepting around 160 code contributions from outside the company, and making the source code repository and official bug tracker publicly accessible. Qt 4.6 adds some exciting new features, including multi-touch gestures and an easy-to-use animation API. But the open development process that brought it to market is just as welcome.

Comments (11 posted)

SELinux and PostgreSQL: a worthwhile union?

By Jonathan Corbet
December 4, 2009
When your editor was in Tokyo recently, he had the privilege to talk with KaiGai Kohei at some length about the SE-PgSQL patch set. This work, developed by KaiGai for the last two years or so, integrates SELinux with the PostgreSQL database manager, enabling fine-grained control over access to data stored within a database. The SE-PgSQL patch has struggled to get into the PostgreSQL mainline; it is now preparing for what may well be its last push to be merged. Whether it's successful may, in the end, depend on whether it receives support from potential users.

SELinux works by attaching labels to objects and roles to actors, then enforcing rules describing what sort of access to objects with specific labels is allowed to specific roles. It is a highly flexible system, but also highly complex; even a minimal SELinux policy can involve thousands of rules. The complexity of SELinux has almost certainly inhibited its adoption in the broader Linux community; when SELinux gets in the way of real work, figuring out how to fix it can be a nontrivial task. Over the years, many administrators have concluded, like Ted Ts'o, that "life is too short for SELinux."

That said, Fedora and Red Hat have slowly made progress in using SELinux to confine parts of the system without creating too much user pain. And there is certainly a place for more comprehensive security models in general. But once one starts protecting data at the filesystem level, it makes sense to ask whether data which is accessed through higher-level mechanisms - a relational database manager, say - should also be subject to the system's security policies. In an ideal world, the same security policy would be operative at all levels.

That is the idea behind SE-PgSQL. With this patch, a database administrator can assign labels to databases, schemas, rows, and columns, then write access control rules for them. These are SELinux rules, which are evaluated by SELinux and enforced by PostgreSQL. So access to objects within the database can be governed by the same policy as access to objects elsewhere in the system. On the surface, it is an elegant concept. It is also a concept that NEC (KaiGai's employer) sees as an important component of its future offerings based around cloud computing. For this reason, NEC has funded this work for the last couple of years.

The world is full of free software projects which are starved for developers and which would be overjoyed to accept a feature contribution at this level. The PostgreSQL hackers are somewhat more finicky, though. As is the case with a number of longstanding, successful projects, PostgreSQL developers understand that they will be maintaining any code they accept for many years, and that they cannot afford to accept code which might compromise the project's reputation for stability. So they have been balking at merging SE-PgSQL.

There would appear to be two specific objections getting in the way of this patch: (1) it's big, complicated, and hard to understand, and (2) it's not clear that the benefit of merging this functionality will be worth the costs.

To address the first qualm, KaiGai has worked to minimize the patch to the greatest extent possible, stripping out much of the functionality in the process. Among other things, the latest version of the code does not support row-level labeling. He has also written some extensive documentation which should be required reading for anybody wanting to understand how this patch should work. The end result is a patch which still weighs in at 13,000 lines - but the bulk of it is documentation and regression tests.

PostgreSQL hacker Bruce Momjian was pleased with the reduced patch, saying that is "exactly what I was hoping to see." He also noted, though:

So, one big problem is that no one has agreed to review it, partly or probably because few developers understand the SE-Linux API, and many people who have used SE-Linux have been confused by it.

He expressed willingness to do the review, but requested help from developers who understand SELinux better. KaiGai has offered to try to round up such a developer, so, with luck, this particular obstacle can be overcome.

That leaves the cost/benefit question. The strongest critic of this patch is almost certainly Tom Lane, who said:

Even if we were to accept the SEPostgres patches lock stock and barrel tomorrow, I don't foresee that it will ever get to the point of being useful except to an extremely small group of users who are driven by extreme need. Nobody else is going to have the motivation needed to develop custom security policies, and there simply isn't any chance of anyone developing any generally useful default policy.

On the other hand, Josh Berkus noted that he has seen interest in the feature:

PostgreSQL is the most security-conscious of the OSS databases, and is widely used by certain groups (security software, military, credit card processing) precisely because of this reputation. These folks, while unlikely to speak up on -hackers, are interested in new/further security features; when I was at the Pentagon 2 years ago several people there from HS were quite interested in SE-Postgres specifically. Further, I've been mentioning SE-Postgres in my "DB security talk" for the last 18 months and I *always* get a question about it.

This unwillingness to speak up on the part of potential users could well doom this patch. The code probably cannot be minimized much further without becoming pointless, and even a contributor as persistent and patient as KaiGai can only get discouraged eventually. It would not be surprising if this PostgreSQL development cycle were the last go-round for SE-PgSQL if it is not accepted.

Part of participating in a free software community is contributing code. But another important part is providing feedback to the developers. Otherwise, they are unlikely to know which development directions make sense for many of their users, and they might just turn down patches which their users would rather see incorporated. Companies are often reluctant to talk about their security needs and plans. But, for potential SE-PgSQL users, that kind of silence at this time could be counterproductive. If nobody shows up to express a need for SELinux integration into PostgreSQL, the developers might conclude that there is no interest in this feature and act accordingly.

Comments (22 posted)

The 2009 Linux and free software timeline - Q2

Here is LWN's twelfth annual timeline of significant events in the Linux and free software world for the year.

2009 offered few surprises to those that have been following Linux and free software for as long as we have. As expected, there were new releases of many of the tools and underlying infrastructure that we use on a daily basis. There were also lawsuits over software patents, arguments over licensing, and various security flaws found and fixed. Distributions were packaged up and released, more phones and other devices with Linux and free software were sold, and so forth. All part of the march to "world domination". We look forward to 2010—and beyond.

This year we will be breaking things up into quarters, and this is our report on April-June 2009. Over the next few weeks, we will be putting out timelines of the other two quarters of the year.

First quarter timeline (Jan-Mar 2009)


This is version 0.8 of the 2009 timeline. There are almost certainly some errors or omissions; if you find any, please send them to timeline@lwn.net.

LWN subscribers have paid for the development of this timeline, along with previous timelines and the weekly editions. If you like what you see here, or elsewhere on the site, please consider subscribing to LWN.

For those with a nostalgic bent, our timeline index page has links to the previous eleven timelines and some other retrospective articles going all the way back to 1998.

April

When I joined in 2001, Debian was The Distribution that a lot of users were using and all my friends knowing Free Software were dreaming of contributing to. Things have changed since then: newbies now use Ubuntu or Fedora, and contributors can easily join their communities. Debian is too often seen as the old distro that some old timers still use, having a process to join which is not worth trying. The Debian value that needs to be improved the most is changing that: putting Debian back into its place.

-- Debian project leader candidate Stefano "Zack" Zacchiroli

CentOS 5.3 released. (announcement) [Ardour]

Ardour, the multi-track audio editor, releases version 2.8. (announcement)

Intel turns over stewardship of Moblin to the Linux Foundation. (press release)

SGI acquired by Rackable Systems for $25 million. (press release)

Openmoko downsizes and stops work on the GTA03 to focus on the then-mysterious "Project B" (Steve Mosher email, PDF slides from Sean Moss-Pultz's presentation)

BIOS writers tend to have been on pain medication for so long that they can hardly remember their own name, much less actually make sure they follow all the documentation.

-- Linus Torvalds

[Filesystems
workshop]

Steve McIntyre is re-elected as Debian project leader. (announcement)

Oracle buys Sun, though surely they didn't think it would be held up in the EU regulatory process until at least December. (announcement)

GCC 4.4.0 is released. (announcement, LWN coverage)

Because I care about folks who don't make computing their life blood, I think the consumer story is a really interesting one. So for that reason, I think netbooks are really fascinating.

-- Mark Shuttleworth

[Ubuntu]

Ubuntu 9.04, "Jaunty Jackalope", is released. (announcement) [NetBSD]

NetBSD 5.0 is released. (announcement, LWN review)

Mandriva 2009 Spring (2009.1) released. (announcement)

May

We believe that you can't make software that pleases everyone. You can make software that pleases experts, but most of the time non-experts hate that software.

-- GNOME Foundation board member Luis Villa

A patch to avoid Microsoft's VFAT patent claim, which was asserted in the TomTom lawsuit, is proposed on linux-kernel. (LWN article)

OpenBSD 4.5 is released. (announcement)

Debian announces a switch to EGLIBC, instead of glibc for its C runtime library. (announcement, LWN article)

The GNOME volume control exposed a lot of low-level hardware-specific features that only a tiny minority of people actually really understood, and the PA volume control exposed a lot of low-level software features that a slightly larger minority of people only actually really understood.

-- PulseAudio (PA) developer Lennart Poettering

OpenOffice.org 3.1 is released. (announcement)

AMD releases 3D programming guide for R6xx/R7xx chips. (announcement)

[Slackware]

Slackware64 is released—based on Slackware 13.0, it is the first official 64-bit Slackware release. (announcement)

Cisco and the Free Software Foundation settle a GPL compliance lawsuit; Cisco will appoint a Free Software Director for its Linksys subsidiary. (announcement) [Linux
Mint]

Linux Mint 7 ("Gloria") distribution is released (announcement, LWN review)

A few months ago, I had to dive into the configuration of sendmail to make a very small change. It turns out I spent almost an hour trying to make sense out of a maze of files that were plain unreadable.

-- OpenSMTPD developer Gilles Chehade

Wikipedia switches from the GNU Free Documentation License to the Creative Commons attribution-sharealike license. (announcement, LWN coverage)

TurboGears 2.0 is released; it is a Python-based web application framework. (announcement) [KOffice]

KOffice 2.0.0 is released. (announcement)

June

That's like saying that a squirrel is 48% juicier than an orange - maybe it's true, but anybody who puts the two in a blender to compare them is kind of sick.

-- Linus Torvalds

The US Supreme Court agrees to hear the Bilski case, which could change the software patent landscape. (SCOTUS Blog report)

The 2.6.30 kernel is released with the TOMOYO security module, nilfs filesystem, reliable datagram sockets, FS-Cache, and more. (announcement, KernelNewbies coverage)

Fedora 11 ("Leonidas") is released. (announcement)

Here, we find the quadruped leaping to action in a flash with its 20-second startup -- and do observe the animal's graceful form, achieved through kernel mode setting and Plymouth. We discovered, upon further examination, that the Leonidas maintains his sleek figure through the help of his new Presto feature, which allows him to keep his bandwidth trim while digesting updates that keep him healthy and content.

-- Paul Frields announces Fedora 11

Intel acquires embedded Linux vendor Wind River Systems. (press release) [Amarok]

KDE audio player Amarok 2.1 is released. (announcement, LWN review)

Ubuntu announces switch to the GRUB2 bootloader for 9.10 ("Karmic Koala"). (announcement, LWN coverage)

Sugar Labs announces Sugar on a Stick "Strawberry" featuring Fedora 11 and Sugar learning environment version 0.84. (announcement)

We've always said that the talent and creativity of those outside the company is superior to that inside the company. We have stuck to these principles. We've have opened up more than any other phone, from any other company, in the history of this industry.

-- Openmoko CEO Sean Moss-Pultz

Richard Stallman warns about dependence on Mono and C#,which stirs up a lot of controversy. (RMS's warning, LWN coverage)

Firefox 3.5 is released with private browsing, HTML5 video and audio support for Ogg Theora and Vorbis, a faster JavaScript engine, and more. (announcement) [PHP]

PHP 5.3 is released. (announcement)

Python 3.1 is released, focusing on the "stabilization and optimization of the features and changes that Python 3.0 introduced". (announcement)

The Ogg codecs (Vorbis and Theora) are dropped from HTML5, which means there will be no standard codecs for <video> and <audio> in HTML5. (announcement)

Comments (2 posted)

Page editor: Jonathan Corbet

Security

Pogoplug makes internet data sharing easy

By Jake Edge
December 9, 2009

A recent article in Computerworld introduced a new product, the Pogoplug, which has a number of interesting and useful-sounding features. It is also likely to be something of a security headache for network administrators. It simplifies the setup of a internet-connected storage device, but it also uses UDP in a way that may circumvent the firewall restrictions on some networks.

As a device, the Pogoplug isn't really anything particularly special. It consists of an ARM processor with a bit of memory and flash, along with some USB ports and a gigabit ethernet connector. None of the technical capabilities of the Pogoplug are terribly sophisticated, but as would be expected for a consumer device like this, it runs Linux under the covers. It is the service that is provided by CloudEngines, the company behind Pogoplug, that turns it into something beyond a simple embedded Linux box.

To use the Pogoplug, you connect it to the ethernet, a USB drive (or stick), and power it up. After that, browse to my.pogoplug.com, create an account, and wait a few minutes for an email with a link containing the magic code for your Pogoplug. Clicking that link takes you to a page that displays the contents of the USB drive attached to the Pogoplug. And you can do that from anywhere on the internet.

The Pogoplug relies on being able to send and receive UDP packets over the internet to and from port 4365. If that is true, based on the network the Pogoplug is attached to, it can be accessed from anywhere else on the internet. The device can be configured to share its data with other users via links, RSS feeds, email notifications, and so forth. It is just the kind of device that will be attractive to some internet-centric folks.

The device itself is not locked down and the OpenPogo site caters to developers. There is information on the wiki about installing various other applications such as MySQL, Django, Ruby on Rails, etc. From that perspective, it looks like a fun, hackable device. But it suffers from a number of pitfalls that might bite the unwary.

To start with, ssh is enabled with a standard root password. That makes it easy for folks that want to change things on the device, but for those who are not particularly savvy, it also leaves the device wide open to anyone else on the network. Presumably the ssh functionality is not exported in whatever UDP tunnel/encapsulation that gets established, so it is safe from ssh logins across the internet. But home users that expect their Pogoplug to be private from their siblings, parents, or roommates may be in for something of a surprise.

There is also the concern that a Pogoplug could expose data—inadvertently or maliciously—from inside a company or other supposedly secure environment. There is nothing technically new about what the Pogoplug can do, but it would have taken someone with some reasonable technical skills to set something like the Pogoplug up. Now, anyone with $129 and a 2G USB stick may be able to publish the entirety of a company's secrets on the web, in just a few minutes.

Certainly many or most corporate firewalls will not pass the Pogoplug traffic, but undoubtedly some will. Various P2P applications have caused inadvertent releases of confidential information from employees who didn't fully understand the technology; Pogoplug is likely to do the same. It is great for folks to be able to share their data with their friends, but unless they fully understand how it works, there are some holes that are pretty likely to be stepped in.

Comments (5 posted)

Brief items

Open-Source Effort to Hack GSM (IEEE Spectrum)

IEEE Spectrum reports on an effort to hack the GSM mobile phone standard. "Karsten Nohl, chief research scientist with H4RDW4RE, a Sunnyvale, Calif.-based security research firm, is mounting what could be the most ambitious attempt yet to compromise the GSM phone system, which is used by over 3 billion people around the world. Others have cracked the A5/1 encryption technology used in GSM before, but their results have remained secret. However, Nohl, who earned a Ph.D. in computer science at the University of Virginia and is a member of Germany's Chaos Computer Club (CCC), intends to go one big step further: By the end of the year, he plans to make the keys available to everyone on the Internet." (Thanks to Evgeny Stambulchik).

Comments (30 posted)

New vulnerabilities

acpid: privilege escalation

Package(s):acpid CVE #(s):CVE-2009-4033
Created:December 7, 2009 Updated:December 28, 2009
Description:

From the Red Hat advisory:

It was discovered that acpid could create its log file ("/var/log/acpid") with random permissions on some systems. A local attacker could use this flaw to escalate their privileges if the log file was created as world-writable and with the setuid or setgid bit set. (CVE-2009-4033)

Alerts:
Mandriva MDVSA-2009:342 2009-12-26
CentOS CESA-2009:1642 2009-12-18
Red Hat RHSA-2009:1642-02 2009-12-07

Comments (none posted)

cups: integer overflow

Package(s):cups CVE #(s):CVE-2009-0165
Created:December 8, 2009 Updated:August 18, 2010
Description: From the Mandriva advisory: Integer overflow in the JBIG2 decoder in Xpdf 3.02pl2 and earlier, as used in Poppler and other products, when running on Mac OS X, has unspecified impact, related to g*allocn.
Alerts:
Ubuntu USN-973-1 2010-08-17
Mandriva MDVSA-2009:346 2009-12-29
Mandriva MDVSA-2009:282-1 2009-12-07

Comments (none posted)

expat: denial of service

Package(s):expat CVE #(s):CVE-2009-3560
Created:December 7, 2009 Updated:February 11, 2011
Description:

From the Fedora advisory:

A buffer over-read flaw was found in the way Expat handles malformed UTF-8 sequences when processing XML files. A specially-crafted XML file could cause applications using Expat to crash while parsing the file. (CVE-2009-3560)

Alerts:
Slackware SSA:2011-041-03 2011-02-11
Slackware SSA:2011-041-02 2011-02-11
SUSE SUSE-SR:2010:015 2010-08-17
SUSE SUSE-SR:2010:014 2010-08-02
SuSE SUSE-SR:2010:012 2010-05-25
SuSE SUSE-SR:2010:011 2010-05-10
Ubuntu USN-890-6 2010-04-15
SuSE SUSE-SR:2010:013 2010-06-14
Ubuntu USN-890-4 2010-01-26
Debian DSA-1977-1 2010-01-25
Ubuntu USN-890-3 2010-01-22
Ubuntu USN-890-2 2010-01-21
Ubuntu USN-890-1 2010-01-20
SuSE SUSE-SR:2010:005 2010-02-23
SuSE SUSE-SR:2010:001 2010-01-19
Ubuntu USN-890-5 2010-02-18
SuSE SUSE-SR:2009:020 2010-01-12
Mandriva MDVSA-2009:316-3 2010-01-10
Mandriva MDVSA-2009:316-2 2010-01-09
Mandriva MDVSA-2009:316-1 2010-01-08
Debian DSA-1953-2 2009-12-31
Debian DSA-1953-1 2009-12-15
CentOS CESA-2009:1625 2009-12-08
CentOS CESA-2009:1625 2009-12-08
Red Hat RHSA-2009:1625-01 2009-12-07
Mandriva MDVSA-2009:316 2009-12-05
Fedora FEDORA-2009-12737 2009-12-04
Fedora FEDORA-2009-12716 2009-12-04
Fedora FEDORA-2009-12690 2009-12-04

Comments (none posted)

flash-plugin: multiple vulnerabilities

Package(s):flash-plugin CVE #(s):CVE-2009-3794 CVE-2009-3796 CVE-2009-3798 CVE-2009-3799 CVE-2009-3800 CVE-2009-3797
Created:December 9, 2009 Updated:January 4, 2010
Description:

From the Red Hat advisory:

Multiple security flaws were found in the way Flash Player displayed certain SWF content. An attacker could use these flaws to create a specially-crafted SWF file that would cause flash-plugin to crash or, possibly, execute arbitrary code when the victim loaded a page containing the specially-crafted SWF content. (CVE-2009-3794, CVE-2009-3796, CVE-2009-3798, CVE-2009-3799, CVE-2009-3800)

Alerts:
Gentoo 201001-02 2010-01-04
SuSE SUSE-SA:2009:062 2009-12-22
Red Hat RHSA-2009:1657-01 2009-12-09
Red Hat RHSA-2009:1658-01 2009-12-09

Comments (none posted)

gforge: symlink attack vulnerability

Package(s):gforge CVE #(s):CVE-2009-3304
Created:December 4, 2009 Updated:December 9, 2009
Description: From the Debian alert:

Sylvain Beucler discovered that gforge, a collaborative development tool, is prone to a symlink attack, which allows local users to perform a denial of service attack by overwriting arbitrary files.

Alerts:
Debian DSA-1945-1 2009-12-03

Comments (none posted)

gnome-screensaver: lock bypass

Package(s):gnome-screensaver CVE #(s):
Created:December 8, 2009 Updated:December 9, 2009
Description: From the Ubuntu advisory: It was discovered that gnome-screensaver did not always re-enable itself after applications requested it to ignore idle timers. This may result in the screen not being automatically locked after the inactivity timeout is reached, permitting an attacker with physical access to gain access to an unlocked session.
Alerts:
Ubuntu USN-866-1 2009-12-07

Comments (none posted)

grub2: authentication bypass

Package(s):grub2 CVE #(s):CVE-2009-4128
Created:December 9, 2009 Updated:December 9, 2009
Description:

From the Ubuntu advisory:

It was discovered that GRUB 2 did not properly validate passwords. An attacker with physical access could conduct a brute force attack and bypass authentication by submitting a 1 character password.

Alerts:
Ubuntu USN-868-1 2009-12-09

Comments (none posted)

kernel: multiple vulnerabilities

Package(s):linux, linux-source-2.6.15 CVE #(s):CVE-2009-3080 CVE-2009-3623 CVE-2009-3624 CVE-2009-3722 CVE-2009-3725 CVE-2009-3888 CVE-2009-4005 CVE-2009-4026 CVE-2009-4027
Created:December 7, 2009 Updated:March 21, 2011
Description:

From the Ubuntu advisory:

Dave Jones discovered that the gdth SCSI driver did not correctly validate array indexes in certain ioctl calls. A local attacker could exploit this to crash the system or gain elevated privileges. (CVE-2009-3080)

J. Bruce Fields discovered that NFSv4 did not correctly use the credential cache. A local attacker using a mount with AUTH_NULL authentication could exploit this to crash the system or gain root privileges. Only Ubuntu 9.10 was affected. (CVE-2009-3623)

Alexander Zangerl discovered that the kernel keyring did not correctly reference count. A local attacker could issue a series of specially crafted keyring calls to crash the system or gain root privileges. Only Ubuntu 9.10 was affected. (CVE-2009-3624)

Avi Kivity discovered that KVM did not correctly check privileges when accessing debug registers. A local attacker could exploit this to crash a host system from within a guest system, leading to a denial of service. Ubuntu 6.06 and 9.10 were not affected. (CVE-2009-3722)

Philip Reisner discovered that the connector layer for uvesafb, pohmelfs, dst, and dm did not correctly check capabilties. A local attacker could exploit this to crash the system or gain elevated privileges. Ubuntu 6.06 was not affected. (CVE-2009-3725)

Robin Getz discovered that NOMMU systems did not correctly validate NULL pointers in do_mmap_pgoff calls. A local attacker could attempt to allocate large amounts of memory to crash the system, leading to a denial of service. Only Ubuntu 6.06 and 9.10 were affected. (CVE-2009-3888)

Roel Kluin discovered that the Hisax ISDN driver did not correctly check the size of packets. A remote attacker could send specially crafted packets to cause a system crash, leading to a denial of service. (CVE-2009-4005)

Lennert Buytenhek discovered that certain 802.11 states were not handled correctly. A physically-proximate remote attacker could send specially crafted wireless traffic that would crash the system, leading to a denial of service. Only Ubuntu 9.10 was affected. (CVE-2009-4026, CVE-2009-4027)

Alerts:
Mandriva MDVSA-2011:051 2011-03-18
Red Hat RHSA-2010:0882-01 2010-11-12
Mandriva MDVSA-2010:198 2010-10-07
Mandriva MDVSA-2010:188 2010-09-23
Red Hat RHSA-2010:0380-01 2010-04-27
Red Hat RHSA-2010:0178-02 2010-03-30
Debian DSA-2012-1 2010-03-11
Red Hat RHSA-2010:0041-01 2010-01-21
Debian DSA-2004-1 2010-02-27
Debian DSA-2003-1 2010-02-22
SuSE SUSE-SA:2010:013 2010-02-18
Mandriva MDVSA-2010:034-1 2010-02-18
Debian DSA-1996-1 2010-02-12
CentOS CESA-2010:0046 2010-01-20
Red Hat RHSA-2010:0046-01 2010-01-19
SuSE SUSE-SA:2010:005 2010-01-15
Mandriva MDVSA-2010:034-2 2010-02-18
Mandriva MDVSA-2010:034 2010-02-08
CentOS CESA-2010:0076 2010-02-04
SuSE SUSE-SA:2010:001 2010-01-07
Debian DSA-1962 2009-12-23
Mandriva MDVSA-2010:030 2009-01-01
SuSE SUSE-SA:2009:064 2009-12-22
SuSE SUSE-SA:2009:061 2009-12-14
Fedora FEDORA-2009-13098 2009-12-11
Ubuntu USN-864-1 2009-12-05
CentOS CESA-2010:0126 2010-03-02
Red Hat RHSA-2010:0126-01 2010-03-01
Red Hat RHSA-2010:0076-01 2010-02-02

Comments (none posted)

kernel: unprivileged user driver vulnerability

Package(s):kernel CVE #(s):CVE-2009-3889 CVE-2009-3939
Created:December 3, 2009 Updated:March 3, 2010
Description: From the Red Hat alert:

Permission issues were found in the megaraid_sas driver (for SAS based RAID controllers) in the Linux kernel. The "dbg_lvl" and "poll_mode_io" files on the sysfs file system ("/sys/") had world-writable permissions. This could allow local, unprivileged users to change the behavior of the driver. (CVE-2009-3889, CVE-2009-3939, Moderate)

Alerts:
SuSE SUSE-SA:2010:014 2010-03-03
Red Hat RHSA-2010:0076-01 2010-02-02
Debian DSA-2004-1 2010-02-27
SuSE SUSE-SA:2010:013 2010-02-18
Debian DSA-1996-1 2010-02-12
SuSE SUSE-SA:2010:010 2010-02-08
CentOS CESA-2010:0046 2010-01-20
Red Hat RHSA-2010:0046-01 2010-01-19
SuSE SUSE-SA:2010:005 2010-01-15
SuSE SUSE-SA:2010:012 2010-02-15
CentOS CESA-2010:0076 2010-02-04
SuSE SUSE-SA:2010:001 2010-01-07
SuSE SUSE-SA:2009:064 2009-12-22
SuSE SUSE-SA:2009:061 2009-12-14
Ubuntu USN-864-1 2009-12-05
Red Hat RHSA-2009:1635-01 2009-12-03

Comments (none posted)

kernel: null pointer dereference

Package(s):kernel CVE #(s):CVE-2009-1298
Created:December 7, 2009 Updated:January 7, 2010
Description:

From the Red Hat bugzilla entry:

Between 2.6.28.10 and 2.6.29, net/ipv4/ip_fragment.c was patched, changing from dev_net(dev) to container_of(...). Unfortunately the goto section (out_fail) on oversized packets inside ip_frag_reasm() didn't get touched up as well. Oversized IP packets cause a NULL pointer dereference and immediate hang.

Alerts:
SuSE SUSE-SA:2010:001 2010-01-07
rPath rPSA-2009-0161-1 2009-12-16
Ubuntu USN-869-1 2009-12-10
Mandriva MDVSA-2009:329 2009-12-09
Slackware SSA:2009-342-01 2009-12-09
Fedora FEDORA-2009-12825 2009-12-07
Fedora FEDORA-2009-12786 2009-12-07

Comments (none posted)

kvm: host denial of service

Package(s):kvm CVE #(s):CVE-2009-4031
Created:December 9, 2009 Updated:March 22, 2010
Description:

From the Red Hat advisory:

On x86 platforms, the do_insn_fetch() function did not limit the amount of instruction bytes fetched per instruction. Users in guest operating systems could leverage this flaw to cause large latencies on SMP hosts that could lead to a local denial of service on the host operating system. This update fixes this issue by imposing the architecturally-defined 15 byte length limit for instructions. (CVE-2009-4031)

Alerts:
SuSE SUSE-SA:2010:018 2010-03-22
Ubuntu USN-894-1 2010-02-05
Debian DSA-1962 2009-12-23
CentOS CESA-2009:1659 2009-12-18
Fedora FEDORA-2009-13098 2009-12-11
Red Hat RHSA-2009:1659-01 2009-12-09

Comments (none posted)

nginx: denial of service

Package(s):nginx CVE #(s):CVE-2009-3896
Created:December 7, 2009 Updated:December 9, 2009
Description:

From the CVE entry:

src/http/ngx_http_parse.c in nginx (aka Engine X) 0.1.0 through 0.4.14, 0.5.x before 0.5.38, 0.6.x before 0.6.39, 0.7.x before 0.7.62, and 0.8.x before 0.8.14 allows remote attackers to cause a denial of service (NULL pointer dereference and worker process crash) via a long URI.

Alerts:
Fedora FEDORA-2009-12750 2009-12-07
Fedora FEDORA-2009-12782 2009-12-07
Fedora FEDORA-2009-12775 2009-12-07
Gentoo 201203-22 2012-03-28

Comments (none posted)

ntp: denial of service

Package(s):ntp CVE #(s):CVE-2009-3563
Created:December 9, 2009 Updated:May 7, 2010
Description:

From the Red Hat advisory:

Robin Park and Dmitri Vinokurov discovered a flaw in the way ntpd handled certain malformed NTP packets. ntpd logged information about all such packets and replied with an NTP packet that was treated as malformed when received by another ntpd. A remote attacker could use this flaw to create an NTP packet reply loop between two ntpd servers via a malformed packet with a spoofed source IP address and port, causing ntpd on those servers to use excessive amounts of CPU time and fill disk space with log messages. (CVE-2009-3563)

Alerts:
rPath rPSA-2010-0034-1 2010-05-07
Debian DSA-1992-1 2010-02-04
SuSE SUSE-SR:2009:020 2010-01-12
Gentoo 201001-01 2010-01-04
CentOS CESA-2009:1648 2009-12-19
Fedora FEDORA-2009-13046 2009-12-11
Fedora FEDORA-2009-13090 2009-12-11
Fedora FEDORA-2009-13121 2009-12-11
Slackware SSA:2009-343-01 2009-12-10
Ubuntu USN-867-1 2009-12-08
Mandriva MDVSA-2009:328 2009-12-08
Debian DSA-1908-1 2009-12-08
CentOS CESA-2009:1648 2009-12-08
CentOS CESA-2009:1651 2009-12-08
Red Hat RHSA-2009:1648-01 2009-12-08
Red Hat RHSA-2009:1651-01 2009-12-08

Comments (none posted)

perl-IO-Socket-SSL: invalid certificate checking

Package(s):perl-IO-Socket-SSL CVE #(s):CVE-2009-3024
Created:December 7, 2009 Updated:January 17, 2011
Description:

From the Mandriva advisory:

The verify_hostname_of_cert function in the certificate checking feature in IO-Socket-SSL (IO::Socket::SSL) 1.14 through 1.25 only matches the prefix of a hostname when no wildcard is used, which allows remote attackers to bypass the hostname check for a certificate (CVE-2009-3024).

Alerts:
Gentoo 201101-06 2011-01-16
Mandriva MDVSA-2009:252-1 2009-12-05

Comments (none posted)

pidgin: denial of service

Package(s):pidgin CVE #(s):CVE-2009-3025 CVE-2009-3084
Created:December 7, 2009 Updated:January 13, 2010
Description:

From the Mandriva advisory:

Unspecified vulnerability in Pidgin 2.6.0 allows remote attackers to cause a denial of service (crash) via a link in a Yahoo IM (CVE-2009-3025)

The msn_slp_process_msg function in libpurple/protocols/msn/slpcall.c in the MSN protocol plugin in libpurple 2.6.0 and 2.6.1, as used in Pidgin before 2.6.2, allows remote attackers to cause a denial of service (application crash) via a handwritten (aka Ink) message, related to an uninitialized variable and the incorrect UTF16-LE charset name (CVE-2009-3084).

Alerts:
SuSE SUSE-SR:2009:020 2010-01-12
Mandriva MDVSA-2009:321 2009-12-06

Comments (none posted)

qemu-kvm: guest crashes

Package(s):qemu-kvm CVE #(s):
Created:December 4, 2009 Updated:December 9, 2009
Description: From the Ubuntu advisory: It was discovered that QEMU did not properly setup the virtio networking features available to its guests. A remote attacker could exploit this to crash QEMU guests which use virtio networking on Linux kernels earlier than 2.6.26.
Alerts:
Ubuntu USN-863-1 2009-12-03

Comments (none posted)

request-tracker: session hijack vulnerability

Package(s):request-tracker CVE #(s):CVE-2009-3585
Created:December 3, 2009 Updated:December 11, 2009
Description: From the Debian alert:

Mikal Gule discovered that request-tracker, an extensible trouble-ticket tracking system, is prone to an attack, where an attacker with access to the same domain can hijack a user's RT session.

Alerts:
Fedora FEDORA-2009-12783 2009-12-07
Fedora FEDORA-2009-12827 2009-12-07
Fedora FEDORA-2009-12817 2009-12-07
Debian DSA-1944-1 2009-12-03

Comments (none posted)

shibboleth-sp: cross-site scripting

Package(s):shibboleth-sp CVE #(s):CVE-2009-3300
Created:December 8, 2009 Updated:December 9, 2009
Description: From the Debian advisory: Matt Elder discovered that Shibboleth, a federated web single sign-on system is vulnerable to script injection through redirection URLs. More details can be found in the Shibboleth advisory at http://shibboleth.internet2.edu/secadv/secadv_20091104.txt.
Alerts:
Debian DSA-1947-1 2009-12-07

Comments (none posted)

zsh: buffer overflow

Package(s):zsh CVE #(s):
Created:December 3, 2009 Updated:December 9, 2009
Description: From the Mandriva alert:

A stack-based buffer overflow was found in the zsh command interpreter. An attacker could use this flaw to cause a denial of service (zsh crash), when providing a specially-crafted string as input to the zsh shell.

Alerts:
Mandriva MDVSA-2009:108-1 2009-12-03

Comments (none posted)

Page editor: Jake Edge

Kernel development

Brief items

Kernel release status

The 2.6.32 kernel is out, released on December 2. Some of the more significant features in 2.6.32 include devtmpfs, a bunch of block layer scalability work, HWPOISON, kernel shared memory, a number of additions to the perf events subsystem, and much more. See the KernelNewbies 2.6.32 page for lots of details.

The 2.6.33 merge window is open; see the accompanying article for a summary of the most significant changes merged so far.

Stable kernel updates: 2.6.31.7, containing a very long list of fixes, was released on December 8. 2.6.27.40 was released at the same time; it was quickly followed by 2.6.27.41 to fix a build problem.

Comments (none posted)

Quotes of the week

Unfortunately, even the best human reflexes simply cannot keep up with a 5GHz CPU. Even if we imagine a hyper-caffeinated 5GHz superhero, there are many millions of computers to be kept up with. And so the modern microprocessor invalidates untold millenia of evolution, frustrating untold numbers of would-be computer professionals.
-- Paul McKenney

The fact is, any time anybody makes up a new locking mechanism, THEY ALWAYS GET IT WRONG. Don't do it.
-- Linus Torvalds

But us kernel developers stay up too late at night, drinking jolt (or beer if you are in Europe), and our brain cells have fused to only logical circuitry, thus understanding concepts that are not engraved in stone becomes a bit too straining for us, and we may finally have to give up on solving this one last bug to get some rest with our love one that's been sleeping since 9pm.

This means using DECLARE_* and DEFINE_* will push us over that brink to normalcy and must be avoided. A new name must be established to clearly describe the mystical CPP magic that comprises the TRACE_EVENT hackery. Something that can bring us back to our roots. Something where it all begins. The stone age.

Thus, this patch renames the MACROS to the most obvious definitions around. Something we should have thought of at the start.

s/DEFINE_EVENT_CLASS/FRED/g
s/DEFINE_EVENT/WILMA/g
s/TRACE_EVENT/BARNEY/g
-- Steven "Bam Bam" Rostedt

Comments (1 posted)

Vger outage on Dec 12th and 13th

David Miller has informed the world that the machine serving as vger.kernel.org will be moving from one hosting facility to another on the 12th and 13th of December. That will, of course, affect traffic to all of the kernel-oriented mailing lists managed by that server. That empty mailbox will not mean that your mail system is broken; it's just a temporary pause in the linux-kernel firehose.

Full Story (comments: 2)

Spinlock naming resolved

By Jonathan Corbet
December 9, 2009
The eventual merging of sleeping spinlocks from the realtime tree requires splitting existing locks into two types: those (the majority) which can sleep in a realtime kernel, and those which must remain "real" spinlocks. The 2009 Kernel Summit decided against renaming the vast number of ordinary locks, but did not even attempt to come up with a name for the "raw" spinlock type.

One possibility was raw_spinlock_t, but that name is already used by the lockdep code. After numerous other possible names were considered, the winning suggestion was one by Linus: arch_spinlock_t. This name carries the connotation of a low-level spinlock which is implemented by architecture-specific code; in the absence of a better idea, it has carried the day.

Thomas Gleixner has posted a patch which makes the naming changes. It's worth noting that even though the new type is not a raw_spinlock_t, one still calls raw_spin_lock() to acquire an arch_spinlock_t lock. As of this writing, this patch has not been merged for 2.6.33, but chances are that it will be.

Comments (2 posted)

Kernel development news

2.6.33 merge window part 1

By Jonathan Corbet
December 9, 2009
Linus began merging patches for the 2.6.33 development cycle on December 5. The merge window got off to a slow start, but then Linus began to make up for lost time; as of this writing, some 3900 changesets have been merged.

User-visible changes include:

  • The ftrace framework has seen a number of improvements, including the ability to trace multiple processes simultaneously, regular expression support in tracing filters, tracing of big kernel lock events, and tracing of accesses and modifications to arbitrary kernel variables.

  • Perhaps most significantly (for ftrace), the dynamic probes for ftrace patch set has been merged, allowing the placement of arbitrary tracepoints at run time. The "perf" tool has also been extended to be able to place and use dynamic tracepoints.

  • There are many other enhancements to "perf," including a new framework for benchmark suites, a command to record and analyze kernel memory allocations, and a generic scripting language hook set.

  • Eric Biederman's long quest to remove binary sysctl() support has finally made it into the mainline.

  • The recvmmsg() system call has been added.

  • The anticipatory I/O scheduler has been removed, in favor of CFQ which is seen as providing a superset of features.

  • The new, unified block I/O bandwidth controller has been merged.

  • The networking layer has gained support for TCP cookie transactions [PDF], a mechanism which allows faster, more secure, and more robust initiation of TCP connections.

  • The DRBD distributed block device has been merged.

  • New drivers:

    • Boards and processors: ST-Ericsson U8500 boards, Marvell Dove (88AP510) system-on-chip CPUs, Palm Centro 685 phones, and CompuLab CM-T35 boards.

    • Networking: TI High End CAN controllers, Intel Wireless MultiCom 3200 chips, Ralink rt2800 wireless chipsets, Microchip MCP251x SPI CAN controllers, Freescale MSCAN-based CAN controllers, and Solarflare SFC9000 10G Ethernet controllers.

    • Sound: miroSOUND PCM20 radio tuners, Texas Instruments TPA6130A2 stereo headphone amplifiers, TI tlv320dac33 codecs, Asahi Kasei AK4113 and AK4671 codecs, WM8580 based audio subsystems on SMDK64xx systems, Wolfson Micro WM8711/L sound devices, and Raumfeld audio adapters.

    • Miscellaneous: GRLIB APBUART serial ports, Oki MSM6242 realtime clock chips, and Ricoh RP5C01 RTCs.

Changes visible to kernel developers include:

  • There is a new unreachable() macro which can be used to mark code which will never be executed. Its main application is in macros like BUG().

  • New security module hooks, intended for pathname-based modules, have been added to check chmod(), chown(), and chroot().

  • There is a new RCU variant, called "tiny RCU," which is meant for non-SMP situations where memory footprint must be minimized.

  • printk_ratelimit() can, once again, be used in atomic context. (Note, though, that there are developers who would like to eliminate this function in favor of some sort of more local rate limiting).

  • The creation of nearly-identical tracepoints has been made significantly easier. TRACE_EVENT_TEMPLATE() has a syntax identical to TRACE_EVENT(), but it creates a template which can be used by the simpler DEFINE_EVENT() macro to create specific tracepoints. The code gets simpler, and, as a side benefit, the kernel gets smaller.

The merge window should stay open for at least another week; expect quite a bit more code to be incorporated for 2.6.33 before the window closes.

Comments (8 posted)

Minimizing instrumentation impacts

By Jake Edge
December 9, 2009

Minimizing the overhead of various kernel debugging and tracing mechanisms is important for many reasons. For static instrumentation, like tracepoints, the impact when they are not enabled must be very low or they won't get used—or merged. In addition, for any kind of instrumentation, the impact when enabled needs to be as small as possible so that whatever behavior is under observation will not radically change due to the tracing. Two separate proposals, jump labels for tracepoints and kprobes jump optimization, are both trying to reduce the effect that instrumentation has on performance. In addition, they share some underlying code.

The kprobes jump optimization has been proposed by Masami Hiramatsu, and trades off a bit of extra memory for approximately one-fifth the overhead in making a kprobe call. According to Hiramatsu's posting, kprobes went from 0.68us (32-bit) and 0.91us (64-bit) to 0.06us (both) when they were optimized with this technique. kretprobes dropped from 0.95us (32-bit) and 1.21us (64-bit) to 0.30 and 0.35us respectively. All of his testing was done on a 2.33GHz Xeon processor.

Those numbers are pretty eye-opening, especially since the optimization only adds around 200 bytes per probe. The basic idea is to use a jump instruction, rather than a breakpoint, to implement probes whenever that is possible. The patch includes some fairly elaborate "safety checks" to see if it is possible to do the optimization. Before any of that is done, however, a regular breakpoint-based kprobe is inserted—if the optimization can't be done, that will be used instead.

The jump instruction that will be put at the address to be probed is longer than one byte, so the optimization step needs to look at the region of code it will be affecting. If that region straddles the boundary between functions (i.e. spills out of the probed function into the next), the optimization is not done. It then decodes the function looking for jump instructions that would—or could—jump into the region, if none are found, the optimization proceeds.

The instructions that are located at the address to be probed still need to be executed once they are replaced by a jump, of course, so a "detour" buffer is created. The detour buffer emulates an exception that contains the instructions copied from the probed location, followed by a jump back to the original execution path. This detour buffer will be used once the kprobe code itself is executed to finish the execution after the probe point.

Once the detour buffer has been created, the kprobe is enqueued on the kprobe-optimizer workqueue, where the actual jump is patched into the probe site. The optimizer needs to ensure that there are no interrupts executing and does so by using synchronize_sched() in the workqueue function. Once that completes, the text_poke_fixup() function, which is added as part of the patchset, is called to actually modify the code to patch the jump in.

The text_poke_fixup() patch is the piece that is shared with jump labels. It looks like:

    void *text_poke_fixup(void *addr, const void *opcode, size_t len,
                          void *fixup);
where addr points to the location to change, opcode and len specify the new opcode (and its length) to be written there. fixup is the address where a processor should jump if it hits addr while the modification is in process.

Essentially, text_poke_fixup() puts a breakpoint that will execute the code at fixup on addr and synchronizes that on all CPUs. It then modifies all the other bytes (except the first) of the region, once again synchronizing with the other CPUs. The next step is to modify the first byte, again requiring synchronization, and then it can clear the breakpoint. Any calls made during the modification will be routed by the breakpoint to the fixup code instead.

A jump label uses the same technique, but, since it applies to static instrumentation (tracepoints), it is meant to reduce the impact of the likely case that the tracepoint is disabled. It does that by using an assembly construct that will be available in the soon-to-be-released GCC 4.5, the asm goto, which allows branching to labels.

For a tracepoint, the idea is that the disabled case will consist of a 5-byte NOP (conveniently sized to be overwritten with a jump) followed by a jump around the disabled tracepoint code. When the tracepoint gets enabled, text_poke_fixup() is used to turn the NOP into a jump to the label in the DECLARE_TRACE() macro. That code is what the original unconditional jump skips over.

The jump labels patch then has code to manage the state of the tracepoints, including the labels and addresses, along with the current enabled/disabled status of the tracepoint. It is somewhat of a hackish abuse of the pre-processor and assembler, but according to Jason Baron, who proposed the patch, it results in "an average improvement of 30 cycles per-tracepoint on x86_64 systems that I've tested".

Jump labels eliminate the current test and jump that is done for each tracepoint, because it can dynamically enable and disable the tracepoint code. Adding the NOP and unconditional jump add "2 - 4 cycles on average vs. no tracepoint", Baron said, which is a pretty low cost for this kind of instrumentation.

Both of these techniques are likely to need some more "soaking" time before they are ready for the mainline. Jump labels is a more recent proposal and relies on features in a not-yet-released compiler, which would seem to put it a bit further behind. The reaction to both has been relatively positive, though, which probably indicates general agreement with their goals. Reducing the overhead for tracing and debugging is something that few will argue against.

Comments (1 posted)

Debugging the kernel using Ftrace - part 1

December 9, 2009

This article was contributed by Steven Rostedt

Ftrace is a tracing utility built directly into the Linux kernel. Many distributions already have various configurations of Ftrace enabled in their most recent releases. One of the benefits that Ftrace brings to Linux is the ability to see what is happening inside the kernel. As such, this makes finding problem areas or simply tracking down that strange bug more manageable.

Ftrace's ability to show the events that lead up to a crash gives a better chance of finding exactly what caused it and can help the developer in creating the correct solution. This article is a two part series that will cover various methods of using Ftrace for debugging the Linux kernel. This first part will talk briefly about setting up Ftrace, using the function tracer, writing to the Ftrace buffer from within the kernel, and various ways to stop the tracer when a problem is detected.

Ftrace was derived from two tools. One was the "latency tracer" by Ingo Molnar used in the -rt tree. The other was my own "logdev" utility that had its primary use on debugging the Linux kernel. This article will mostly describe features that came out of logdev, but will also look at the function tracer that originated in the latency tracer.

Setting up Ftrace

Currently the API to interface with Ftrace is located in the Debugfs file system. Typically, that is mounted at /sys/kernel/debug. For easier accessibility, I usually create a /debug directory and mount it there. Feel free to choose your own location for Debugfs.

When Ftrace is configured, it will create its own directory called tracing within the Debugfs file system. This article will reference those files in that directory as though the user first changed directory to the Debugfs tracing directory to avoid any confusion as to where the Debugfs file system has been mounted.

    [~]# cd /sys/kernel/debug/tracing
    [tracing]#

This article is focusing on using Ftrace as a debugging tool. Some configurations for Ftrace are used for other purposes, like finding latency or analyzing the system. For the purpose of debugging, the kernel configuration parameters that should be enabled are:

    CONFIG_FUNCTION_TRACER
    CONFIG_FUNCTION_GRAPH_TRACER
    CONFIG_STACK_TRACER
    CONFIG_DYNAMIC_FTRACE

Function tracing - no modification necessary

One of the most powerful tracers of Ftrace is the function tracer. It uses the -pg option of gcc to have every function in the kernel call a special function "mcount()". That function must be implemented in assembly because the call does not follow the normal C ABI.

When CONFIG_DYNAMIC_FTRACE is configured the call is converted to a NOP at boot time to keep the system running at 100% performance. During compilation the mcount() call-sites are recorded. That list is used at boot time to convert those sites to NOPs. Since NOPs are pretty useless for tracing, the list is saved to convert the call-sites back into trace calls when the function (or function graph) tracer is enabled.

It is highly recommended to enable CONFIG_DYNAMIC_FTRACE because of this performance enhancement. In addition, CONFIG_DYNAMIC_FTRACE gives the ability to filter which function should be traced. Note, even though the NOPs do not show any impact in benchmarks, the addition of frame pointers that come with the -pg option has been known to cause a slight overhead.

To find out which tracers are available, simply cat the available_tracers file in the tracing directory:

    [tracing]# cat available_tracers 
    function_graph function sched_switch nop

To enable the function tracer, just echo "function" into the current_tracer file.

    [tracing]# echo function > current_tracer
    [tracing]# cat current_tracer
    function

    [tracing]# cat trace | head -10
    # tracer: function
    #
    #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
    #              | |       |          |         |
                bash-16939 [000]  6075.461561: mutex_unlock <-tracing_set_tracer
              <idle>-0     [001]  6075.461561: _spin_unlock_irqrestore <-hrtimer_get_next_event
              <idle>-0     [001]  6075.461562: rcu_needs_cpu <-tick_nohz_stop_sched_tick
                bash-16939 [000]  6075.461563: inotify_inode_queue_event <-vfs_write
              <idle>-0     [001]  6075.461563: mwait_idle <-cpu_idle
                bash-16939 [000]  6075.461563: __fsnotify_parent <-vfs_write

The header explains the format of the output pretty well. The first two items are the traced task name and PID. The CPU that the trace was executed on is within the brackets. The timestamp is the time since boot, followed by the function name. The function in this case is the function being traced with its parent following the "<-" symbol.

This information is quite powerful and shows the flow of functions nicely. But it can be a bit hard to follow. The function graph tracer, created by Frederic Weisbecker, traces both the entry and exit of a function, which gives the tracer the ability to know the depth of functions that are called. The function graph tracer can make following the flow of execution within the kernel much easier to follow with the human eye:

    [tracing]# echo function_graph > current_tracer 
    [tracing]# cat trace | head -20
    # tracer: function_graph
    #
    # CPU  DURATION                  FUNCTION CALLS
    # |     |   |                     |   |   |   |
     1)   1.015 us    |        _spin_lock_irqsave();
     1)   0.476 us    |        internal_add_timer();
     1)   0.423 us    |        wake_up_idle_cpu();
     1)   0.461 us    |        _spin_unlock_irqrestore();
     1)   4.770 us    |      }
     1)   5.725 us    |    }
     1)   0.450 us    |    mutex_unlock();
     1) + 24.243 us   |  }
     1)   0.483 us    |  _spin_lock_irq();
     1)   0.517 us    |  _spin_unlock_irq();
     1)               |  prepare_to_wait() {
     1)   0.468 us    |    _spin_lock_irqsave();
     1)   0.502 us    |    _spin_unlock_irqrestore();
     1)   2.411 us    |  }
     1)   0.449 us    |  kthread_should_stop();
     1)               |  schedule() {

This gives the start and end of a function denoted with the C like annotation of "{" to start a function and "}" at the end. Leaf functions, which do not call other functions, simply end with a ";". The DURATION column shows the time spent in the corresponding function. The function graph tracer records the time the function was entered and exited and reports the difference as the duration. These numbers only appear with the leaf functions and the "}" symbol. Note that this time also includes the overhead of all functions within a nested function as well as the overhead of the function graph tracer itself. The function graph tracer hijacks the return address of the function in order to insert a trace callback for the function exit. This breaks the CPU's branch prediction and causes a bit more overhead than the function tracer. The closest true timings only occur for the leaf functions.

The lonely "+" that is there is an annotation marker. When the duration is greater than 10 microseconds, a "+" is shown. If the duration is greater than 100 microseconds a "!" will be displayed.

Using trace_printk()

printk() is the king of all debuggers, but it has a problem. If you are debugging a high volume area such as the timer interrupt, the scheduler, or the network, printk() can lead to bogging down the system or can even create a live lock. It is also quite common to see a bug "disappear" when adding a few printk()s. This is due to the sheer overhead that printk() introduces.

Ftrace introduces a new form of printk() called trace_printk(). It can be used just like printk(), and can also be used in any context (interrupt code, NMI code, and scheduler code). What is nice about trace_printk() is that it does not output to the console. Instead it writes to the Ftrace ring buffer and can be read via the trace file.

Writing into the ring buffer with trace_printk() only takes around a tenth of a microsecond or so. But using printk(), especially when writing to the serial console, may take several milliseconds per write. The performance advantage of trace_printk() lets you record the most sensitive areas of the kernel with very little impact.

For example you can add something like this to the kernel or module:

    trace_printk("read foo %d out of bar %p\n", bar->foo, bar);

Then by looking at the trace file, you can see your output.

    [tracing]# cat trace
    # tracer: nop
    #
    #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
    #              | |       |          |         |
               <...>-10690 [003] 17279.332920: : read foo 10 out of bar ffff880013a5bef8

The above example was done by adding a module that actually had a foo and bar construct.

trace_printk() output will appear in any tracer, even the function and function graph tracers.

    [tracing]# echo function_graph > current_tracer
    [tracing]# insmod ~/modules/foo.ko
    [tracing]# cat trace
    # tracer: function_graph
    #
    # CPU  DURATION                  FUNCTION CALLS
    # |     |   |                     |   |   |   |
     3) + 16.283 us   |      }
     3) + 17.364 us   |    }
     3)               |    do_one_initcall() {
     3)               |      /* read foo 10 out of bar ffff88001191bef8 */
     3)   4.221 us    |    }
     3)               |    __wake_up() {
     3)   0.633 us    |      _spin_lock_irqsave();
     3)   0.538 us    |      __wake_up_common();
     3)   0.563 us    |      _spin_unlock_irqrestore();

Yes, the trace_printk() output looks like a comment in the function graph tracer.

Starting and stopping the trace

Obviously there are times where you only want to trace a particular code path. Perhaps you only want to trace what is happening when you run a specific test. The file tracing_on is used to disable the ring buffer from recording data:

    [tracing]# echo 0 > tracing_on

This will disable the Ftrace ring buffer from recording. Everything else still happens with the tracers and they will still incur most of their overhead. They do notice that the ring buffer is not recording and will not attempt to write any data, but the calls that the tracers make are still performed.

To re-enable the ring buffer, simply write a '1' into that file:

    [tracing]# echo 1 > tracing_on

Note, it is very important that you have a space between the number and the greater than sign ">". Otherwise you may be writing standard input or output into that file.

    [tracing]# echo 0> tracing_on   /* this will not work! */

A common run might be:

    [tracing]# echo 0 > tracing_on
    [tracing]# echo function_graph > current_tracer
    [tracing]# echo 1 > tracing_on; run_test; echo 0 > tracing_on

The first line disables the ring buffer from recording any data. The next enables the function graph tracer. The overhead of the function graph tracer is still present but nothing will be recorded into the trace buffer. The last line enables the ring buffer, runs the test program, then disables the ring buffer. This narrows the data stored by the function graph tracer to include mostly just the data accumulated by the run_test program.

What's next?

The next article will continue the discussion on debugging the kernel with Ftrace. The method above to disable the tracing may not be fast enough. The latency between the end of the program run_test and echoing the 0 into the tracing_on file may cause the ring buffer to overflow and lose the relevant data. I will discuss other methods to stop tracing a bit more efficiently, how to debug a crash, and looking at what functions in the kernel are stack hogs. The best way to find out more is to enable Ftrace and just play with it. You can learn a lot about how the kernel works by just following the function graph tracer.

Comments (6 posted)

Patches and updates

Kernel trees

Core kernel code

Development tools

Device drivers

Documentation

Filesystems and block I/O

Memory management

Architecture-specific

Security-related

Virtualization and containers

Miscellaneous

Page editor: Jonathan Corbet

Distributions

News and Editorials

FreeBSD 8: an evolutionary release of the unknown giant

December 9, 2009

This article was contributed by Koen Vervloesem

FreeBSD 8.0 is a major release of the free UNIX descendant. Support for ZFS, jails and USB have been improved, but the release also adds new features, such as NFSv4 and Xen DomU support and some new kernel-related tools. The release notes detail these and other changes that appear in the latest FreeBSD.

New kernel tools

The new textdump feature comes in handy when debugging kernel panics, as it extracts commonly needed information from the kernel memory dump. Textdump stores human-readable text files into a tar archive, and those files can then be analyzed without access to kernel source and symbols. The textdump files are also appropriate for filing a bug report. By default, kernel dumps are still generated in the machine-readable binary format, but by setting the debug.ddb.textdump.pending sysctl variable to 1 using sysctl, the next dump will be a textdump.

Another interesting utility is procstat, which displays detailed information about running processes, such as command line arguments, virtual memory mappings, thread information, file descriptor information, etcetera. FreeBSD 8 also supports Sun's DTrace (introduced in release 7.1), a dynamic tracing framework to assist in profiling the operating system and applications, e.g. to find performance bottlenecks.

FreeBSD 8's network stack has been optimized with a per-CPU flow cache, which increases network throughput on multi core systems, and improvements in the scalability of UDP and TCP. The wireless networking stack has been extended with the "Virtual Access Points (VAP)" functionality, which lets administrators define multiple wireless networks to be hosted from a single access point. This allows for example one wireless network with WPA2 encryption for access to the local network and one without encryption for basic network access for visitors. FreeBSD 8 also supports draft 802.11s mesh networks.

File systems

On the file system front, NFSv4 support has been added (both client and server side), although it is still experimental. Thanks to NFSv4, users can have better security access controls and performance improvements. NFSv4 ACL support is not yet complete: libc changes and some of the kernel changes are part of FreeBSD 8.0, but user space utilities and support for the access control lists in ZFS are expected in FreeBSD 8.1.

The ZFS file system has been upgraded from version 6 to version 13 and is deemed production ready. Also, because ZFS requires a large amount of kernel memory, the limit of kernel memory that could be allocated in FreeBSD has been increased from 2 GB to 512 GB. Two GB was a bit cramped for Sun's file system, which tends to use as much kernel memory as it can. ZFS is not recommended for 32-bit architectures: the ZFS Tuning Guide for FreeBSD reads "A 64-bit system is preferred due to its larger address space and better performance on 64bit variables, which are used extensively by ZFS. 32-bit systems are supported though, with sufficient tuning."

Virtualization

Since FreeBSD 7.2, it has been possible to assign multiple IPv4 or IPv6 addresses to a FreeBSD jail. Jails can now also be restricted to certain CPUs and they can be nested hierarchically. A child jail is always at least as restricted as its ancestors.

Another (experimental) virtualization improvement is VImage, a network virtualization system. This makes it possible to give jails their own independent packet filters and routing tables. All these features open new possibilities for FreeBSD hosting services, who use jails a lot. For example, a web server in a jail can now be assigned multiple addresses and offer virtual hosting, customers can create jails inside their own jail to secure their services, and they can use their own firewall.

The developers have also integrated experimental Xen DomU support into FreeBSD, allowing it to be used as a 32-bit guest operating system on a Xen 3.1 or higher Dom0 host. This will eventually make it possible to use FreeBSD on Amazon EC2 (which at the moment uses Xen 3.0.3). Moreover, the open source edition of VirtualBox has also been ported to FreeBSD (emulators/virtualbox in the ports collection).

Desktop

FreeBSD focuses on the server, but it can also be used as a desktop system, although its descendant PC-BSD (8.0 now in alpha release) is better suited for this purpose. The GNOME desktop environment has been updated to version 2.26.3 (x11/gnome2), and KDE to 4.3.1 (x11/kde4). In previous versions, removing a USB storage device without unmounting its file system first resulted in a kernel panic, crashing the operating system. Release 8.0 adds USB storage hot plug functionality. For desktop users, this is a visible improvement of their user experience, giving FreeBSD the stability it needs on the desktop. Under the hood, the USB stack received a significant overhaul, fixing many long standing problems.

For users that compile their software from the FreeBSD ports collection (with around 20,000 packages that can be compiled from source), there is a simple but very effective new feature. If the hardware has a multi core processor, individual software will be built in parallel on all available cores by default. This is achieved by passing the -jX flag to make, with X the number of cores in the machine. The user can override this number with MAKE_JOBS_NUMBER in /etc/make.conf. Not all software supports this, but the most popular ports do, which speeds up compilation considerably.

One thing that hasn't changed a lot (again) is the installation utility, sysinstall. Its man page even reads "This product is currently at the end of its life cycle and will eventually be replaced". However, currently there are no signs of a replacement utility. One domain where sysinstall fails is that it doesn't support ZFS yet. As a consequence, installing a ZFS-only FreeBSD system requires a lot of manual steps.

For developers

Because the GCC compiler suite was relicensed to GPLv3 after the 4.2 release, commercial users of FreeBSD have been looking into compilers with a more liberal license. One promising project is the Clang/LLVM combination, which is a BSD-licensed C/C++ compiler suite. So the FreeBSD project is intending to use Clang/LLVM as the default compiler for the base system. This is a work in progress, and Clang/LLVM will not likely replace GCC for all third party software, because many depend on GCC-specific constructs.

Last month, FreeBSD 8 also saw the addition of Grand Central Dispatch, Apple's solution for automatic thread pool management in Mac OS 10.6 ("Snow Leopard"). The FreeBSD wiki lists the status of the GCD port and some references to give it a try. Incidentally, both Clang/LLVM and Grand Central Dispatch are backed by Apple, making the Cupertino-based company an important contributor to the future of FreeBSD.

Conclusion

It is difficult to pinpoint one unique area were FreeBSD 8 shines. The release shows improvements in a lot of areas. From kernel programmers and file system lovers to developers, administrators and even end-users, everyone will find something new. From the standpoint of a Linux user, one could ask why someone might want to choose FreeBSD over Linux. This is largely a matter of taste, but your author likes the clean FreeBSD ports system which even allows you to select build options, the excellent hands-on documentation in the FreeBSD Handbook and the quality of the man pages.

Comments (8 posted)

New Releases

AV Linux 3.0 Released

AV Linux has released version 3.0 of its Debian squeeze based distribution for multimedia creators. From the release announcement: "[P]erhaps the most notable change is the new 2.6.32 default Kernel and the now pre-installed optional 2.6.31-rt11 Realtime Kernel (available post-install). Both seem to be giving fast and reliable performance in preliminary testing however boot times have increased significantly over previous Kernels. Users should be aware that the LiveDVD may take a few minutes to configure and boot and that the few udev warnings that are displayed are harmless."

Comments (none posted)

Calculate Linux 10.0 released (Examiner.com)

Examiner.com takes a quick look at the latest release from the Russian distribution Calculate Linux. "A new version of the Calculate Linux distribution has been released. Version 10.0 has been released with a slew of new important updates and changes. The new version includes greater compatibility with Gentoo, OpenGL installation, Linux kernel 2.6.31.6, new versions of Gnome and KDE, and up to date applications."

Comments (none posted)

Fedora 12 LXDE Spin available for download

The delayed Fedora 12 LXDE Spin is now available. "Sorry it took so long. While the actual problems were solved within 2 days, it took a little longer to create the new ISO images. FESCo, the Fedora Steering Committee, had to decide how to proceed with the new images."

Full Story (comments: none)

SimplyMEPIS 8.5 beta1 Release

MEPIS has released SimplyMEPIS 8.4.90, the beta1 of MEPIS 8.5. "Warren Woodford reported on the progress in the 8.5 release cycle: "This beta includes a 2.6.32 kernel that is one patch short of the final. The next beta will probably contain kernel 2.6.32.1. We still use KDE 4.3.2 but we're hoping we can leverage the dedicated efforts of the Debian KDE Team to update to a newer version soon." Warren continued: "We've had a lot of input from users. We're trying to tweak 8.5 to reflect their suggestions and preferences. In particular, our thanks go out to the community members who designed and tested a new desktop theme for 8.5.""

Comments (none posted)

Distribution News

Fedora

Rawhide users: fasten your seat belts

For the daring folks who follow Rawhide: life is about to get interesting for a while. Fedora developers have announced that Rawhide will be moving to upstart 0.60 and to RPM 4.8.0. Both postings should be considered required reading for people with Rawhide systems.

Comments (14 posted)

Fedora Board, FESCo & FAmSCo Elections - Voting Information

Fedora elections are open until December 15, 2009. Click below for information about each election.

Full Story (comments: none)

Fedora Board appointment

Christopher Aillon will continue in his appointed seat on the Fedora Project Board for this cycle. "His term will last until the selection process following the release of Fedora 14, in accordance with the Board's established succession planning. Christopher's presence on the Board has helped our discussions on a number of subjects over the past year, and I look forward to having him continue that relationship."

Full Story (comments: none)

Fedora Board Recap 2009-12-03

Click below for a recap of the December 3, 2009 meeting of the Fedora Advisory Board. Topics include FUDCon post-mortem, Election schedule extension, Marketing & F13, and more.

Full Story (comments: none)

Fedora 13 release name

The Fedora 13 release name is "Goddard". "Thank you to the community for their suggestions, the Board for their work on additional diligence searches, and Nigel Jones for setting up the voting."

Full Story (comments: none)

SUSE Linux and openSUSE

Announcing new openSUSE Board Members

The openSUSE Board has three new members, Bryen Yunashko (non-Novell seat), Pavol Rusnak (Novell seat) and Rupert Horstkötter (non-Novell seat). "The election committee wants to thank Stephen Shaw for his tenure on the board and the new board members Bryen, Rupert and Pavol for stepping up and volunteering to serve on the openSUSE board."

Full Story (comments: none)

Ubuntu family

Call for nominations: Ubuntu Developer Membership Board

The Ubuntu Developer Membership Board (DMB) has the responsibility for approving new Ubuntu developers and granting them the appropriate privileges in Launchpad. "Now that the DMB is formally established and active, we would like to hold an election to determine its membership. Until now, the members of the Technical Board have been standing in to fulfill the functions of the DMB."

Full Story (comments: none)

ubuntu-distributed-devel mailing list created

There is a new mailing list related to Ubuntu development, ubuntu-distributed-devel. "A new list was created, as the effort involves people from Ubuntu, Bazaar and Launchpad, and cross-posting all discussions between the three lists would not work well. We now have a single list to discuss issues that involve changes to more than one of the groups. It does not mean that things decided there will be thrust upon Ubuntu developers without consultation however. While the details are thrashed out there, the changes will be open to scrutiny from the larger Ubuntu developer as any other proposal from a sub-team is."

Full Story (comments: none)

Distribution Newsletters

DistroWatch Weekly, Issue 332

The DistroWatch Weekly for December 7, 2009 is out. "FreeBSD has long been recognised as a fast, stable and reliable operating system, powering large server farms of some of the biggest web sites and search engines on the Internet. This week Jesse Smith installed the project's latest release, version 8.0, on his home server to ascertain that it works as advertised. What were his findings? Read on to find out. In the news section, Fedora project announces a lightweight variant with LXDE as the main desktop, Canonical confirms that Kubuntu 10.04 will be an LTS release, the FreeNAS project considers switching to Debian, and ClearOS presents an excellent alternative to small business - no Linux knowledge required. Also in this issue, links to interviews with Klaus Knopper from KNOPPIX and Ubuntu's Daniel Holbach, a PLD announcement of a live CD featuring the first beta of KDE 4, and another from PC-BSD which confirms that the upcoming version of the desktop FreeBSD system is now feature complete. Finally, we are pleased to announce that the recipient of the DistroWatch.com November 2009 donation is Parted Magic. Happy reading!"

Comments (none posted)

Fedora Weekly News 205

The Fedora Weekly News for December 6, 2009 is out. "Welcome to the post-FUDCon Toronto 2009 issue of Fedora Weekly News! In this issue, details on the various Fedora elections and announcement of the Fedora 13 release name, as well as news of the new Bugzilla 3.4 public beta availability. In news from the Fedora Planet, details on why Chromium is not packaged for Fedora, an upcoming Gnome Color Manager release, a guide to theming Plymouth, and much more! Updates from FUDCon Toronto and work towards Fedora 13 from the Marketing beat. In news from Ambassadors, a report on a F12 event in Nicaragua. Translation brings us news of an upcoming outage for translate.fedoraproject.org and details related to this, a draft Fedora 13 schedule, and new Localization team members. From the Design team, brainstorming on the Goddard theme, and a new mailing list for the Echo icon set. Security Advisories brings us up to date on patches for Fedora 10, 11 and 12. The Virtualization beat wraps up this issue, with details on a Red Hat Virtualization online event on 12/9, details on a new virt-manager release. Enjoy this issue of FWN!"

Full Story (comments: none)

OpenSUSE Weekly News/100

This issue of the openSUSE Weekly News covers openSUSE Board Election Update, Egbert Eich: The Future of SaX2, Ben Kevan: KDE 4.3.4 Released - openSUSE Build Service, Linux Weekly News: Firefox locks down the components directory, Linux.com/minaev: Linux Desktop Search Engines Compared, and more.

Comments (none posted)

Ubuntu Weekly Newsletter #171

The Ubuntu Weekly Newsletter for December 5, 2009 is out. "In this issue we cover: Renewed call for nominees - IRC Council, 2009 Ubuntu Server Edition user survey, UDS Lucid - Kernel Summary, An interview with Daniel Holbach, Jono Bacon: Lernid, A selection of easy merges from the Ubuntu Server Team, Finksburg, Maryland Tour, Ubuntu Party Toulouse 2009, Getting the most from bug mail, The Planet: Daniel Holbach, Matthew Helmke, Ara Pulido, & Jonathan Riddell, Forensic Cop Journal: Ubuntu Forensic, Ubuntu CE 6.0 Beta Brings Dansguardian Fix, Meeting Summaries: November 2009, and much, much more!"

Full Story (comments: none)

Interviews

Knoppix founder Klaus Knopper speaks (Linux User)

Linux User & Developer has an interview with Knoppix founder Klaus Knopper. "Klaus Knopper teaches at the Kaiserslautern University of Applied Sciences where he lectures in software engineering and software technology and occasionally gives seminars and talks about open source in various parts of the IT industry. Klaus received his diploma in electrical engineering from the Kaiserslautern University of Technology, which in German is die Technische Universität Kaiserslautern. He co-founded LinuxTag in 1996, a Linux exhibition which has not really seen any competition from anywhere. He has been a self-employed information technology consultant since 1998. As well as all of this he started the Knoppix GNU/Linux distribution. Knoppix is something of a legend as far as system administrators and computer repair technicians are concerned. Most people who know about it have a healthy respect for it. Linux User & Developer was able to catch up with Klaus in the middle of his busy schedule and ask him some questions about himself."

Comments (none posted)

Distribution reviews

A Linux answer to Windows SBS: ClearOS (ITworld)

ITworld takes a look at ClearOS. "ClearOS, formerly known as ClarkConnect, doesn't ask for its users to become expert Linux administrators. Indeed, its interface hides all of Linux's complexity away. While it's built solidly on Linux and other open-source programs, a non-technical user could use ClearOS and never know what was his server's hood."

Comments (none posted)

Page editor: Rebecca Sobol

Development

The Twisted networking framework version 9.0.0

By Forrest Cook
December 9, 2009

The Twisted project is building a Pythonic networking engine with many uses. From the Twisted home page: "Twisted is an event-driven networking engine written in Python and licensed under the MIT license." Also: "Twisted projects variously support TCP, UDP, SSL/TLS, multicast, Unix sockets, a large number of protocols (including HTTP, NNTP, IMAP, SSH, IRC, FTP, and others), and much more." See the twisted advantage for an explanation of why one would want to use Twisted to develop network applications.

LWN last looked at the Twisted project in January, 2007 when version 2.5.0 was released, the project has matured a lot since then.

[Twisted Matrix Labs]

The current version of Twisted is organized into the following categories:

  • Twisted core - the project's top level
  • Twisted conch - implements the SSH protocol
  • Twisted lore - the Twisted documentation
  • Twisted mail - implements the SMTP protocol
  • Twisted names - implements the DNS protocol
  • Twisted trail - the twisted testing framework
  • Twisted web - implements the HTTP protocol
  • Twisted web2 - implements the HTTP protocol (redux)
  • Twisted words - implements instant messaging
See the project documentation for more detailed descriptions of the various components.

Christopher Armstrong recently announced Twisted 9.0.0: "I'm happy to announce Twisted 9, the first (and last) release of Twisted in 2009. The previous release was Twisted 8.2 in December of 2008. Given that, a lot has changed! This release supports Python 2.3 through Python 2.6, though it is the last one that will support Python 2.3. The next release will support only Python 2.4 and above. Twisted: the framework of the future!"

Looking at the release notes for version 9.0.0, one can see that a large amount of work has gone into cleaning up the code and fixing bugs, with 285 bug tickets resolved. New capabilities are summed up in the release announcement:

In the core:
- The Windows IOCP reactor now supports SSL.
- The memcache protocol implementation got some nice new features.

In Twisted Web:
- There's a new HTTP client API and protocol implementation, starting
at twisted.web.client.Agent. It's still pretty low-level, but much
more flexible than the old API.
- There were many improvements to the WSGI support.

In Twisted Conch:
- PyASN1 is now used to parse SSH keys (which means you now need to
install it to use Conch).
- SFTP servers (especially on Windows) now behave a lot better.

In Twisted Mail:
- The IMAP server and client protocol implementations had many fixes.
For example, SASL PLAIN credentials now work.

In Twisted Words:
- XMPP clients now support the ANONYMOUS SASL authentication type.
- The IRC protocol implementations had many fixes.

The Twisted project appears to be alive and thriving as it continues in its evolution. This is indicated by the numerous Success Stories and the growing list of projects that use Twisted. Congratulations to the Twisted developers for continuing to make progress on this useful framework.

Comments (4 posted)

System Applications

Audio Projects

New Music Player Daemon releases

The Music Player Daemon project has announced new versions of libmpdclient and mpc. "libmpdclient version 2.1 has been released. This release adds support for C++, sticker support, a few other developer goodies and bugfixes. mpc version 0.19 has been released. This release adds the "sticker" and "replaygain" commands, implements the %position% format parameter, fixes bash completion and flushes output after idleloop iteration."

Comments (none posted)

Clusters and Grids

Release of rsplib 2.7.0

Version 2.7.0 of rsplib has been announced. "The RSPLIB project has just released version 2.7.0 of the RSPLIB Open Source RSerPool package for Linux, FreeBSD and MacOS X. RSPLIB is the Open Source implementation (GPLv3) of the IETF's new framework for Reliable Server Pooling (RSerPool), which is described in RFC 5351 to RFC 5356. If you a looking for a Grid computation solution which is simple, easy to setup and mostly self-configuring, you are probably looking for RSerPool!"

Full Story (comments: none)

Database Software

PostgreSQL Weekly News

The December 6, 2009 edition of the PostgreSQL Weekly News is online with the latest PostgreSQL DBMS articles and resources.

Full Story (comments: none)

SQLite 3.6.21 released

Version 3.6.21 of the SQLite DBMS has been announced. "SQLite version 3.6.21 focuses on performance optimization. For a certain set of traces, this version uses 12% fewer CPU instructions than the previous release (as measured by valgrind). In addition, the FTS3 extension has been through an extensive cleanup and rework and the sqlite3_trace() interface has been modified to insert bound parameter values into its output." See the change log for more information.

Comments (none posted)

Web Site Development

moin 1.8.6 released

Version 1.8.6 of moin, a Wiki Package, has been announced. "MoinMoin 1.8.6 is a bug fix release and a recommended update. The 1.8 branch brings you several new features such as the GUI editor, which allows the users to edit pages in a WYSIWYG environment, and many bug fixes."

Full Story (comments: none)

moin 1.9.0 released

Version 1.9.0 of moin, a Wiki Package, has been announced. "The 1.9 branch brings you several new features."

Full Story (comments: none)

Miscellaneous

OpenInkpot 0.2 released

Version 0.2 of OpenInkpot has been announced. "We're proud to release OpenInkpot 0.2, free and open source firmware for eBook devices with ePaper screens. During the release cycle nearly every piece of code was rewritten, so it's not feasible to provide a complete changelog."

Full Story (comments: none)

Desktop Applications

Audio Applications

Audacity 1.3.10 beta released

Version 1.3.10 (beta) of the Audacity audio file editor has been announced. "The Audacity Team is pleased to announce the release of Audacity 1.3.10 (Beta) for Windows, Mac and Linux/Unix. This release removes a significant number of crash or freeze problems and other major bugs. It brings us very close to our goal of a new 2.0 Release. "

Comments (none posted)

Desktop Environments

GNOME 2.29.3 released

Version 2.29.3 of GNOME has been announced. "The third development release of GNOME 2.29/2.30 development cycle is here !"

Full Story (comments: none)

GNOME Software Announcements

The following new GNOME software has been announced this week: You can find more new GNOME software releases at gnomefiles.org.

Comments (none posted)

KDE Software Compilation 4.4 Beta1 Released

KDE has released a first preview the KDE Software Compilation (KDE SC), 4.4 Beta1. "The first beta version of KDE SC 4.4 provides a preview and base for helping to stabilize the next version of the KDE Desktop, Applications and Development Platform. The list of changes this time around is especially long."

Full Story (comments: 64)

KDE Software Announcements

The following new KDE software has been announced this week: You can find more new KDE software releases at kde-apps.org.

Comments (none posted)

Xorg Software Announcements

The following new Xorg software has been announced this week: More information can be found on the X.Org Foundation wiki.

Comments (none posted)

Desktop Publishing

LyX 1.6.5 is released

Version 1.6.5 of LyX, a GUI front-end to the TeX typesetter, has been announced. "The release comes with many fixes and improvements. A number of newly reported crashes were fixed, new layouts and modules were included and some long-standing requests were implemented (e.g., a working LyX server on the Windows OS, finally enabling the communication with other applications such as JabRef on this platform as well)."

Full Story (comments: none)

Games

Cyphesis 0.5.22 released

Version 0.5.22 of Cyphesis has been announced by the WorldForge game project. "Cyphesis is a small to medium scale server for WorldForge games, with builtin AI. This version includes the demo game Mason which is currently in development. This release is intended for server administrators wishing to run a Mason server and World developers developing new worlds or game systems. Major changes in this version: The persistent server ruleset can now be fully managed from clients. The administrative security model has been improved. The test suite has been expanded massively. Lots of bugs have been fixed."

Comments (none posted)

GUI Packages

Qt: More, More, More (Linux Journal)

Justin Ryan looks at Nokia's release of Qt 4.6 on Linux Journal. "Qt 4.6 is packing an impressive variety of new features, from the shiny to the speedy. Graphic effects are among the selling points, including the addition of filtering, drop shadows and glow, as well as the ever-popular opacity. A new Animation Framework is also included, which offers "intuitive state machine functionality." On the speed side, Nokia claims 4.6 "challenges the conventional development notion that advanced UI capabilities normally come with a significant performance cost." An OpenGL paint engine has been added, as well as OpenVG-based 2D vector graphics, DirectFB support, and Webkit."

Comments (none posted)

Interoperability

Wine 1.1.34 announced

Version 1.1.34 of Wine has been announced. Changes include: "- Many fixes for crypto certificates support. - A lot of MSHTML improvements. - Various fixes to support the Left 4 Dead 2 DRM. - A number of OLE marshalling fixes. - More Listview improvements. - Various bug fixes."

Comments (none posted)

Mail Clients

Thunderbird 3.0 released

The Thunderbird 3.0 release is out. New features include a number of search improvements, tabbed windows, a new message archiving mechanism, an improved address book, Gmail integration, a number of performance improvements, and more. See the release notes for details.

Comments (54 posted)

Music Applications

guitarix 0.05.3-1 quick release

Version 0.05.3-1 of guitarix has been announced. "This is a quick guitarix update to cover the new release of jconvolver eg. jconv. guitarix is a simple Linux Rock Guitar amplifier and is designed to achieve nice thrash/metal/rock/blues guitar sounds. Guitarix uses the Jack Audio Connection Kit as its audio backend and brings in one input and two output ports to the jack graph."

Full Story (comments: none)

Patchage 0.4.3 released

Version 0.4.3 of Patchage, a modular patch bay for audio/MIDI systems, has been announced. "Changes this version: * Switch to waf build system * Fix compilation with GCC 4.4 * Better ALSA support * Massive performance improvements when ALSA is enabled * Center on startup".

Full Story (comments: none)

Web Browsers

First Mobile Firefox enters home stretch (cnet)

Over at cnet, Stephen Shankland looks at the upcoming release of "Fennec"—the codename for mobile Firefox. "Firefox has one big thing going for it, though: it's a close relative of the PC-based browser that today is used by about a quarter of people on the Web. [...] The link extends beyond brand familiarity. For one thing, mobile Firefox is based on the same code as the present Firefox 3.6--also a beta version due to finished by the end of 2009. For another, through a Mozilla service and browser plug-in called Weave, mobile Firefox synchronizes bookmarks, passwords, and even open tabs with the desktop version of the browser."

Comments (1 posted)

Languages and Tools

C

GCC 4.5 Status Report

The December 2, 2009 edition of the GCC 4.5 Status Report has been published. " The trunk is in regression and documentation fixes only mode, Stage 3 has ended yesterday. Release branch rules are now in effect for all changes to trunk that touch release critical parts of the compiler (primary and secondary targets, C and C++ and their runtimes). There will be a release candidate made available when there are no remaining P1 regressions on the trunk."

Full Story (comments: none)

Caml

Caml Weekly News

The December 8, 2009 edition of the Caml Weekly News is out with new articles about the Caml language.

Full Story (comments: none)

Python

Python 2.7 alpha 1 released

Version 2.7 alpha 1 of Python has been announced. "Python 2.7 is scheduled to be the last major version in the 2.x series. It includes many features that were first released in Python 3.1. The faster io module, the new nested with statement syntax, improved float repr, and the memoryview object have been backported from 3.1. Other features include an ordered dictionary implementation, unittests improvements, and support for ttk Tile in Tkinter."

Full Story (comments: none)

execnet 1.0.1 released

Version 1.0.1 of execnet has been announced. "Just uploaded execnet-1.0.1 featuring a new motto: execnet is about rapid-python deployment, be it for multiple CPUs, different platforms or python versions. This release brings a bunch of refinements and most importantly more robust termination, handling of CTRL-C and automatically tested documentation".

Full Story (comments: none)

Announcing fileutils, a UNIX inspired file system library

The fileutils project has been launched. "I am happy to announce the release of fileutils, a file system library inspired by classic UNIX programs like cp, mkdir and chmod. It is an attempt to smooth out some of the rough edges in the standard library's os and shutil modules, and create an intuitive, convenient way of working with files."

Full Story (comments: 1)

Wielaard: FUDCon Success – Systemtap meets Python

Mark Wielaard writes about adding SystemTap probes to Python on his blog. As part of the Fedora Users and Developers Conference (FUDCon) being held in Toronto, several hackers got together and added SystemTap support to Python. "The coolest part is that it works through the existing patch to python for adding dtrace support. Some small tweaks to the autoconf detection was needed, but the rest was used as is." He mentions Will Cohen's "Adding User Space Probing to an Application" document as being quite helpful in that effort.

Comments (1 posted)

Pyro 3.10 released

Version 3.10 of Pyro has been announced. "Pyro is a an advanced and powerful Distributed Object Technology system written entirely in Python, that is designed to be very easy to use. Highlights of this release are: - improvements in the SSL configuration - uses new-style classes so super() now works in Pyro objects - various minor bugfixes".

Full Story (comments: none)

Python-URL! - weekly Python news and links

The December 9, 2009 edition of the Python-URL! is online with a new collection of Python article links.

Full Story (comments: none)

Tcl/Tk

Tcl-URL! - weekly Tcl news and links

The December 6, 2009 edition of the Tcl-URL! is online with new Tcl/Tk articles and resources.

Full Story (comments: none)

IDEs

Pydev 1.5.2 released

Version 1.5.2 of Pydev, an Eclipse plugin for Python, has been announced. This release includes new features and bug fixes.

Full Story (comments: none)

Test Suites

TextTest 3.16.1 released

Version 3.16.1 of TextTest, a tool for automatic text-based functional testing, has been announced. "The main changes are around the HTML batch report, which will amongst other things now generate you a nice "dashboard" page giving the latest status of all your applications. There is also integration with the Jira bug tracker, and improvements to basic functionality like "run_dependent_text" and "collate_file"."

Full Story (comments: none)

Version Control

Git 1.6.5.5 released

Version 1.6.5.5 of the Git distributed version control system has been announced. "This is primarily to help other distros with older xmlto to partially revert the change in 1.6.5.4 to help distros with newer docbook stylesheets, but I also merged some fixes that have already been cooking and graduated to 'master' as well."

Full Story (comments: none)

Miscellaneous

Red Hat Bugzilla 3.4 public beta announced

Beta version 3.4 of Red Hat Bugzilla has been announced. "The Red Hat Bugzilla team is happy to announce the first public beta release of the next version of Red Hat Bugzilla based on the upstream 3.4 code base."

Full Story (comments: 1)

Page editor: Forrest Cook

Announcements

Commercial announcements

Introducing Google Public DNS: A new DNS resolver from Google

Google has announced Google Public DNS, an experimental public DNS resolver. "We believe that a faster DNS infrastructure could significantly improve the browsing experience for all web users. To enhance DNS speed but to also improve security and validity of results, Google Public DNS is trying a few different approaches that we are sharing with the broader web community through our documentation". (Thanks to Jay R. Ashworth).

Comments (55 posted)

Legal Announcements

Artifex launches a GPL-infringement suit against Palm

Artifex (the company behind Ghostscript) has sent out a press release describing its new lawsuit against Palm. "Palm’s own documentation admits including Artifex’s muPDF in Palm’s Pre product as the PDF rendering engine in their PDF viewer application, but Palm neither obtained a commercial license from Artifex nor complied with the terms of the GPL. Palm’s intentional refusal to comply with the terms of the GPL means that Palm willfully copied and distributed muPDF without authorization, and any and all such copies infringe Artifex’s exclusive copyright."

Comments (24 posted)

Kuhn: The Anatomy of a Modern GPL Violation

Bradley M. Kuhn of the Software Freedom Law Center (and Software Freedom Conservancy) writes about the evolution of GPL violations on his blog. Originally, the violations were from vendors shipping free software tools for proprietary UNIX systems, but now violations have mostly moved into the embedded realm. "But, if you produce a mass market product based on BusyBox/Linux, some smart software developer is going to eventually buy one. They are going to get curious, and when they poke, they'll see what you put in there. And, that developer's next email is going to be to me to tell me all about that device. In my ten years of enforcement experience, I find that a company's odds of 'getting away' with a GPL violation are incredibly low. The user community eventually notices and either publicly shames the company (not my preferred enforcement method), or they contact someone like me to pursue enforcement privately and encourage the company in a friendly way to join the FLOSS community rather than work against it."

Comments (11 posted)

Articles of interest

Intel unveils 48-core cloud computing silicon chip (BBC)

The BBC covers Intel's latest x86 processor prototype. "Intel has unveiled a prototype chip that packs 48 separate processing cores on to a chunk of silicon the size of a postage stamp. The Single-chip Cloud Computer (SCC), as it is known, contains 1.3 billion transistors, the tiny on-off switches that underpin chip technology. Each processing core could, in theory, run a separate operating system."

Comments (12 posted)

Why Open Source Phones Still Fail (PC Magazine)

PC Magazine says that open phones are failing because mobile carriers are afraid of them. "The networks can take a few mavericks that are willing to pay high prices, seek out obscure sales channels, or risk turning their phones into doorstops through jailbreaking. But the carriers know that as long as they subsidize phones, they'll control the phones are sold en masse. And those aren't going to be open devices."

Comments (50 posted)

Sugar on a Stick v2 - a.k.a. Blueberry - released (The H)

The H has a brief look at the most recent "Sugar on a Stick" release. Sugar on a Stick uses a Fedora base with the Sugar learning platform added on top, all of which can be put onto a USB stick for a portable Sugar installation. "As Sugar on a Stick 2.0 ships with the latest 0.86.3 Sugar release, it features newly redesigned toolbars, improved wireless networking, easier keyboard configuration and better Gnash support for Adobe Flash content. The Sugar Learning Platform includes several collaborative applications, which Sugar calls 'Activities'. The Browse activity now includes support for tabbed browsing and Read adds EPUB file support for e-books." See the announcement for more details.

Comments (none posted)

New Books

New from O'Reilly--Books on Google Ad Tools, Programming, Electronics, and Geometry

O'Reilly has announced the publishing of new books on Google Ad Tools, Programming, Electronics, and Geometry.

Full Story (comments: none)

Contests and Awards

Linux Foundation awards Students with free membership for the holidays

The Linux Foundation has announced its "Get One, Give One" Holiday Membership Program. "The Linux Foundation (LF), the nonprofit organization dedicated to accelerating the growth of Linux, today announced that for every new individual member who joins the organization between today and January 31, 2009, the Linux Foundation will give a free membership to a student for one year. New members can elect to sponsor a student on the Linux Foundation wait list or can request the membership be given to a friend or family member with a valid student ID."

Full Story (comments: none)

Surveys

2009 Linux Graphics Survey Results (Phoronix)

Phoronix has released the results of its 2009 graphics survey for Linux users. Nearly 14,000 responses were tallied for 13 different questions relating to Linux graphics use. "When it came to the less popular drivers, there were 485 counts towards the Nouveau driver while 361 towards NVIDIA's official open-source driver, the obfuscated xf86-video-nv driver. Last year the xf86-video-nv driver was twice as common as the xf86-video-nouveau driver, but with the Nouveau stack stabilizing and with Fedora switching to it for their default NVIDIA driver (and Ubuntu is in the process of doing so too), it is not shocking that xf86-video-nv driver is losing ground quickly. In 2010 we would not be surprised if this driver is outright abandoned by NVIDIA."

Comments (11 posted)

Calls for Presentations

Registration open for DjangoSki Conference

The DjangoSki Conference will be held on March 2-4 2010 in Whistler, Canada, the call for papers is open. "DjangoSki is a conference with a difference. It's set in the ski resort of Whistler and is half conference, half un-conference and, erm, half skiing. Come to the conference and meet with our keynote speakers: Jacob Kaplan-Moss, Matt Berg and David Ascher, then go skiing on the hills with everyone in the afternoon. Talk submission is now open. If you'd like to speak there, we'd love to hear you talk."

Full Story (comments: none)

PostgreSQL@FOSDEM 2010 - Call for talks

A call for talks has gone out for PostgreSQL@FOSDEM 2010, submissions are due by December 22. "FOSDEM is a major Free and Open Source event held annually in Brussels, Belgium, and attended by around 4000 people. As in recent years, the PostgreSQL project will have a devroom where we will be presenting a number of talks. The event will be held on the 6 - 7th February 2010. We're looking for developers, users and contributors to submit talks for inclusion on the program. Any topic related to PostgreSQL is acceptable as long as it is non-commercial in nature."

Comments (none posted)

Upcoming Events

Django Development Sprint

The next Django web platform Development Sprint has been announced. "There will be a Django Development sprint in Uptown Dallas next weekend (Dec 12 and 13). A development sprint is an excuse to get together, write some code, and have a good time doing it. The purpose of this sprint will be to help finish features and push out bug fixes in preparation for the Django 1.2 release, which feature freezes January 26. If you're interested in coming to work on other open source Django-based projects, that's welcome too."

Comments (none posted)

Speaker Slots still available for SCALE 8X

The SCALE 8X call for papers is ending soon, the conference takes place in Los Angeles, CA on February 19-21. "There are still some speaker slots available for SCALE 8X, but the Call For Papers closes December 15th. If you are considering speaking at one of the top regional Open Source conferences, we recommend you submit your proposal REAL SOON."

Full Story (comments: none)

Events: December 17, 2009 to February 15, 2010

The following event listing is taken from the LWN.net Calendar.

Date(s)EventLocation
December 12
December 17
SciPy India 2009 Kerala, India
December 19 New Mexico Linux Fest Albuquerque, NM, USA
December 27
December 30
26th Chaos Communication Congress Berlin, Germany
January 13
January 15
Foundations of Open Media Software Wellington, New Zealand
January 15
January 22
Camp KDE 2010 San Diego, CA, USA
January 18
January 23
linux.conf.au Wellington, New Zealand
January 23 Workshop on GCC Research Opportunities Pisa, Italy
January 23
January 24
DrupalSouth Wellington 2010 Wellington, New Zealand
February 2 Prague PostgreSQL Developers' Day 2010 Prague, Czech Republic
February 5
February 7
Frozen Perl 2010 Minneapolis, MN, USA
February 6 Super Happy Dev Castle #0 Belfast, N. Ireland, United Kingdom
February 6
February 7
Free and Open Source Developers' European Meeting Brussels, Belgium
February 10 Red Hat Cloud Computing Forum Online, Online
February 11
February 13
Bay Area Haskell Hackathon Mountain View, USA

If your event does not appear here, please tell us about it.

Web sites

gnome.org outage: Dec 12, 13

gnome.org will go offline on December 12-13. "Red Hat is currently in the process of consolidating all its community hosted servers to a single hosting facility. As part of that, the gnome.org servers are being moved *this weekend*. You plan on doing something other than working on GNOME this weekend, or find a programming task that doesn't rely on access to GNOME servers."

Full Story (comments: none)

Audio and Video programs

Announcing the LAM annual Best of mix 2009

The Linux Audio Musicians : Annual Mix list for 2009 has been announced. "I have been attempting to keep track of all the releases posted over the past year since the inaugural Linux Audio Musicians Best of mix was released in Nov 08. I'm pleased to announce that the latest Annual Best of Mix for 2009 is now up for your listening pleasure."

Full Story (comments: none)

First L2Ork track now available

The first Linux Laptop Orchestra performance has been recorded and is available online. "As our thanks to all who have so generously supported us both in person and through the endless corners of the internet, we've posted a track from our weekend recording session. "Citadel" is a piece for soprano and L2Ork that uses a poem by Ivan Gundulic, a famous Croatian poet from the Baroque era. The piece was recorded in a beautifully reverberant Burruss rotunda on the Virginia Tech campus."

Full Story (comments: none)

Page editor: Forrest Cook

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds