LWN.net Weekly Edition for September 9, 2016
Untangling character sets and Unicode blocks
At TypeCon 2016 in Seattle, font engineer Richard Fink kicked off the conference program with a talk entitled "Empty Space Characters In Modern Character Sets" that was, ostensibly, a look at the over two dozen space characters defined in Unicode. But that topic was merely a pretext, leading into a broader examination of how the Unicode character blocks fail to align with languages and writing systems, which makes it difficult to define "language support" in a meaningful way.
Space team
There are, as Fink said, a lot of code points defined in Unicode that amount to some form of white space. But some of them behave differently than others—such as the regular space versus the non-breaking space. And some of them have important semantic distinctions for certain writing systems or scripts, such as the zero-width joiner versus the zero-width non-joiner, which (in connected scripts like Arabic) tell the text rendering engine which variants of two adjacent letters should be used.
There are also quite a few other space characters that differ only
in their width. Fink got into the type world to do high-quality web
design, he said, and he soon realized that most fonts on the market
left out these space characters, which made it impossible to make
fine-grained adjustments to complicated layouts by inserting, say, a hair
space (code point U+200A) or a medium mathematical space (U+205F).
That was rather frustrating to discover, since all of the necessary glyph slots in the font table could easily be automatically generated. Some time later, Fink worked on the font subset-generator tool on FontSquirrel, which lets users select the sets of glyphs they want for a font and build a minimal font file containing just the glyphs of interest. He did, at that point, add a feature that would automatically generate the missing space characters.
But the encounter prompted him to look more closely at the peculiarities of Unicode. Most of the white space characters, he said, are defined in the "General Punctuation" block, which hardly makes sense, since empty space is not punctuation. Then again, the names of the other Unicode blocks are just as obtuse, featuring, for example, the ambiguous distinction between "Latin Extended" and "Latin Supplement."
That ambiguity makes it hard for two people (or two programs) to agree on what it means for a font to "support" Latin, Cyrillic, Devanagari, or any other writing system. It is even more ambiguous to define what characters are required to support a specific language. And whenever a font does not support the characters that need to appear on screen, the user gets garbled text, either "tofu" (an assortment of box symbols ), question marks, or mojibake gibberish.
Software vendors and font buyers alike would prefer to know whether or not a font support the right glyphs before they start using it. Fink recently started working with the Google Fonts project, and set his mind to finding a definitive set of standards the project could use to validate which fonts supported which scripts and languages.
Character sets
The first alleged solution in the type industry is to look outside of Unicode at character sets, which software companies have historically used to establish their own definitions of what it means to support a language or a writing system. Microsoft had one called Windows-1252 to define basic Latin-alphabet support; Apple had MacRoman, Adobe had Adobe Latin 1 through Adobe Latin 5.
But none of these character sets are an official standard; the proprietary OS vendors created their own as a matter of course because they were competitors. Those character sets are also quite old at this point and are not regarded as particularly relevant. In practice, the main alternative is Adobe's character sets, which often get used and referred to by third parties. But Adobe's sets change, seemingly without warning. Fink said that he has found multiple, conflicting versions of the Adobe character sets published as reference material in a variety of places online.
The trouble is that Adobe maintains the lists for use by its designers and developers, updating them when it needs to. But Adobe has started hosting its character-set definitions in a public repository on GitHub, so Fink got in touch with some current and former members of the type team. However, they made it clear, he said, that Adobe is not interested in maintaining the character sets as a standard or specification, either. Officially, the lists are for internal usage only and the company wants the flexibility to alter them at any time. It was not even interested in version-numbering the updates to the lists, although Fink noted that changes could be referenced by Git commits.
Adding to the trouble is the fact that Microsoft, Apple, and Adobe are all US-based companies, Fink noted, and with that comes an English-centric mindset. Languages and scripts that are "foreign" to Americans get short-changed, and the relevant character sets are more likely to contain omissions or errors. And, again, the naming of the character sets left something to be desired. "'Latin 1'? Why would I care about that; I don't do any work for the Roman Catholic Church," he observed.
Design perspective
The other tactic Fink pursued was to ask type designers what they used as their guide for implementing language support. In February 2016, he posed that question on the TypeDrawers discussion forum. He received scores of replies, but the only take away, he said, was "nobody really agrees on anything." But he did learn that type designers grapple with the same problem from a marketing angle; it is hard to advertise a font based on its Unicode-block coverage, after all.
Thus, Fink eventually decided that it was time to sit down and think about defining new character sets—and, hopefully, to define character sets without a strong US-bias. "I'm unhappy with the term 'multi-script'," which is historically used to describe fonts that offer broad language support, he noted. "Because the word 'script' has too many other definitions, particularly on the web. So I prefer 'trans-national' character sets."
Work on the character-set project is being done in the Google Fonts GitHub repository. So far, the Latin sets are defined in four cumulative levels: Core, Plus, Pro, and Expert, with each intended to enable support for a specific set of languages or use-cases. There is also a group of Cyrillic character sets (Core, Plus, Pro, and Historical); discussions are underway for other languages and the process is open to outside contributors.
Each set pulls from a variety of Unicode blocks, including utility glyphs like arrows and geometric shapes in addition to alphanumeric characters. Notably, they also include several glyphs that do not map to separate Unicode code points, such as small capitals, certain ligatures, and small numerals for scientific subscripts and superscripts. As one would expect, the space characters are included. The character sets also suggest a standardized naming scheme for the glyphs within a font's internal tables, although those names are not generally exposed to end users.
Defining support by language (rather than by script) was one of the better decisions made in the development of the FontSquirrel subset-generator, Fink said. It maps better to what the average user thinks of when evaluating the capabilities of a font. In addition, Fink noted that Dutch Type Library's OTMaster program, "without which I don't know if my life would be livable," also considers language support to be the feature of interest.
Fink ended the talk by observing that applications have some catching up to do where non-standard glyphs are concerned. Adobe InDesign is the only application he has found that even allows the user to select and insert the Unicode space characters. Web applications are underpowered in this respect, too, he said. As of HTML 5.0, all of the space characters have a named HTML character entity reference (apart from the ability to enter a character by its Unicode code point, that is). While HTML 4 supported 252 named entities, HTML 5 defines more than more than 2,000, and all major browsers understand them. It remains up to developers to make use of that feature.
What's next for Apache OpenOffice
Concerns about the viability of the Apache OpenOffice (AOO) project are not new; they had been in the air for a while by the time LWN looked at the project's development activity in early 2015. Since then, though, the worries have grown more pronounced, especially after AOO's recent failure to produce a release with an important security fix nearly one year after being notified of the vulnerability. The result is an internal discussion on whether the project should be "retired," or whether it will find a way to turn its fortunes around.The current chair of the AOO project management committee (PMC) is Dennis Hamilton, whose term is set to end shortly. He has been concerned about the sustainability of the project for some time (see this message from one year ago, for example), a concern sharpened by the routine requirement that he report to the Apache Software Foundation (ASF) board on the project's status. The board, seemingly, had asked few questions about the status of AOO until recently, when the handling of CVE-2016-1513 (or the lack thereof) came to its attention. Now the board is apparently asking some sharp questions indeed and requiring monthly (rather than every three months as usual) reports from the project. "Retirement" of the project, it seems, has been explicitly mentioned as a possibility.
Pondering retirement
In response, on September 1, Hamilton went to the AOO development list with a detailed description of what retiring the project would involve. He said:
Given that, he said, it is time to openly face the prospect that AOO is not
sustainable and needs to be wound down. ASF board member (and corporate
vice president) Jim Jagielski added that
"it has become obvious to the board that AOO has not been a healthy
project for some time.
" Given that, he said, the important thing is
to figure out what is to be done now.
This conversation has been widely reported; the result, unsurprisingly, has been a strong "we told you so" response. There has been quite a bit of rehashing of the history of the AOO project and how the current situation came to be. But Jagielski had a point when he said that most of that does not matter; what does matter is what happens next. Your editor would agree. There may be an opportunity to make things better for developers and users of free office suites, but doing so may require forgiving and forgetting quite a bit of unpleasant history.
Jagielski suggested that, while the project cannot sustain itself as an end-user-focused effort, it may be able to go forward as a framework that others could build applications with. Who those others would be was not specified. He suggested that the OpenOffice.org domain could be redirected to LibreOffice — a suggestion that still seems to be seen as heretical by many in the AOO project.
To top things off, he even said that the project might consider making an apology of sorts for the excesses of one of its advocates in the past. While his tone might be read as being less than fully sincere, one would hope that any such apology, should it be forthcoming, would be taken at its word and accepted fully. LibreOffice developers could even consider making an apology of their own (they have not been 100% perfect either), perhaps ahead of anything from AOO. The sharing of some conciliatory words could do a lot to end the hostilities of past years, enable cooperation, and bring about a solution that is good for everybody involved.
Pondering non-retirement
The above discussion, like much of the conversation on the net as a whole, has an underlying assumption that AOO will, indeed, wind down. The project has been unable to compete with LibreOffice; its commit volume and developer participation are not just lower, they are two orders of magnitude lower. LibreOffice makes regular feature and maintenance releases; AOO has been unable to put out even a single emergency security-fix release. LibreOffice has significant corporate investment driving its development; AOO, seemingly, has none since IBM ceased its involvement. The current AOO development community is too small to even hope to fully understand its (large) code base, much less make significant improvements to it. So, to many, it seems clear that AOO is not sustainable.
There are, however, AOO developers who disagree with this assessment. Some of them clearly think that AOO can be saved and saw Hamilton's message as something close to an act of sabotage. Others saw it as "liberating" and as a way to kickstart the process of bringing in new developers. AOO's remaining community has a clear attachment to the project and a strong lack of desire for any kind of accommodation with LibreOffice. It was said by a few that AOO provides an important competition for LibreOffice, though what form that competition takes when the project has not made a feature release for 2.5 years is not clear.
What is clear is that AOO needs to bring in more developers if it is
going to survive. To that end, a new recruitment mailing list has been created to
help new developers get started. Plans are forming to try to turn the
current round of publicity into a call for developers to join a
reinvigorated AOO project. Jagielski has claimed that "AOO has simply been
overloaded w/ emails from developers and other contributors offering their
help, skills, talents and support
" since the discussion started, but
that overload is not yet evident on the mailing lists.
The developers involved must surely be aware of just how big a challenge they face. Many office-suite users may not have heard of LibreOffice, but the development community is well aware of the relative health of the two projects; attracting them will continue to be hard. The state of the code base, which has not seen the sort of energy put in by LibreOffice to make development easier, will not help. There is no financial investment going into AOO and, seemingly, no plans to try to attract any; if a company did come in, it would likely end up dominating the project in short order — a situation with its own problems.
AOO also has an interesting problem that is not shared by many other
projects: it is subject to the decisions of a foundation board of directors
that is concerned about potential damage to the overall Apache brand. Even
if the AOO developers feel they are making progress, the possibility of the
board pulling the plug on them is real. As board member Greg Stein
recently said,
"PMCs do *not* want the Board involved ... it rarely turns out well
for them
". Should such a thing happen to AOO, its developers
would still have the source, of course, but would lose access to the ASF's
resources and, probably, the OpenOffice brand. With such a cloud hovering
over them, it is not surprising that AOO developers are concerned and
asking for more time.
So the challenge is real. But one thing should be kept in mind here: the free-software community is famous for proceeding in the face of "you can't possibly accomplish that" criticism and proving the critics wrong. A quick look back at what was said about the GNU project in the 1980s, or Linux in the early 1990s, will drive that lesson home. One should never underestimate what a small group of determined developers can do. If the AOO developers think they can muster the resources to manage their code base, they should probably be given the space — by the ASF board and the world as a whole — to try.
The board, though, would be right to want some specific milestones to demonstrate that the project is back in good health and able to meet its users' needs. Apache OpenOffice cannot continue to distribute software that it cannot fix and cannot keep secure, using a well-known trademark to keep up a user base that may be unaware that there is little underneath. One way or another, that is a situation that needs to be fixed.
It is rare for the community to talk overtly about shutting down a project; usually, projects either just fade away or they are killed by a parent company with little warning. It is the type of discussion that we naturally tend to shy away from. But, like people, projects have a life cycle and do not last forever. Facing up to that cycle can motivate developers to rejuvenate a project or, at worst, can help minimize the pain caused by a shutdown. The AOO project has thus begun an important conversation; quite a bit rides on how it ends.
Security
Toward measured boot out of the box
Matthew Garrett began his Linux Security Summit talk by noting that the "security of the boot chain is vital" to having secure systems. It does not matter if the kernel can protect itself, referring to the talk just prior to his; if the boot process can be manipulated, those protections are immaterial. So, he wanted to present where things stand with regard to securing the boot chain.
In the Linux world, UEFI Secure Boot is the primary boot protection mechanism; it requires that the bootloader be signed by a key that is trusted by the firmware or the system won't boot. There are also various solutions for embedded devices that are typically implemented by the system on chip (SoC). The trust is rooted in the firmware in either case; if someone can modify the firmware, all bets are off.
![Matthew Garrett [Matthew Garrett]](https://static.lwn.net/images/2016/lss-garrett-sm.jpg)
Beyond that, most of the existing mechanisms provide no way to prove that the verification of the code to be booted has been done. The running kernel has no way to know that it is running on a base that has been integrity checked—or even whether the kernel itself has been tampered with—any query it could make could be answered with a fake "yes".
That kind of attack generally requires privileged access to the hardware, which is a hazard in its own right, so why would those kinds of attacks matter, he asked. One problem area is that there are providers of "bare metal" servers for users who want the convenience of the cloud without its usual performance penalty. Users of those systems will have root privileges, which will allow them to access the hardware, including potentially permanently changing the firmware to something malicious.
He posited a scenario where an attacker would take out a large number of short-term leases on hardware at a site that is known to be used by the victim. Each system is then infected with malicious firmware and "returned" to the pool at the hosting company. Some of those systems will eventually be picked up by the victim; "Secure Boot will not help you" in that situation, he said.
Another worrisome possibility is for laptops that are surrendered when passing through borders. Perhaps it is overly paranoid to be worried about permanent firmware changes being made at the border, he said, but it is at least worth thinking about. While there is not much that can be done to protect against hardware-based attacks (e.g. adding some malicious hardware to a laptop or server), most of the other kinds of attacks can be handled.
TPM to the rescue
The Trusted Platform Module (TPM) is a bit of hardware that can help. When it was first introduced it got a bad reputation because it was "easy to portray it as a DRM mechanism", though it is difficult to deploy that way and no one has actually done so. TPMs are small chips, made by several different manufacturers, that are generally differentiated by their performance and amount of NVRAM storage they provide. TPM implementations also have "a bewildering array of different bugs", Garrett said.
TPMs have several functions, but the one of interest for ensuring that the boot process has not been tampered with uses the platform configuration registers (PCRs). They are normally 16-24 registers that are not directly accessible outside of the chip; all access is mediated by the rules of the TPM. PCRs are 20 bytes long in TPM 1.2, which is the length of an SHA-1 hash; TPM 2.0 allows for multiple hash algorithms, so the number and size of the PCRs changes to support them.
Ensuring tamper-free boot means that each step of the process must be "measured", which effectively means calculating a cryptographic hash of the binary. Each step in the boot process would measure the next, so the firmware measures the bootloader, the bootloader measures the kernel and initial ramdisk (initrd), and so on. The PCRs provide a tamper-proof mechanism to assist in the measurement process.
One cannot store a value directly into a PCR; instead the TPM must be asked to store the value, which it does in a way that provides integrity to the result. Instead of just storing the value, which would allow any program with access to the hardware to set it to the "right" value, it concatenates the existing value in the PCR and the written value (typically the hash of the measured data) and hashes the result. So, in order to reproduce the value in a given PCR, the same measurements must be written to the register in the same order.
There is also a log associated with the TPM. Each measurement adds an entry to the log that records what was measured and what the hash was. While untrusted code can overwrite the log, he said, that turns out not to be as much of a problem as it sounds.
All x86 firmware has measurement capabilities, though sometimes there are problems with what they can measure. For example, there was firmware he encountered that would measure code that came from disk, but not code that came via a network boot, which kind of misses the point. But that firmware has since been fixed.
Bootloader support
There is no Linux bootloader that supports measurement, however. At one time, TrustedGRUB could be used, but it is now "old and busted"; it worked, but it "wasn't particularly nice", Garrett said. Rohde & Schwarz Cybersecurity have developed TrustedGRUB2, which supports using the TPM, but it has some shortcomings. In particular, it does not support UEFI or TPM 2.0. So, Garrett and others have added code to GRUB 2 to support measuring the kernel and other components at boot time (in this GitHub repository).
There is more to measure than just the kernel, however. The booted state of the system is affected by many other components and configuration files. The kernel command line is relevant, as is the GRUB configuration, since GRUB has a scripting interface that can make hardware changes.
But putting each individual configuration piece into its own PCR does not scale because there are a limited number of them. So there is a need to reuse PCRs, but the final value of the PCR will depend on the order in which those items were measured. Trying to establish a strict ordering is something he would like to avoid. There is also the problem that unimportant changes to configuration files (e.g. comments) will still cause the final hash value to be different. For those and other reasons, using the PCRs that way is suboptimal, he said.
Instead, though, the log file can be used. It can be overwritten with invalid data, but that can be detected by replaying the log and calculating the hashes independently. There are two formatting possibilities for the log messages that Garrett described. The first would log a description of the binary and its hash, which is fine for a small number of binaries. That doesn't work so well for configuration information, though, because it may have unimportant changes that alter the hash. For those, the log entry would contain the text that has been hashed in conjunction with its hash.
Then there needs to be a policy file that describes the acceptable hashes for binaries as well as the allowable text for configuration (using regular expressions for parameters and the like). Creating that policy may be rather troublesome, though. His employer, CoreOS, builds the policy automatically for each release. The policy is not complete, however, since it needs known-good hashes for the firmware on the system and no firmware vendor he knows provides that information. So CoreOS users must extract the values from a known-good system, which will work fine unless the firmware is upgraded at some point.
While it is easy for CoreOS to provide an initial RAM filesystem (initramfs) and its hash, other distributions build the initramfs on the user's system when the kernel or other components are updated. Timestamps then get into the binary, which means the hash is different for each. Some kind of generic initramfs using reproducible build mechanisms would alleviate that problem.
There is also a question of where the boot data gets stored. If it is stored in the initramfs, that will change the hash, so he suggested using UEFI variables for some information and the TPM for keys. In a process known as "sealing", the TPM can store encrypted information that it will only decrypt if certain PCRs have the right values to show that the boot process has not been tampered with. Having sealed keys for tpmtotp (Time-based one-time password, TOTP, attestation using the TPM), disk encryption, or SSH would ensure that the data is only available to properly booted systems.
One problem that has not yet been solved is handling firmware or operating system upgrades. There needs to be a mechanism to unseal values and reseal them based on the upgraded system. So far, no solution to that problem has been found.
Intel's Trusted Execution Technology (TXT) is supposed to make this all easier, he said, but that isn't the case. TXT is based on a dynamic root of trust, rather than the static root of trust used by TPM, which in theory would sidestep some of the problems that the TPM-based boot integrity has encountered. But TXT has "no meaningful support for Secure Boot" and it is also incompatible with runtime UEFI. In effect, Garrett said, TXT is not compatible with the way we boot operating systems.
To do
There are still things that need to be done before this gets into the hands of users. Support for it needs to ship in bootloaders; the firmware in desktop systems is likely to have lots of different bugs that may cause systems using this feature not to boot, so there is a lot of testing work to be done there. Firmware vendors and distributions will need to start shipping known-good measurements. The firmware upgrade process will need to be integrated with updating the measurement information and there will need to be ways to create initramfs images deterministically. But we are getting closer to having measured boot right out of the box.
One audience member wondered about the patches to GRUB 2 and whether those would be making their way upstream. Garrett said that he plans to do that; he has talked to Richard Stallman and convinced him that what was being done was "not intrinsically evil", which was met with audience applause. Garrett joked that he hoped that would find its way into his annual performance review.
GRUB 2 has a new maintainer who is more active, he said, which should help getting this work upstream. There is one problem, however, in that the GRUB 2 project requires copyright assignment and some of the code comes from TrustedGRUB, which he can't assign. He is looking to resolve that since he does not want out-of-tree patches.
[I would like to thank the Linux Foundation for travel support to attend the Linux Security Summit in Toronto.]
AMD memory encryption technologies
Today's virtual machines (VMs) have a variety of protections from their brethren, but hypervisor or kernel bugs can allows guests to access the memory of other guests. In addition, providers of VMs can see the memory of any of the guests, so users of public clouds have to place a lot of trust in their provider. AMD has some upcoming features in its x86 processors that will encrypt memory in ways that alleviate some of these problems. David Kaplan gave a presentation about these new technologies at the Linux Security Summit in Toronto.
![David Kaplan [David Kaplan]](https://static.lwn.net/images/2016/lss-kaplan-sm.jpg)
The motivation for these features is the cloud environment. Currently, the hypervisor must enforce the isolation between guests through a variety of means: hardware virtualization support, page tables, VM intercepts, and so on. But sometimes those break down, leading to various vulnerabilities that allow guests to access other guests, which is scary, he said.
But users are required to trust their cloud providers since they have full access to all guest memory to extract secrets or even to inject code into VMs. The cloud providers would rather not have that power, Kaplan said; they do not want to be able to see their customers' data. For one thing, that protects the providers from "rogue admin" attacks, where a disgruntled employee uses the unwanted access to attack a customer.
That kind of attack, as well as those where a guest gets access to another guest's memory, are "user-access attacks", he said. AMD is targeting those as well as "physical-access attacks", where someone with access to the hardware can probe the physical DRAM interface or freeze and steal the memory chips (e.g. a cold boot attack). How important it is to resist those and other, similar attacks depends on who you talk to, he said.
There are two separate features—Secure Memory Encryption (SME) and Secure Encrypted Virtualization (SEV)—that both use the same hardware support that will be provided in upcoming processors. That support includes an AES-128 hardware engine inline with the RAM and memory controller so that memory can be encrypted and decrypted on the way in and out of the processor with "minimal performance impact". The data inside the processor (e.g. registers, caches) will be in the clear; there will just be a "little extra latency" when RAM is involved.
All of the keys will be managed within the SoC by the AMD Secure Processor, which is a separate 32-bit ARM Cortex A5 that is present on recent SoCs. It runs a secure (closed source) operating system and enables hardware-validated boot. It is used in some laptops as a firmware Trusted Platform Module (TPM). The secure processor will only run AMD-signed code; it also provides cryptographic key generation and management functions.
Of the two features, SME is the simplest. It uses a single key that is generated at boot time using the random-number generator to transparently encrypt pages that have been marked with a special "encrypted" bit in the page-table entry. The operating system or hypervisor manages which pages will be encrypted in RAM by use of that bit. There is support for hardware devices to DMA to and from encrypted memory as well. SME is targeted at thwarting physical-access attacks, since the contents of memory will be inaccessible without the key that is not accessible outside of the secure processor.
SEV, on the other hand, is more complicated. It has multiple encryption keys in the design and is meant to protect guests' memory from each other and from the hypervisor. The eventual goal, Kaplan said, is for the hypervisor to have no view into the guest.
There are keys for the hypervisor and for each VM, though groups of VMs could share keys and some VMs might be unsecured. SEV cryptographically isolates the guests and hypervisor to the point where cache lines (which are unencrypted) are tagged with an ID that specifies which address space they belong to; the processor will prevent guests from accessing the cache of other guests.
The owner of a guest is a "key player" in using SEV, Kaplan said. Information like secrets and policies will need to be transferred to the secure processor using the hypervisor to transport that data. Since the hypervisor is untrusted in this model (so that cloud providers do not have access to customer secrets), the guest owner will create a secure channel to the secure processor (through the hypervisor) using Diffie-Hellman (DH) key exchange.
Launching a guest is a somewhat complicated process; Kaplan's slides [PDF] may be of interest for those who want more details. The hypervisor begins by loading an unencrypted BIOS or OS image into memory. The guest owner then supplies their DH key and the hypervisor facilitates the creation of a secure channel between the guest owner and the secure processor (without being able to eavesdrop on the traffic). Part of that exchange will provide the guest owner with a certificate that allows them to prove that they are truly talking to the secure processor.
The hypervisor then allocates an "address space identifier" (ASID), which is what identifies the guest (and the key for that guest's memory). That ASID is provided to the secure processor with a request to generate or load a key into the AES engine and to encrypt the BIOS/OS image using that key. The hypervisor then sets up and runs the guest using the ASID assigned; the memory controller, AES engine, and secure processor will work together to ensure that the memory is encrypted and decrypted appropriately.
The hypervisor will also send a "launch receipt" to the user that includes a measurement (hash) of the image and some platform authentication information. If the user is provided with the right measurement, they can then provide secrets like disk encryption keys to the guest over a secure channel (e.g. TLS).
There are two levels of page tables: one for the guest and one for the hypervisor. The guest tables determine whether the memory is private or is shared with the hypervisor. All executable pages are private (no matter the setting), as are the guest's page tables. Data pages can be either, but DMA must use shared pages.
A common question that is asked is in regards to the ASID: couldn't the hypervisor "spoof" a different ASID? The answer is that it could, but it wouldn't really gain it anything. If it tries walking the guest page tables or executing code using the wrong key, it will not be particularly successful. SEV is meant to block a range of attacks, both physical and user access; the intent is to reduce the attack surface even more in coming years.
In order to use SEV, both hypervisors and guests will need to change to support it. There are a number of software components required, some that AMD expects to ship and others that it is working with the open-source community on. The secure processor firmware is distributed in binary form and the source is not public. There is a Linux driver to support the secure processor that has been posted for review. The open-source hypervisor support is also being worked on.
There was a question about why AMD had not used the TPM API for its secure processor. Kaplan said there was interest in a simpler API that focused on the VM launch cycle. But the API is available and is only in beta at this point, so those interested should comment. Also, as is often the case with processor features, Kaplan was unable to say when SoCs with either feature would be available.
[I would like to thank the Linux Foundation for travel support to attend the Linux Security Summit in Toronto.]
Brief items
Security quotes of the week
A day or two later I had a fairly complicated self-modifying ROP chain to make the necessary C++ virtual calls to interact with other services from the new, heavily sandboxed, mediaextractor and I was ready to start working on the privilege elevation into system_server. However, every time I tested, attempts to lookup the system_server services failed - and looking in the logs I realised that I’d misunderstood the selinux policy. While the mediaextractor was allowed to make binder calls; it wasn’t permitted to lookup any other binder services! Privilege elevation on N would instead require exploiting an additional, distinct vulnerability.
Rob Fuller, a principal security engineer at R5 Industries, said the hack works reliably on Windows devices and has also succeeded on OS X, although he's working with others to determine if it's just his setup that's vulnerable. The hack works by plugging a flash-sized minicomputer into an unattended computer that's logged in but currently locked. In about 20 seconds, the USB device will obtain the user name and password hash used to log in to the computer. Fuller, who is better known by his hacker handle mubix, said the technique works using both the Hak5 Turtle ($50) and USB Armory ($155), both of which are USB-mounted computers that run Linux.
Building a new Tor that can resist next-generation state surveillance (ars technica)
Here's a lengthy ars technica article on efforts to replace Tor with something more secure. "As a result, these known weaknesses have prompted academic research into how Tor could be strengthened or even replaced by some new anonymity system. The priority for most researchers has been to find better ways to prevent traffic analysis. While a new anonymity system might be equally vulnerable to adversaries running poisoned nodes, better defences against traffic analysis would make those compromised relays much less useful and significantly raise the cost of de-anonymising users."
A bite of Python (Red Hat Security Blog)
On the Red Hat Security Blog, Ilya Etingof describes some traps for the unwary in Python, some that have security implications. "Being easy to pick up and progress quickly towards developing larger and more complicated applications, Python is becoming increasingly ubiquitous in computing environments. Though apparent language clarity and friendliness could lull the vigilance of software engineers and system administrators -- luring them into coding mistakes that may have serious security implications. In this article, which primarily targets people who are new to Python, a handful of security-related quirks are looked at; experienced developers may well be aware of the peculiarities that follow." (Thanks to Paul Wise.)
New vulnerabilities
389-ds-base: information disclosure
Package(s): | 389-ds-base | CVE #(s): | CVE-2016-4992 | ||||||||||||||||||||||||||||||||
Created: | September 7, 2016 | Updated: | November 3, 2016 | ||||||||||||||||||||||||||||||||
Description: | From the Red Hat bugzilla:
A vulnerability in 389-ds-base was found that allows to bypass limitations for compare and read operations specified by Access Control Instructions. When having LDAP sub-tree with some existing objects and having BIND DN which have no privileges over objects inside the sub-tree, unprivileged user can send LDAP ADD operation specifying an object in (supposedly) inaccessible sub-tree. The returned error messages discloses the information when the queried object exists having the specified value. Attacker can use this flaw to guess values of RDN component by repeating the above process. | ||||||||||||||||||||||||||||||||||
Alerts: |
|
canl-c: proxy manipulation
Package(s): | canl-c | CVE #(s): | |||||||||
Created: | September 2, 2016 | Updated: | September 8, 2016 | ||||||||
Description: | From the Fedora advisory: This is a hotfix for proxy DN manipulation vulnerabilities. | ||||||||||
Alerts: |
|
charybdis: incorrect SASL authentication
Package(s): | charybdis | CVE #(s): | CVE-2016-7143 | ||||
Created: | September 7, 2016 | Updated: | September 8, 2016 | ||||
Description: | From the Debian advisory:
It was discovered that incorrect SASL authentication in the Charybdis IRC server may lead to users impersonating other users. | ||||||
Alerts: |
|
chromium: multiple vulnerabilities
Package(s): | chromium | CVE #(s): | CVE-2016-5147 CVE-2016-5148 CVE-2016-5149 CVE-2016-5150 CVE-2016-5151 CVE-2016-5152 CVE-2016-5153 CVE-2016-5154 CVE-2016-5155 CVE-2016-5156 CVE-2016-5157 CVE-2016-5158 CVE-2016-5159 CVE-2016-5160 CVE-2016-5161 CVE-2016-5162 CVE-2016-5163 CVE-2016-5164 CVE-2016-5165 CVE-2016-5166 CVE-2016-5167 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created: | September 2, 2016 | Updated: | September 13, 2016 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | From the Arch Linux advisory: CVE-2016-5147 CVE-2016-5148 (cross-site scripting): Universal XSS in Blink. CVE-2016-5149 (script injection): Script injection in extensions. CVE-2016-5150 (arbitrary code execution): Use after free in Blink. CVE-2016-5151 (arbitrary code execution): Use after free in PDFium. CVE-2016-5152 CVE-2016-5154 CVE-2016-5157 CVE-2016-5158 CVE-2016-5159 (arbitrary code execution): Heap overflow in PDFium. CVE-2016-5153 (arbitrary code execution): Use after destruction in Blink. CVE-2016-5155 CVE-2016-5163 (address bar spoofing): Address bar spoofing. CVE-2016-5156 (arbitrary code execution): Use after free in event bindings. CVE-2016-5160 CVE-2016-5162 (access restriction bypass): Extensions web accessible resources bypass. CVE-2016-5161 (arbitrary code execution): Type confusion in Blink. CVE-2016-5164 (address bar spoofing): Universal XSS using DevTools. CVE-2016-5165 (script injection) Script injection in DevTools. CVE-2016-5166 (smb relay attack): SMB Relay Attack via Save Page As. CVE-2016-5167 (arbitrary code execution): Various fixes from internal audits, fuzzing and other initiatives. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Alerts: |
|
ganglia: cross-site scripting
Package(s): | ganglia | CVE #(s): | |||||||||
Created: | September 6, 2016 | Updated: | September 8, 2016 | ||||||||
Description: | From the Red Hat bugzilla:
A reflected XSS issue was found in ganglia-web. This issue was fixed in the 3.7.2 release. | ||||||||||
Alerts: |
|
gd: out-of-bounds read
Package(s): | gd | CVE #(s): | CVE-2016-6905 | ||||||||
Created: | September 1, 2016 | Updated: | September 8, 2016 | ||||||||
Description: | From the openSUSE advisory: Out-of-bounds read in function read_image_tga in gd_tga.c. | ||||||||||
Alerts: |
|
icu: code execution
Package(s): | icu | CVE #(s): | CVE-2016-6293 | ||||||||||||||||||||||||
Created: | September 8, 2016 | Updated: | November 21, 2016 | ||||||||||||||||||||||||
Description: | From the Debian-LTS advisory:
This update fixes a buffer overflow in the uloc_acceptLanguageFromHTTP function in ICU. | ||||||||||||||||||||||||||
Alerts: |
|
java: unspecified vulnerability
Package(s): | java-1_7_1-ibm | CVE #(s): | CVE-2016-3485 | ||||||||||||||||||||||||||||
Created: | September 8, 2016 | Updated: | September 22, 2016 | ||||||||||||||||||||||||||||
Description: | From the SUSE CVE entry:
Unspecified vulnerability in Oracle Java SE 6u115, 7u101, and 8u92; Java SE Embedded 8u91; and JRockit R28.3.10 allows local users to affect integrity via vectors related to Networking. | ||||||||||||||||||||||||||||||
Alerts: |
|
jsch: path traversal
Package(s): | jsch | CVE #(s): | CVE-2016-5725 | ||||||||
Created: | September 6, 2016 | Updated: | September 22, 2016 | ||||||||
Description: | From the Debian LTS advisory:
It was discovered that there was a path traversal vulnerability in jsch, a pure Java implementation of the SSH2 protocol. | ||||||||||
Alerts: |
|
kernel: three vulnerabilities
Package(s): | kernel | CVE #(s): | CVE-2016-3857 CVE-2016-6480 CVE-2016-7118 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created: | September 6, 2016 | Updated: | September 20, 2016 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | From the CVE entries:
The kernel in Android before 2016-08-05 on Nexus 7 (2013) devices allows attackers to gain privileges via a crafted application, aka internal bug 28522518. (CVE-2016-3857) Race condition in the ioctl_send_fib function in drivers/scsi/aacraid/commctrl.c in the Linux kernel through 4.7 allows local users to cause a denial of service (out-of-bounds access or system crash) by changing a certain size value, aka a "double fetch" vulnerability. (CVE-2016-6480) fs/fcntl.c in the "aufs 3.2.x+setfl-debian" patch in the linux-image package 3.2.0-4 (kernel 3.2.81-1) in Debian wheezy mishandles F_SETFL fcntl calls on directories, which allows local users to cause a denial of service (NULL pointer dereference and system crash) via standard filesystem operations, as demonstrated by scp from an AUFS filesystem. (CVE-2016-7118) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Alerts: |
|
kibana: two vulnerabilties
Package(s): | Kibana | CVE #(s): | |||||
Created: | September 8, 2016 | Updated: | September 8, 2016 | ||||
Description: | From the Red Hat advisory:
* A flaw was found in Kibana's logging functionality. If custom logging output was configured in Kibana, private user data could be written to the Kibana log files. A system attacker could use this data to hijack sessions of other users when using Kibana behind some form of authentication such as Shield. * A cross-site scripting (XSS) flaw was found in Kibana. A remote attacker could use this flaw to inject arbitrary web script into pages served to other users. | ||||||
Alerts: |
|
libksba: denial of service
Package(s): | libksba | CVE #(s): | |||||||||||||
Created: | September 2, 2016 | Updated: | September 22, 2016 | ||||||||||||
Description: | From the Fedora bug report: It was found that an unproportionate amount of memory is allocated when parsing crafted certificates in libskba, which may lead to DoS. Moreover in libksba 1.3.4, allocated memory is uninitialized and could potentially contain sensitive data left in freed memory block. | ||||||||||||||
Alerts: |
|
libstorage: password disclosure
Package(s): | libstorage | CVE #(s): | CVE-2016-5746 | ||||
Created: | September 8, 2016 | Updated: | September 8, 2016 | ||||
Description: | From the openSUSE advisory:
This update for libstorage fixes the following issues: - Use stdin, not tmp files for passwords (bsc#986971, CVE-2016-5746) | ||||||
Alerts: |
|
libtomcrypt: signature forgery
Package(s): | libtomcrypt | CVE #(s): | CVE-2016-6129 | ||||||||
Created: | September 7, 2016 | Updated: | November 7, 2016 | ||||||||
Description: | From the Debian LTS advisory:
It was discovered that the implementation of RSA signature verification in libtomcrypt is vulnerable to the Bleichenbacher signature attack. If an RSA key with exponent 3 is used it may be possible to forge a PKCS#1 v1.5 signature signed by that key. | ||||||||||
Alerts: |
|
mailman: password disclosure
Package(s): | mailman | CVE #(s): | CVE-2016-6893 | ||||||||||||||||
Created: | September 2, 2016 | Updated: | November 2, 2016 | ||||||||||||||||
Description: | From the Debian advisory: It was discovered that there was a CSRF vulnerability in mailman, a web-based mailing list manager, which could allow an attacker to obtain a user's password. | ||||||||||||||||||
Alerts: |
|
mozilla-thunderbird: unspecified vulnerabilities
Package(s): | mozilla-thunderbird | CVE #(s): | |||||||||||||
Created: | September 1, 2016 | Updated: | October 3, 2016 | ||||||||||||
Description: | The Slackware package of mozilla-thunderbird was updated to version 45.3, noting that "this release contains security fixes and improvements." So far, the upstream release has not specified which security fixes are included. | ||||||||||||||
Alerts: |
|
tiff3: two vulnerabilities
Package(s): | tiff3 | CVE #(s): | CVE-2016-3623 CVE-2016-6223 | ||||||||||||||||||||||||||||||||||||||||||||
Created: | September 6, 2016 | Updated: | September 8, 2016 | ||||||||||||||||||||||||||||||||||||||||||||
Description: | From the Debian LTS advisory:
Several security vulnerabilities were discovered in tiff3, a library providing support for the Tag Image File Format (TIFF). An attacker could take advantage of these flaws to cause a denial-of-service against an application using the libtiff4 or libtiffxx0c2 library (application crash), or potentially execute arbitrary code with the privileges of the user running the application. | ||||||||||||||||||||||||||||||||||||||||||||||
Alerts: |
|
tomcat: redirect HTTP traffic
Package(s): | tomcat | CVE #(s): | CVE-2016-5388 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created: | September 7, 2016 | Updated: | November 3, 2016 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: | From the CVE entry:
Apache Tomcat through 8.5.4, when the CGI Servlet is enabled, follows RFC 3875 section 4.1.18 and therefore does not protect applications from the presence of untrusted client data in the HTTP_PROXY environment variable, which might allow remote attackers to redirect an application's outbound HTTP traffic to an arbitrary proxy server via a crafted Proxy header in an HTTP request, aka an "httpoxy" issue. NOTE: the vendor states "A mitigation is planned for future releases of Tomcat, tracked as CVE-2016-5388"; in other words, this is not a CVE ID for a vulnerability. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Alerts: |
|
Page editor: Jake Edge
Kernel development
Brief items
Kernel release status
The current development kernel is 4.8-rc5, released on September 4. Linus said: "So rc5 is noticeably bigger than rc4 was, and my hope last week that we were starting to calm down and shrink the releases seems to have been premature. [...] Not that any of this looks worrisome per se, but if things don't start calming down from now, this may be one of those releases that will need an rc8. We'll see."
Stable updates: 4.7.3, 4.4.20, and 3.14.78 were released on September 7. Note that the 3.14 long-term series is finally coming to an end, with only one more update planned.
Quotes of the week
What is missing is the realization that we already have such a tree, where everybody (not just the embedded folks) are collaborating on features.
The upstream kernel.
The day the Android people say that for a Nexus(-ish) device it's gonna be all upstream kernel and they will pick the SoC that delivers that, then things will happen.
Kernel development news
Audit, namespaces, and containers
Richard Guy Briggs works on the kernel's audit subsystem for Red Hat and has run into some problems with the interaction between the audit daemon (auditd) and namespaces. He gave a report on those difficulties to the Linux Security Summit in Toronto. In the talk, he also looked at containers and what they might mean in the context of audit.
![Richard Guy Briggs [Richard Guy Briggs]](https://static.lwn.net/images/2016/lss-briggs-sm.jpg)
Audit was started in 2004, around the same time that the kernel started using Git. It is a "syslog on steroids", he said. Syslog is used a lot for debugging, but audit is meant as a secure audit trail to log kernel and other events in a way that could be used in court. There are configurable filters in the kernel for what events should be logged and it has the auditd user-space daemon that can log to disk or the network.
Audit only reports on behavior; it does not actively interfere with what is going on in the system. There is one exception, though: audit can panic the system if it cannot log its data.
Briggs then went through a bit of an introduction to namespaces in Linux, noting that they are a kernel-enforced user-space view of the resource being namespaced. There are seven different namespaces in Linux; three are hierarchical in nature (PID, user, and control groups), which means their permissions and configuration are inherited from the parent namespace, while the other four are made up of peer namespaces (mount, UTS, IPC, and net).
He is not sure that anyone actually uses IPC namespaces, he said, but the net namespace is one of the easier ones to understand. Network devices can be assigned to a net namespace from the initial net namespace, so each namespace can have its own firewall rules, routing, and so on. If two namespaces need to talk, a virtual ethernet pair can be set up between them.
The user namespace has been "the most contentious one so far", as there are a number of "security traps" in allowing unprivileged users to be root within the namespace. Many distributions don't enable the feature by default at this point. The control groups (cgroups) namespace, which is the most recent namespace (added in 4.6), is meant to hide system-resource limits so that processes only see what resources have been allocated to their cgroup.
Namespaces are one component of the concept of containers, but there really is no hard definition of containers, Briggs said. In fact, there are almost as many definitions as there are users of containers. There is some general agreement that containers use a combination of namespaces, cgroups, and seccomp to partition some portion of the system into its own world.
But the kernel has no concept of a container at all. Managing containers is left up to a user-space container-orchestration system of some kind. From an audit perspective, though, there is interest in having some knowledge of containers in the kernel. That might be through some form of "container ID" or simply by collecting up the namespace IDs that correspond to the container.
Problems
With that introductory material out of the way, he turned to the problems, which boil down to a Highlander quote: "There can be only one." The "one" in this case is auditd, which runs in the initial namespace but must be reachable from the other namespaces. For the mount, UTS, and IPC namespaces, there have been no problems, but others do have a variety of issues.
For example, the net namespace partitions netlink sockets (which processes use to talk to the audit subsystem) so that only processes in the initial network namespace can send their audit messages. That broke various container implementations because things like pluggable authentication modules (PAM) would try to write an audit message and get an unexpected error return. Instead of the ECONNREFUSED error that it expected when auditd cannot be reached, PAM-using programs (e.g. the login process) would get EPERM and fail such that users could not log in. The short-term solution for that was to simply "lie" in non-initial namespaces and return the expected error message so that user-space programs do not break.
For PID namespaces, the problem cropped up with vsftpd authentication that wanted to write a log message to auditd. Until 3.15, that could only be done from the initial PID namespace, where processes could see the PID of auditd. Some distributions put vsftpd in its own PID namespace, however, which meant that vsftpd could not talk to auditd. By adding the CAP_AUDIT_WRITE capability to the program and adding some code in 3.15, though, that could be worked around.
PID namespaces also present another problem for audit: the PIDs that get reported are not the "real" PIDs in the system. Processes within a PID namespace get their own PID range that is separate from the PIDs in the parent namespace (which might be the initial namespace where the real system PIDs are used). So audit needed to do a translation of the PID reported from non-initial PID namespaces. Someday, when CAP_AUDIT_CONTROL is allowed in PID namespaces (so that processes with that capability can configure the audit filters), there will need to be more cleanup done on the PID handling in the kernel, he said.
Allowing multiple auditd processes in the system would be reasonable if they are tied to user namespaces. There was an idea "thrown around" about creating a new audit namespace, but it became clear that yet another namespace was not a particularly popular idea. Having one auditd per user namespace still requires some process having CAP_AUDIT_CONTROL within the namespace. He wondered if the process creating the user namespace also needed that capability.
Beyond that, the configuration of audit running in the initial namespace cannot be changed from inside user namespaces even with the capability. In particular, only the initial namespace audit can panic the system; instead of that, the audit in a user namespace might instead kill off the user namespace and all its children if it cannot log (thus wants to panic). So each user namespace will get its own set of audit rules (a "rulespace") and its own event queue. Originally it was thought that the event queue might be shared by all of the auditd processes, but a single one that overflowed the queue would affect the rest of the system, which is unacceptable, Briggs said.
There is interest in being able to track containers by some kind of ID. There was a proposal in 2013 to use the /proc inode number that uniquely identifies each namespace in the audit log messages. He felt that was harder to use, so he prototyped a simple incrementing serial number for each namespace. The checkpoint/restore in user space (CRIU) developers were not happy with that, since those numbers would not easily translate during a migration.
Eventually, Briggs reworked the inode-number-based scheme to work with the namespace filesystem (nsfs). Each event then has a set of namespace IDs along with a device ID for the nsfs. That allows container orchestration systems to track the information, even across migrations, which allows them to aggregate logs from multiple hosts.
An alternative would be to add a "container ID" that would be set by the orchestration system and tracked in the task structure. The container ID would be inherited by children and audit events would contain the ID. There is precedent for this kind of ID, he said; session IDs are not something the kernel itself knows anything about, but it helps user space manage those values.
In conclusion, he said that namespace support for audit is largely working at this point, though changes for net and PID namespaces will be needed down the road. There is work to be done to allow multiple auditd processes anchored to the user namespace, as well. As far as IDs go, there is a decision to be made between the list of namespace IDs versus a single kernel-managed container ID. He favors the former, even though dealing with eight separate numbers is harder to use. Either solution will require higher-level tools to map, track, and aggregate information about the containers across multiple hosts.
[I would like to thank the Linux Foundation for travel support to attend the Linux Security Summit in Toronto.]
Atomic patterns 2: coupled atomics
Our recent survey of the use of atomic operations in the Linux kernel covered the use of simple flags and counters, along with various approaches to gaining exclusive access to some resource or other. On reaching the topic of shared access we took a break, in part because reference counts, which are the tool for managing shared access, have been covered before. Much of that earlier content requires no more than a brief recap, but the use of biases, then described as an anti-pattern, is worthy of further examination as it is a stepping stone toward understanding a range of other patterns for the use of atomics in the kernel.
Recap: three styles of reference counters
I previously identified three styles of reference counters used in Linux; my recent explorations have found no reason to adjust that list. The distinction between the three involves what happens when the count reaches zero.
When a "plain" reference count reaches zero, nothing particular happens beyond the obvious. Some code somewhere might occasionally check if the counter is zero and behave differently if it is, but the moment of transition from non-zero to zero has no significance. A good example is child_count used by the runtime power management code. This allows a "child" device to hold a reference on its parent to keep it active. Unless it has been configured to ignore_children, the parent will be kept active as long as any child still holds a reference.
When a "kref" reference count reaches zero, some finalization operation happens on the object; typically it is freed. Code requiring that pattern should use the struct kref data type, though an atomic_t counter and atomic_dec_and_test() can be used if there is a good reason to avoid kref.
Finally, the "kcref" counter is not allowed to reach zero unless a lock is held. Code implementing this pattern can use atomic_dec_and_lock(), which takes a spinlock only if it is likely to be needed. A more general approach that can work with any sort of lock is to have a fast path that uses atomic_add_unless() to decrement the counter as long as its value is not one. If this fails, the lock can be taken and at atomic_dec_and_test() or similar can be used. hw_perf_event_destroy() in the perf code displays this quite nicely.
Counter bias: multiple values in the one atomic
A number of reference counters in Linux (e.g. in procfs and kernfs) have a "bias" added to the value. This bias is a large value (larger than the normal range of the counter) that can be added to the counter's value. The presence or absence of the bias can easily be detected even as the counter itself moves up or down. This allows a boolean value to be stored in the same variable as the counter. I previously described this as an anti-pattern; a proper solution would instead use a separate variable (or bit in a bitmap) to store the boolean value. When the counter and the boolean are changed independently, I stand by that assessment, but sometimes there is value in being able to control them together in a single operation.
A particularly simple example is found in the function-tracing (ftrace) code for the SuperH architecture. The nmi_running counter sometimes has its most significant bit set, effectively using a bias of 231. This flag, which is used to provide synchronization between ftrace and non-maskable interrupt handlers, may be cleared at any time, but may only be set when the value of the counter is zero. Normally, when there is a need to synchronize the change in one value with some other value, it is simplest to hold a spinlock whenever either value is changed — but that is not necessarily the fastest way. If the two values of interest can be stored in the same machine word, then an atomic compare-exchange operation, often in a loop to handle races, can achieve the same end more efficiently.
Having identified this pattern of two values being managed with a single atomic operation, we need a name for it; "coupled atomics" seems a good choice as the interdependence between the two values could be seen as a coupling. Other examples of this pattern are easy to find. The "lockref" type that was introduced in Linux 3.12 follows exactly this pattern, storing a 32-bit spinlock and a 32-bit reference count in a single 64-bit word that, on several popular architectures, can be updated atomically. Even this 32-bit spinlock itself is sometimes a multi-part atomic, as is the case for both ticket spinlocks and MSC locks.
The previous article mentioned two uses for the new atomic_fetch*() operations; we can now add a third. This one involves an atomic_t variable that contains a counter and a couple of flags, only this time the flags are in the least significant bits and the counter is in the higher-order bits. This atomic_t is used to implement a queued reader/writer spinlock. The flags record if a write lock is held, or if a writer is waiting for the lock. The counter, which is incremented by adding 256 (using the defined name _QR_BIAS) records the number of active readers. A new reader attempts to get a read lock using an atomic operation to add _QR_BIAS and then see if either of the flags were set in the result. If they were set, the read lock was not acquired; the failed reader subtracts the bias and tries again. Interestingly, the fast path code uses atomic_add_return(), while the slow path code uses the new atomic_fetch_add_acquire(). Either is quite suitable for the task, but a little more consistency would be nice.
Another example is the helpfully named combined_event_count counter in the system suspend code. This variable stores two counters: the number of in-progress wakeup events and the total number of completed wakeup events. When the in-progress counter is decremented, the total needs to be incremented; by combining the two counters in the one atomic value, the two can be updated in a single race-free operation.
More coupled atomics, big and small
Examples so far could be seen as mid-range examples, combining a counter with some other modestly sized value, typically another counter or a flag, into the one atomic value. To finish off we will look at two extremes in size, the largest and smallest.
Most atomics are 32 bits in size, though 64-bit values, whether pointers manipulated with cmpxchg() or the atomic_long_t type, are not exactly uncommon. What is uncommon is 128-bit atomic types. These are limited to three architectures (arm64, x86_64, and s390) and to a small number of users, mainly the SLUB memory allocator.
SLUB owns several fields in the page description structure: a pointer to a list of free space, some counters of allocated objects, and a "frozen" flag. Sometimes it wants to access or update several of these atomically. On a 32-bit host, these values all fit inside a 64-bit value. On a 64-bit machine, they don't, so a larger operation is needed; cmpxchg_double() is available on the listed architectures to allow this. It is given two pointers to 64-bit memory locations that must be consecutive, two values for comparison, and two values for replacement. Unlike the single-word cmpxchg() that always returns the value that was fetched, cmpxchg_double() returns a success status, rather than trying to squeeze 128 bits into the return value.
On 64-bit architectures without this 128-bit atomic option, SLUB will use a spinlock to gain the required exclusive access — effective, but not quite as fast. cmpxchg_double() seems to me to be an eloquent example of the lengths some kernel developers will go to in order to squeeze out that last drop of performance.
The other extreme in size is to combine two of the smallest possible data types into a single atomic: two bits. A simple example in the xen events_fifo code clears one bit, EVTCHN_FIFO_MASKED, but only when the other bit, EVTCHN_FIFO_BUSY is also clear. Manipulating multiple bits at once is another place where the new atomic_fetch*() operations could be useful. They do not support any dependency between bits as we see in the xen example, but they could, for example, clear a collection of bits atomically and report which bits were cleared, by using atomic_fetch_and(). Similarly, if an atomic_t contained a counter in some of the bits, that counter could be extracted and zeroed without affecting other accesses. Whether these are actually useful I cannot say as there are no concrete examples to refer to. But the pattern of multiple values in the one atomic_t does seem to raise more possible uses for these new operations.
Both a strength and a weakness
Having found these various patterns, several of which I did not expect, the overall impression I am left with is the tension between the strength and the weakness of C for implementing these patterns. On the one hand C, together with the GCC extensions for inline assembly language code, provides easy access to low-level details that make it possible to implement the various atomic accesses in the most efficient way possible. On the other hand, the lack of a rich type system means that we tend to use the one type, atomic_t, for a wide range of different use cases. Some improvements might be possible there, as we saw with the introduction of the kref type, but I'm not sure how far we could take that. I contemplate the atomic_cmpxchg_double() usage in SLUB and wonder what sort of high-level language construct would make that more transparent and easy to read, and yet keep it as performant on all hardware as it currently is. It certainly would be nice if some of these patterns were more explicit in the code, rather than requiring careful analysis to find.
Reimplementing mutexes with a coupled lock
Oscar Wilde once famously observed that fashion "is usually a form of ugliness so intolerable that we have to alter it every six months". Perhaps the same holds true of locking primitives in the kernel; basic mechanisms like the mutex have been through many incarnations over the years. This season, it would appear that coupled atomic locks are all the rage with the trendiest kernel developers, so it should not be surprising that a new mutex implementation using those locks is making the rounds. This code may be glittering and shiny, but it also has the potential to greatly simplify the mutex implementation.
A mutex is a sleeping lock, meaning that kernel code that tries to acquire a contended mutex may go to sleep to wait until that mutex becomes available. Early mutex implementations would always put a waiter to sleep, but, following the scalability trends of the day, mutexes soon gained a glamorous accessory: optimistic spinning. Waking a sleeping thread can take a long time and, once that thread gets going, it may find that the processor cache contains none of its data, leading to unfashionable cache misses. A thread that spins waiting for a mutex, instead, will be able to grab it quickly once it becomes available and will likely still be cache-hot. Enabling optimistic spinning can improve performance considerably. There is a cost, in that mutexes are no longer fair (they can be "stolen" from a thread that has been waiting for longer), but being properly à la mode is never free.
Optimistic spinning brings with it an interesting complication, though, in that it requires tracking the current owner of the mutex. If that owner sleeps, or if the owner changes while a thread is spinning, it doesn't make any sense to continue spinning, since the wait is likely to be long. As a field within the mutex, the owner information is best protected by the mutex itself. But, by its nature, this information must be accessed by threads that do not own the mutex. The result is some tricky code that is trying to juggle the lock itself and the owner information at the same time.
Peter Zijlstra has sent an alternative mechanism down the runway; it takes care of this problem by combining the owner information and lock status into a single field within the mutex. In current kernels, the count field, an atomic_t value, holds the status of the lock itself, while owner, a pointer to struct task_struct, indicates which thread owns the mutex. Peter's patch removes both of those fields, replacing them with a single atomic_long_t value called "owner".
This value is 64 bits wide, large enough to hold a pointer value. If the mutex is available, there is no owner, so the new owner field contains zero. When the mutex is taken, the acquiring thread's task_struct pointer is placed there, simultaneously indicating that the mutex is unavailable and which thread owns it. The task_struct structure must be properly aligned, though, meaning that the bottom bits of a pointer to it will always be zero, so those bits are available for other locking-related purposes. Following this season's coupled-lock trend, two of those bits are so used, in ways that will be described shortly.
With the new organization, the code to attempt to acquire a mutex now looks like this:
static inline bool __mutex_trylock(struct mutex *lock) { unsigned long owner, curr = (unsigned long)current; owner = atomic_long_read(&lock->owner); for (;;) { /* must loop, can race against a flag */ unsigned long old; if (__owner_task(owner)) return false; old = atomic_long_cmpxchg_acquire(&lock->owner, owner, curr | __owner_flags(owner)); if (old == owner) return true; owner = old; } }
The __owner_task() and __owner_flags() macros simply mask out the appropriate parts of the owner field. The key is the atomic_long_cmpxchg_acquire() call, which attempts to store the current thread as the owner of the mutex on the assumption that it is available. Should some other thread own the mutex, that call will fail, and the mutex code will know that it will have to work harder.
There are currently two flags that can be stored in the least significant bits of owner. If a thread finds it must sleep while waiting for a contended mutex, it will set MUTEX_FLAG_WAITERS; the thread currently holding the mutex will then know it must wake the waiters when the mutex is freed. Most of the time, it is hoped, there will be no waiters; maintaining this bit allows for a bit of unnecessary work to be skipped.
As mentioned above, optimistic spinning, while good for performance, is unfair; in the worst case, an unlucky thread contending for a highly contended mutex could be starved for a long time. In an attempt to prevent that problem, the second owner bit, MUTEX_FLAG_HANDOFF, can be used to change how a contended mutex changes ownership.
If a thread tries and fails to obtain a mutex after having already slept waiting for it to become available, it can set MUTEX_FLAG_HANDOFF prior to returning to sleep. Later on, when the mutex is freed, the freeing thread will notice the flag and behave differently. In particular, it must avoid clearing the owner field as it normally would, lest some other thread, spinning on the mutex, steal it away. Instead, it finds the first thread in the wait queue for the mutex and transfers ownership directly, waking that thread once the job is done. This dance restores some fairness, at the cost of making everybody wait for the sleeping thread to wake up and get its work done.
The new code simplifies the mutex implementation considerably by getting rid of a number of strange cases involving the separate count and owner fields. But it gets a bit better than that, since the new code is also architecture-independent; all of the old, architecture-specific mutex code can go away. So the bottom line of Peter's cover letter reads:
49 files changed, 382 insertions(+), 1407 deletions(-)
Removing code, as it happens, is always in fashion, and removing 1000 lines of tricky assembly-language locking code is especially chic. Assuming that this code manages to avoid introducing performance regressions, it could be a must-have item at a near-future merge-window ball.
Patches and updates
Kernel trees
Architecture-specific
Core kernel code
Development tools
Device drivers
Device driver infrastructure
Documentation
Filesystems and block I/O
Memory management
Networking
Security-related
Miscellaneous
Page editor: Jonathan Corbet
Distributions
Building a GNOME-based automotive system
At GUADEC 2016 in Karlsruhe, Germany, Lukas Nack presented a look at Apertis, the open-source automotive in-vehicle infotainment (IVI) system developed by Bosch. Apertis makes use of a number of GNOME components for its application framework, in contrast to many IVI products built by car makers. But, as the audience questions at the end of the session revealed, there may still be some significant disconnects between the free-software community and automotive industry decision makers.
The car market
Nack began by outlining the increasingly computerized aspects of
modern cars and how open source (namely Linux systems) is expected to
play a significant role in the coming years. In the future, cars will
come with computerized IVI head units in the dashboard, computerized
instrument clusters, separate passenger entertainment systems, and
likely several other software-driven panels (such as
the climate-control system). Already, most new cars come with a
seven-to-nine-inch screen in the IVI unit, which provides audio
control, phone connectivity access, navigation, and other services.
These IVI head units are not chosen by the user, though; they are provided by the car maker as built-in equipment that the manufacturer puts through a multi-year test phase in order to meet safety and reliability requirements. The car industry, Nack said, is not quick to adopt new technology. The safety regulations are one reason why, but there are others, including the long maintenance period (product lifespans averaging ten years or more) and the difficultly of building systems that are robust in the automotive environment. For example, automotive computers must not crash even when the available voltage supply suddenly drops or the ignition is shut off without warning.
The result is that developing IVI software is more complicated than developing a typical desktop system, he said. Car makers want app-store like environments similar to what users have on their smartphones, but they also want a platform that they can customize to serve in a wide range of different vehicles. They are also quite concerned with safety issues, he said. They want to avoid the security vulnerabilities routinely demonstrated by researchers, and they are averse to using GPLv3 software primarily because they want to "Tivoize" their systems. That desire, he said, comes from their fear that people will modify the software in their car and people will die in an accident as a result.
Bosch is primarily a supplier to the auto industry (although it has several other industrial engineering interests), making components from braking systems to navigation and car stereo units for use by car makers. Apertis is Bosch's automotive Linux distribution, which it has developed to be used and adapted by car makers as well. Nack outlined its major features.
Apertis
The distribution is an Ubuntu derivative that ships a GENIVI-compliant middleware stack. On top of that, Bosch has built an application framework using GTK+ and GNOME. There are two reference hardware designs supported in the official release images: the MinnowBoard MAX for Intel systems and the i.MX6 SABRE Lite for ARM. The project also produces development tools that can be installed and run on the target system itself. The original code is released under the MPLv2.
For its application framework, Nack said, Apertis chose GNOME over Qt—largely because it found Qt to "be very closed." "It's hard to break out of," he said, whereas GNOME is totally different. "You can use whatever you want; there are lots of language bindings, and you can exchange any components you want to."
The Apertis framework distinguishes between built-in applications and "apps" that would come from a smartphone-like app store. These apps are installed from self-contained bundles (which include their dependencies) and are run in a sandboxed environment. The Apertis sandboxing system appears to have been developed entirely within Bosch, but it follows the same basic outlines as other application-sandboxing systems. AppArmor is used to enforce access control, control groups restrict access to system resources, and polkit is used as a second-level mechanism to limit access to the system.
Each app can read and write files in a private directory, and access to a shared storage directory must be authorized interactively by the user. An app-launcher process is responsible for installing apps, checking the permissions each app requests in its manifest file and whitelisting it with the necessary AppArmor policy. The launcher also handles app upgrades, starting and stopping apps, and uninstallation.
Apertis offers a set of APIs that track the automotive APIs defined by GENIVI and the World Wide Web Consortium. In addition, Apertis supports "agent" processes, which are essentially standard daemons. In addition to native GTK+ apps, HTML5 apps are supported (running on WebKit2GTK).
The developer community
At present, Apertis is not shipping in any cars and Nack did not disclose any such plans. The system is similar in most respects to the GENIVI-based products being developed elsewhere (including by car makers), though building the system on Ubuntu rather than with Yocto is a distinction, as is the choice of GNOME over Qt.
The GNOME developers and community members in the audience had quite a few questions, beginning with whether or not Bosch had seen any of the application-sandboxing work done in Flatpak. Nack replied that he was not familiar with it himself, but that the project had been asked about it. Flatpak developer Alex Larsson (who was moderating the question-and-answer session) noted that the Apertis sandbox design seemed "almost exactly the same" and suggested that Bosch explore Flatpak.
Several other audience members pushed back on various comments from the presentation about locking the system down. Bradley Kuhn asked whether or not an Apertis system would come with the necessary scripts for users to modify and install their own version; Nack replied that he did not know. Kuhn also objected to the notion that avoiding GPLv3 software would prevent fatalities. He pointed out that the Tesla self-driving car component was proprietary and it has killed someone and that Volkswagen's proprietary emissions-cheating software was, in a sense, killing lots of people slowly by contributing excess pollution.
Christian Hergert, who described himself as "a recovering car guy" noted that it currently takes a lot of reverse engineering to decode the proprietary diagnostic codes emitted by Bosch head units, and asked whether Apertis, with access to a nice seven-inch monitor, could save everyone a lot of trouble by displaying human-readable error messages instead. He also asked whether the opaque settings Bosch head units currently stored in 32-bit flag fields would become something more convenient like GSettings keys. Nack replied that he was not sure, but that he suspected Apertis would typically be deployed as a guest OS running on top of a separate real-time OS, and that the low-level messages and codes would probably be handled by the real-time component. As to displaying human-readable messages, he replied that he thought Bosch probably does not want anyone to reverse engineer its systems, so it was unlikely to make the job easy for them.
That point prompted a number of audience members to comment on the drawbacks and problems of locking out developers and car owners. Bastien Nocera pointed out that some components, notably WebKit, are guaranteed to have security bugs discovered over a car's ten-year lifespan. If developers cannot fix those packages, drivers are being placed at greater risk. Other points include the possibility that a car maker will go out of business, leaving users locked out and with no chance of even a vendor-provided update, and the fact that locking down the system imposes a long-term maintenance burden on the manufacturer.
To a degree, Nack seemed taken by surprise at how many questions the audience had on the topic of lock-down. He generally tried to abstain from making pronouncements on what Bosch's position (or any Apertis-using car maker's opinion) would be, noting that the automotive industry, in general, is not particularly open toward aftermarket development. "I think car manufacturers need to change their thinking about this," he said, "but I don't see that happening in the near future."
Given their alignment on technologies, in theory Apertis could become a project that works closely with GNOME, to the benefit of both camps. But there are clearly obstacles to that taking place, if the higher levels at Bosch or car makers are, indeed, averse to engaging with free-software developers like they would the supplier of any other component. That said, one should surely not extrapolate too much from a single Q&A session; as GENIVI and other automotive Linux projects have found, it is possible to shift the thinking of automotive industry players.
But it will likely take a lot more engagement between the two communities before the interests of automotive manufacturers are fully in line with the interests and needs of the free-software development community. Hopefully engaging with GNOME will increase the chances of that alignment happening soon.
[The author would like to thank the GNOME Foundation for travel assistance to attend GUADEC 2016.]
Brief items
Distribution quotes of the week
OpenBSD 6.0
OpenBSD 6.0 has been released. An EFI bootloader has been added to the armv7 platform along with other improvements for that platform. Also in this release, new and improved hardware support, IEEE 802.11 wireless stack improvements, generic network stack improvements, installer improvements, routing daemons and other userland network improvements, security improvements, and more. The announcement also contains information about OpenSMTPD 6.0.0, OpenSSH 7.3, OpenNTPD 6.0, and LibreSSL 2.4.2.
Distribution News
Debian GNU/Linux
Reminder - Debian Bug Squashing Party in Salzburg, Austria
There will be a BSP September 23-25 in Salzburg, Austria. "The BSP will be held in the office of conova communications GmbH [CONOVA], located close to Salzburg Airport W.A. Mozart. Team meetings/sprints during the BSP are welcome, just let me know in advance so we can organize appropriate rooms."
Fedora
Fedorahosted.org sunset
Fedora Infrastructure currently maintains two sites for general open source code hosting: fedorahosted.org and pagure.io. The Infrastructure team would like to retire fedorahosted.org in favor of pagure.io, which is in active development. The shutdown is currently planned for February 28, 2017. "Fedorahosted.org was established in late 2007 using Trac for issues and wiki pages, Fedora Account System groups for access control and source uploads, and offering a variety of Source Control Management tools (git, svn, hg, bzr). With the rise of new workflows and source repositories fedorahosted.org has ceased to grow, adding just one new project this year and a handful the year before. Pagure.io was established in 2015, and is a modern Flask/Python based application. It is under rapid development and supports git repos for source code, docs, and tickets. The pull request model is used for changes along with many options for projects. Access control is standalone. New projects are self service and added all the time."
Newsletters and articles of interest
Distribution newsletters
- DistroWatch Weekly, Issue 677 (September 5)
- Lunar Linux weekly news (September 2)
- openSUSE news (September 2)
- openSUSE news (September 7)
- openSUSE Tumbleweed – Review of the Week (September 4)
- Ubuntu Kernel Team newsletter (August 30)
- Ubuntu Weekly Newsletter, Issue 480 (September 4)
Page editor: Rebecca Sobol
Development
An asynchronous Internet in GNOME
At GUADEC 2016 in Karlsruhe, Germany, Jonathan Blandford challenged the GNOME project to rethink how its desktop software uses network access. The GNOME desktop assumes Internet connectivity is always available, which has the side effect of making the software stack considerably less useful and, indeed, usable to people who live in those places regarded as the developing world.
Blandford currently works for Endless Mobile, which makes computers for the developing world, he said, using GNOME as its desktop environment. He is also one of GNOME's longest-serving project members, having been a GNOME developer at Red Hat long before the 1.0 release.
The Internet is ubiquitous in people's lives and is fundamental to most software, Blandford said, so most developers lapse into thinking about it as omnipresent. But, in fact, Internet access is neither "always on" nor is it cheap in many places around the globe. "Less than half of humanity has access to it today," he said. Thus, software that takes Internet connectivity for granted fails to function for users in the developing world. "We're seeing a split between 'Internet-haves' and 'Internet have-nots.'"
But, he added, the fact that the software industry as a whole lets this market down means that there is an opportunity for GNOME to do better than simply follow the status quo. "And I'm as guilty of this as anyone," he admitted. Nine years ago, he noted, when he worked on GNOME as part of Red Hat's desktop team, that team fully embraced the concept of the "online desktop" that would seamlessly integrate with remote services—which has worked out well for the software project, but has left a lot of people behind.
The barriers that keep ubiquitous high-speed Internet connectivity out of the hands of most of the world's population are fairly well known. Infrastructure costs associated with wired networks mean that the majority of the world uses cellular connections for network access. In addition, data charges are frequently too high for many people, and the bulk of the Internet remains rather English-centric. Finally, while bandwidth is increasing rapidly in the US and Europe, speeds are creeping up far less rapidly everywhere else around the globe.
With the majority of GNOME developers hailing from Europe and North America, Blandford said, the project needs to adopt a new mindset in order to serve users in the developing world. He then showed some raw numbers regarding speeds and pricing in different areas of the world. One of the most striking was that the average desktop uses 60GB of data every month in the developed world—a number far too high to be sustainable elsewhere.
Blandford then pointed out that although a lot of time is spent discussing "instant data" like email and social media messages—data that users consider highly valuable—such data makes up only a tiny fraction of the overall Internet bandwidth. The majority is "cacheable data," he said, like web pages and video content that is produced once and requested many times.
Currently, cacheable data is "extremely expensive," he said; although media companies use commercial content-delivery networks (CDNs) for the developed world, the same data is virtually inaccessible in the developing world. So one important way GNOME could improve the computing experience for people in the developing world is to build an "asynchronous Internet" within the GNOME desktop, utilizing alternative means to distribute and store cacheable data.
People have already created various methods to distribute data in bulk outside the Internet, he noted. El Paquete Semanal, for example, is a hard drive image circulated weekly in Cuba through underground means, currently including about 2TB of data. The Android app Zapya lets users download a web site to their phone while they are online at some public location, saving it to read (and share) once at home. In both cases, the latency of these "networks" is exceptionally high, but the overall throughput of a hard drive delivered weekly via motorbike is pretty good, he noted.
There are also projects like Toosheh, which uses television satellites to "backpack" one-way data signals onto unused bandwidth, enabling users in Iran who have satellite dishes to access web content that is officially censored by the government. Endless has discussed the idea of cell network providers letting users download data at reduced rates overnight when there is substantially less demand for voice service. And, of course, peer-to-peer technologies like BitTorrent are widely used in the developing world to distribute data.
But raw support for asynchronous network access is only one piece of the puzzle: applications would need to support data access through different means, such as offline caches. This is an area where Endless has already been working, Blandford said. Endless systems include a variety of GTK+-based applications that use local data caches to provide access to informational content (from news to topical, Wikipedia-like references). They retrieve updates from Endless servers in off-peak hours, if there is Internet access.
GNOME could adapt similar techniques for many of its applications, he said. The existing GNOME Recipes application, for example, retrieves recipes live over the web; the equivalent Endless app uses a local database that is updated incrementally when it is convenient. Still, he said, his goal was not to dictate that GNOME copy Endless's designs, but rather to inspire the GNOME community to think about how it could improve offline usability in its applications.
There are several areas where GNOME applications can improve, he said. The first is to stop assuming connectivity is available and to build in ways to deal gracefully with connectivity problems and disconnects. "And I'm looking at you, Evolution," he said. Dealing with degraded connectivity includes being careful not to download data more than once, he added. The second is to be conscious of the user's bandwidth, including being explicit about when the application is using the network. "It's a precious resource," he said, "It's not 'free.'" Android works along those lines already with the "download for offline use" options in Google Maps and Translate, he said, but so far GNOME does not use that design pattern. Related to that improvement area is "aggressively caching data," he said, as in the Endless examples.
Other areas for improvement include expanding language support and developing documentation that reaches beyond GNOME's existing stable of users and developers. This is an area in which the project already does a good job, he said, but it needs to go further. Although GNOME takes a lot of flak for simplifying the desktop too much, Blandford said, Endless found in its real-world user tests that much of the documentation and the wording used on the desktop was written to serve a small niche of college-educated people with extensive experience with technology concepts. Ultimately, the point is that developing a desktop system for the entire world requires recognizing that "our needs" are not "everyone's needs."
Blandford ended by proposing that asynchronous Internet support be added to the list of concepts that GNOME cares about, like accessibility and internationalization—he suggested "a18t" as one possible abbreviation, and "Int··n·t" (for "spotty Internet) as another.
Whatever the abbreviation is, he concluded, this is a concept that GNOME should think about while it develops its software. Most of the people who are not yet online want to get online, Blandford said, and when it comes to the desktop software they use, they have not picked one yet. So GNOME's opportunity with asynchronous networking support is a chance to serve an underserved population, but also to grow the GNOME community with new people who are excited about getting access to computing.
[The author would like to thank the GNOME Foundation for travel assistance to attend GUADEC 2016.]
Brief items
Quotes of the week
Z-Wave protocol specification now public
The Z-Wave wireless home-automation protocol has been released to the public. In years past, the specification was only available to purchasers of the Z-Wave Alliance's development kit, forcing open-source implementations to reverse-engineer the protocol. The official press release notes that there are several such projects, including OpenZWave; Z-Wave support is also vital to higher-level Internet-of-Things abstraction systems like AllJoyn.
Anticipating KDE's 20th anniversary
The announcement of a project to develop the "Kool Desktop Environment" went out on October 14, 1996. As the 20th anniversary of that announcement approaches, the KDE project is celebrating with a project timeline and a 20 Years of KDE book. "This book presents 37 stories about the technical, social and cultural aspects that shaped the way the KDE community operates today. It has been written as part of the 20th anniversary of KDE. From community founders and veterans to newcomers, with insights from different perspectives and points of view, the book provides you with a thrilling trip through the history of such an amazing geek family."
LLVM 3.9 released
Version 3.9 of the LLVM compiler suite is out. "This release is the result of the LLVM community's work over the past six months, including ThinLTO, new libstdc++ ABI compatibility, support for all OpenCL 2.0 and all non-offloading OpenMP 4.5 features, clang-include-fixer, many new clang-tidy checks, significantly improved ELF linking with lld, identical code folding and initial LTO support in lld, as well as improved optimization, many bug fixes and more."
Git v2.10.0
Git 2.10 has been released, with lots of updates to the user interface and workflows, performance enhancements, and much more. See the announcement for details.Samba 4.5.0 is available
Samba version 4.5.0 has been released. Among the included changes, the NTLMv1 authentication option has been disabled by default, multiple DNS forwarders are now supported on the Active Directory Domain Component, and SMB 2.1 leases are now enabled by default. See the announcement for the full list of new features.
Newsletters and articles
Development newsletters from the past week
- What's cooking in git.git (August 31)
- What's cooking in git.git (September 2)
- This Week in GTK+ (September 5)
- OCaml Weekly News (September 6)
- Perl Weekly (September 5)
- PostgreSQL Weekly News (September 4)
- Python Weekly (September 1)
- Python Weekly (September 8)
- The R Journal (August)
- Ruby Weekly (September 1)
- Ruby Weekly (September 8)
- This Week in Rust (September 6)
- Wikimedia Tech News (September 5)
Tor: A New Bridge Authority
The Tor blog has announced that the network's current bridge
authority, an infrastructure server that keeps track of Tor's unpublished entry nodes
("bridges"), is being decommissioned and will be replaced with a new
server donated by a new provider. The new authority, Bifröst, will
be gradually taking over duties from the old authority, Tonga. "This transition does not
affect Tor users, regardless of whether or not Bridges are used to
connect to the Tor network. However, it is extremely important that
relay operators running Bridges upgrade to tor-0.2.8.7 or
tor-0.2.9.2.-alpha, which contains a patch to replace Tonga with the
new Bridge Authority.
" Bridges that do not upgrade will no
longer be used for incoming connections. The post also notes that
several opportunities exist for interested developers to improve how
Tor bridges are tracked and managed.
Page editor: Nathan Willis
Announcements
Brief items
Suspect in kernel.org breakin arrested
The US Department of Justice has announced that it has arrested a suspect in the 2011 kernel.org breakin. "[Donald Ryan] Austin is charged with causing damage to four servers located in the Bay Area by installing malicious software. Specifically, he is alleged to have gained unauthorized access to the four servers by using the credentials of an individual associated with the Linux Kernel Organization. According to the indictment, Austin used that access to install rootkit and trojan software, as well as to make other changes to the servers".
Linux Foundation conference videos
The Linux Foundation has released videos from LinuxCon and ContainerCon and the Linux Security Summit.Videos from QtCon/Akademy
Videos from QtCon and Akademy are available on YouTube.
Articles of interest
Free Software Supporter Issue 101, September 2016
This month the Free Software Foundation's monthly newsletter covers the FSF annual report, meeting recaps, interview with Stefano Zacchiroli, EFF lawsuit against DRM, the Libre Tea Computer Card, h-node hardware directory, and much more.FSFE: Julia Reda, MEP: "Proprietary Software threatens Democracy"
The Free Software Foundation Europe covers Julia Reda's talk at QtCon on Free Software in the European Public Sector. "Ms Reda, a member of the EU Parliament for the Pirate Party, explained how proprietary software, software that forbids users from studying and modifying it, has often left regulators in the dark, becoming a liability for and often a threat to the well-being and health of citizens. An example of this, she said, is the recent Dieselgate scandal, in which auto-mobile manufacturers installed software that cheated instruments that measured fumes in test environments, only to spew illegal amounts of toxic exhaust into the atmosphere the moment they went on the road."
Danko: Next steps for Gmane
LWN previously reported that Gmane creator and maintainer Lars Magne Ingebrigtsen shut down the website and was contemplating shutting down the service entirely. Martin Danko now reports that Gmane has a new maintainer. "I petitioned some of our directors to allow us to offer to take it over and in the end we entered into agreement with Lars to take over Gmane. The assets of Gmane have been placed into a UK company Gmane Ltd. As part of the agreement, we have received the INN spool with all the articles but none of the code that drives the site. We’ve started rebuilding parts of the site just to get it back online, its not perfect and there are pieces missing but we’re working on building all the functionality back into the site." (Thanks to Brian Thomas)
Calls for Presentations
3rd Call For Papers - 23rd Annual Tcl/Tk Conference (Tcl'2016)
Tcl'2016 will take place November 14-18 in Houston, Texas. Abstracts and proposals are due September 12.CFP Deadlines: September 9, 2016 to November 8, 2016
The following listing of CFP deadlines is taken from the LWN.net CFP Calendar.
Deadline | Event Dates | Event | Location |
---|---|---|---|
September 9 | November 16 November 18 |
ApacheCon Europe | Seville, Spain |
September 12 | November 14 November 18 |
Tcl/Tk Conference | Houston, TX, USA |
September 12 | October 29 October 30 |
PyCon.de 2016 | Munich, Germany |
September 13 | December 6 | CHAR(16) | New York, NY, USA |
September 15 | October 21 October 23 |
Software Freedom Kosovo 2016 | Prishtina, Kosovo |
September 25 | November 4 November 6 |
FUDCon Phnom Penh | Phnom Penh, Cambodia |
September 30 | November 12 November 13 |
T-Dose | Eindhoven, Netherlands |
September 30 | December 3 | NoSlidesConf | Bologna, Italy |
September 30 | November 5 November 6 |
OpenFest 2016 | Sofia, Bulgaria |
September 30 | November 29 November 30 |
5th RISC-V Workshop | Mountain View, CA, USA |
September 30 | December 27 December 30 |
Chaos Communication Congress | Hamburg, Germany |
October 1 | October 22 | 2016 Columbus Code Camp | Columbus, OH, USA |
October 19 | November 19 | eloop 2016 | Stuttgart, Germany |
October 25 | May 8 May 11 |
O'Reilly Open Source Convention | Austin, TX, USA |
October 26 | November 5 | Barcelona Perl Workshop | Barcelona, Spain |
October 28 | November 25 November 27 |
Pycon Argentina 2016 | Bahía Blanca, Argentina |
October 30 | February 17 | Swiss Python Summit | Rapperswil, Switzerland |
October 31 | February 4 February 5 |
FOSDEM 2017 | Brussels, Belgium |
If the CFP deadline for your event does not appear here, please tell us about it.
Upcoming Events
Audio workshop accepted for Linux Plumbers Conference and Kernel Summit
There will be an audio workshop at LPC (co-located with the Kernel Summit). LPC will be held November 1-4 in Santa Fe, New Mexico. "Topics include low-latency audio, use of the clock API, propagating digital configuration through dynamic audio power management (DAPM), integration of HDA and ASoC, SoundWire ALSA use-case managemer (UCM) scalability, standardizing HDMI and DisplayPort interfaces, Media Controller API integration, and a number of topics relating to the multiple userspace users of Linux-kernel audio, including Android and ChromeOS as well as the various desktop-oriented Linux distributions."
LPC registration is open with a limited number of slots available. There will also be a small number of late registrations available starting on October 1.
Nextcloud Conference: Keynote Speakers
The Nextcloud Conference will take place September 16-22 in Berlin, Germany. Jane Silber, CEO of Canonical, and Karen Sandler, Executive Director at the Software Freedom Conservancy, will be keynote speakers.Events: September 9, 2016 to November 8, 2016
The following event listing is taken from the LWN.net Calendar.
Date(s) | Event | Location |
---|---|---|
September 7 September 9 |
LibreOffice Conference | Brno, Czech Republic |
September 8 September 9 |
First OpenPGP conference | Cologne, Germany |
September 9 September 11 |
GNU Tools Cauldron 2016 | Hebden Bridge, UK |
September 9 September 11 |
Kiwi PyCon 2016 | Dunedin, New Zealand |
September 9 September 15 |
ownCloud Contributors Conference | Berlin, Germany |
September 9 September 10 |
RustConf 2016 | Portland, OR, USA |
September 13 September 16 |
PostgresOpen 2016 | Dallas, TX, USA |
September 15 September 17 |
REST Fest US 2016 | Greenville, SC, USA |
September 15 September 19 |
PyConUK 2016 | Cardiff, UK |
September 16 September 22 |
Nextcloud Conference | Berlin, Germany |
September 19 September 23 |
Libre Application Summit | Portland, OR, USA |
September 20 September 21 |
Lustre Administrator and Developer Workshop | Paris, France |
September 20 September 22 |
Velocity NY | New York, NY, USA |
September 20 September 23 |
PyCon JP 2016 | Tokyo, Japan |
September 21 September 23 |
X Developers Conference | Helsinki, Finland |
September 22 September 23 |
European BSD Conference | Belgrade, Serbia |
September 23 September 25 |
PyCon India 2016 | Delhi, India |
September 23 September 25 |
OpenStreetMap State of the Map 2016 | Brussels, Belgium |
September 26 September 28 |
Cloud Foundry Summit Europe | Frankfurt, Germany |
September 26 September 27 |
Open Source Backup Conference | Cologne, Germany |
September 27 September 29 |
OpenDaylight Summit | Seattle, WA, USA |
September 28 September 30 |
Kernel Recipes 2016 | Paris, France |
September 28 October 1 |
systemd.conf 2016 | Berlin, Germany |
September 30 October 2 |
Hackers Congress Paralelní Polis | Prague, Czech Republic |
October 1 October 2 |
openSUSE.Asia Summit | Yogyakarta, Indonesia |
October 3 October 5 |
OpenMP Conference | Nara, Japan |
October 4 October 6 |
ContainerCon Europe | Berlin, Germany |
October 4 October 6 |
LinuxCon Europe | Berlin, Germany |
October 5 October 7 |
Netdev 1.2 | Tokyo, Japan |
October 5 October 7 |
International Workshop on OpenMP | Nara, Japan |
October 6 October 7 |
PyConZA 2016 | Cape Town, South Africa |
October 7 October 8 |
Ohio LinuxFest 2016 | Columbus, OH, USA |
October 8 October 9 |
Gentoo Miniconf 2016 | Prague, Czech Republic |
October 8 October 9 |
LinuxDays 2016 | Prague, Czechia |
October 10 October 11 |
GStreamer Conference | Berlin, Germany |
October 11 October 13 |
Embedded Linux Conference Europe | Berlin, Germany |
October 11 | Real-Time Summit 2016 | Berlin, Germany |
October 12 | Tracing Summit | Berlin, Germany |
October 13 | OpenWrt Summit | Berlin, Germany |
October 13 October 14 |
Lua Workshop 2016 | San Francisco, CA, USA |
October 17 October 19 |
O'Reilly Open Source Convention | London, UK |
October 18 October 20 |
Qt World Summit 2016 | San Francisco, CA, USA |
October 21 October 23 |
Software Freedom Kosovo 2016 | Prishtina, Kosovo |
October 22 | 2016 Columbus Code Camp | Columbus, OH, USA |
October 22 October 23 |
Datenspuren 2016 | Dresden, Germany |
October 25 October 28 |
OpenStack Summit | Barcelona, Spain |
October 26 October 27 |
All Things Open | Raleigh, NC, USA |
October 27 October 28 |
Rust Belt Rust | Pittsburgh, PA, USA |
October 28 October 30 |
PyCon CZ 2016 | Brno, Czech Republic |
October 29 October 30 |
PyCon.de 2016 | Munich, Germany |
October 29 October 30 |
PyCon HK 2016 | Hong Kong, Hong Kong |
October 31 | PyCon Finland 2016 | Helsinki, Finland |
October 31 November 1 |
Linux Kernel Summit | Santa Fe, NM, USA |
October 31 November 2 |
O’Reilly Security Conference | New York, NY, USA |
November 1 November 4 |
Linux Plumbers Conference | Santa Fe, NM, USA |
November 1 November 4 |
PostgreSQL Conference Europe 2016 | Tallin, Estonia |
November 3 | Bristech Conference 2016 | Bristol, UK |
November 4 November 6 |
FUDCon Phnom Penh | Phnom Penh, Cambodia |
November 5 | Barcelona Perl Workshop | Barcelona, Spain |
November 5 November 6 |
OpenFest 2016 | Sofia, Bulgaria |
November 7 November 9 |
Velocity Amsterdam | Amsterdam, Netherlands |
If your event does not appear here, please tell us about it.
Page editor: Rebecca Sobol