<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
   <atom:link href="http://planet.fedoraproject.org/desktop/rss20.xml" rel="self" type="application/rss+xml" />
	<title>Fedora desktop Planet</title>
	<link>http://planet.fedoraproject.org/desktop/</link>
	<language>en</language>
        <description>Fedora People: http://planet.fedoraproject.org/desktop</description>

<item>
	<title>Matthew Garrett: Some things you may have heard about Secure Boot which aren't entirely true</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/10971.html</guid>
	<link>http://mjg59.dreamwidth.org/10971.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
Talking about Secure Boot again, I'm afraid. One of the things that's made discussion of this difficult is that, while the specification isn't overly complicated, some of the outcomes aren't obvious at all until you spend a long time thinking about it. So here's some clarification on a few points. &lt;br /&gt;&lt;h2&gt;Secure Boot provides no additional security&lt;/h2&gt;Untrue. Attacks against the pre-boot environment are real and increasingly common - &lt;a href=&quot;http://arstechnica.com/business/news/2011/11/security-researcher-defeats-windows-8-secure-boot.ars&quot;&gt;this&lt;/a&gt; is a recent proof of concept, and &lt;a href=&quot;http://www.eset.eu/press-computer-worldwide-targetted-by-MBR-Worm&quot;&gt;this&lt;/a&gt; has been seen in the wild. Once something has got into the MBR, all bets are off. It can modify your bootloader or kernel, inserting its own code to return valid results whenever any kind of malware checker scans for it. The only way to reliably identify it is to either move the disk to another system or to cold boot off verified media. By restricting pre-OS code to something that's been signed, Secure Boot does provide enhanced security.&lt;br /&gt;&lt;h2&gt;Secure Boot is just another name for Trusted Boot&lt;/h2&gt;Untrue. Trusted Boot requires the ability to measure the entire boot process, which gives the OS the ability to figure out everything that's been run before OS startup. The root of trust is in the hardware and a TPM is required. Secure Boot is simply a way to limit the applications that are run before the OS. Once booted, there is no way for the OS to identify what was previously booted, or even if the system was booted securely.&lt;br /&gt;&lt;h2&gt;Microsoft are just requiring that vendors implement the specification&lt;/h2&gt;Untrue. Quoting from the Windows 8 Hardware Certification Requirements:&lt;br /&gt;&lt;br /&gt;&lt;cite&gt;MANDATORY: No in-line mechanism is provided whereby a user can bypass Secure Boot failures and boot anyway Signature verification override during boot when Secure Boot is enabled is not allowed. A physically present user override is not permitted for UEFI images that fail signature verification during boot. If a user wants to boot an image that does not pass signature verification, they must explicitly disable Secure Boot on the target system.&lt;/cite&gt;&lt;br /&gt;&lt;br /&gt;Section 27.7.3.3 of version 2.3.1A of the UEFI spec explicitly permits implementations to provide a physically present user override. Whether this is a good thing or not is obviously open to argument, but the fact remains that Microsoft forbid behaviour that the specification permits.&lt;br /&gt;&lt;h2&gt;Secure Boot can be used to implement DRM&lt;/h2&gt;Untrue. The argument here is that Secure Boot can be used to restrict the software that a machine can run, and so can limit a system to running code that implements effective copy protection mechanisms. This isn't the case. For that to be true, there would need to be a mechanism for the OS to identify which code had been run in the pre-OS environment. There isn't. The only communication channel between the firmware and the OS is via a single UEFI variable called &quot;SecureBoot&quot;, which may be either &quot;1&quot; or &quot;0&quot;. Additionally, the firmware may provide a table to the OS containing a list of UEFI executables that failed to authenticate. It is not required to provide any information about the executables that authenticated correctly.&lt;br /&gt;&lt;br /&gt;In both these cases, the OS is required to trust the firmware. If the firmware has been compromised in any way (such as the user turning off Secure Boot), the data provided by the firmware can be trivially modified and the OS told that everything is fine. As long as machines exist where users are permitted to disable Secure Boot, Secure Boot is not any kind of DRM scheme.&lt;br /&gt;&lt;h2&gt;Secure Boot provides physical security&lt;/h2&gt;Untrue. Secure Boot does not in any way claim to improve security against attackers who have physical access, for the same reasons as the DRM case. The OS has no way to determine that the firmware's behaviour has been modified. A physically-present attacker can simply disable Secure Boot and install a piece of malware that lies to the OS about platform security. The &quot;Evil Maid&quot; attack still exists.&lt;br /&gt;&lt;h2&gt;Secure Boot only defines the interaction between the firmware and the bootloader. It doesn't specify any higher policy&lt;/h2&gt;Misleading. It's true that Secure Boot only specifies the authentication of pre-OS code. However, if you implement Secure Boot it's because you want to ensure that only authenticated code has run before your OS. If there is any way for unauthenticated code to touch the hardware before your OS starts, you can't ensure that. If an authenticated Linux kernel is booted and then loads an unsigned driver, that unsigned driver can fabricate a fake UEFI environment and then launch Windows from it. Windows would falsely believe that it has booted securely. If that authenticated Linux kernel were widely distributed, attackers could use it as an attack vector for Windows. The logical response from Microsoft would be to blacklist that kernel.&lt;br /&gt;&lt;br /&gt;The inevitable outcome of implementing Secure Boot is that every component that can touch hardware must be signed. Anyone who implements Secure Boot without requiring that is adding no additional security whatsoever.&lt;br /&gt;&lt;h2&gt;Only machines that want to boot Windows need to carry Microsoft's keys&lt;/h2&gt;Again, misleading. Microsoft only require one signing key to be installed, and the Windows bootloader will be signed with a key that chains back to this one. However, the bootloader is not the only component that must be signed. Any drivers that are carried on ROMs on plug-in cards must also be signed. One approach here would have been for all hardware vendors to have their own keys. This would have been unscalable - any shipped machine would have to carry keys for every vendor who produces PCI cards. If a machine carried an nvidia key but not an AMD one, swapping a geforce for a radeon would have resulted in the firmware graphics driver failing to load. Instead, Microsoft are providing a signing service. Vendors will be able to sign up for WHQL membership and have their UEFI drivers signed by Microsoft.&lt;br /&gt;&lt;br /&gt;This leads to the problem. The Authenticode format used for signing UEFI objects only allows for a single signature. If a driver is signed by Microsoft, it can't be signed by anybody else. Therefore, if a system vendor wants to support off-the-shelf PCI devices with Microsoft-signed drivers, the system must carry Microsoft's key. If the same key is used as the root of trust for the driver signing and for the bootloader signing, that also means that the system will boot Windows.&lt;br /&gt;&lt;h2&gt;This is only a problem for clients, not servers&lt;/h2&gt;Not strictly true. While Microsoft's current requirements don't mandate the presence of Secure Boot on server hardware, if present it must be enabled and locked down as it is for clients. It's not valid for servers to ship with disabled Secure Boot support, or for it to be shipped in a mode allowing users to make automated policy modifications at OS install time.&lt;br /&gt;&lt;h2&gt;Secure Boot is required by NIST&lt;/h2&gt;This is one that I've heard from multiple people working on Secure Boot. It's amazingly untrue. The document they're referring to is &lt;a href=&quot;http://csrc.nist.gov/publications/nistpubs/800-147/NIST-SP800-147-April2011.pdf&quot;&gt;NIST SP800-147&lt;/a&gt;, which is a document that describes guidelines for &lt;em&gt;firmware&lt;/em&gt; security - that is, what has to be done to ensure that the firmware itself is secure. This includes making sure that the OS can't overwrite the firmware and that firmware updates must be signed. It says absolutely nothing about the firmware only running signed software. Secure Boot depends upon the firmware being trusted, so these guidelines are effectively a required part of Secure Boot. But Secure Boot is not within the scope of SP800-147 at all.&lt;br /&gt;&lt;h2&gt;It's easy for Linux to implement Secure Boot&lt;/h2&gt;Misleading. From a technical perspective, sure. From a practical perspective, not at all. I wrote about the details &lt;a href=&quot;http://mjg59.dreamwidth.org/9844.html&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;h2&gt;It's only a problem for hobbyist Linux, not the real Linux market&lt;/h2&gt;Untrue. It's unclear whether even the significant Linux vendors can implement Secure Boot in a way that meets the needs of their customers and still allows them to boot on commodity hardware. A naive implementation removes many of the benefits of Linux for enterprise customers, such as the ability to use local modifications to micro-optimise systems for specific workloads. One of the key selling points of Linux is the ability to make use of local expertise when adapting the product for your needs. Secure Boot makes that more difficult.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;Much reporting on the issues surrounding Secure Boot so far has been inaccurate, leading to misunderstandings about the (genuine) benefits and the (genuine) drawbacks. Any useful discussion must be based around an accurate understanding of the specification rather than statements from analysts with no real understanding of the Linux market or security.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=10971&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Sun, 12 Feb 2012 19:55:01 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Is GPL usage really declining?</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/10696.html</guid>
	<link>http://mjg59.dreamwidth.org/10696.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
Matthew Aslett wrote about how &lt;a href=&quot;http://blogs.the451group.com/opensource/2011/12/15/on-the-continuing-decline-of-the-gpl/&quot;&gt;the proportion of projects released under GPL-like licenses appears to be declining&lt;/a&gt;, at least as far as various sets of figures go. But what does that actually mean? In absolute terms, GPL use has increased - any change isn't down to GPL projects transitioning over to liberal licenses. But an increasing number of new projects are being released under liberal licenses. Why is that?&lt;br /&gt;&lt;br /&gt;The figures from &lt;a href=&quot;http://osrc.blackducksoftware.com/data/licenses/&quot;&gt;Black Duck&lt;/a&gt; aren't a great help here, because they tell us very little about the software they're looking at. &lt;a href=&quot;http://flossmole.org&quot;&gt;FLOSSmole&lt;/a&gt; is rather more interesting. I pulled the license figures from a few sites and found the following proportion of GPLed projects:&lt;br /&gt;&lt;br /&gt;RubyForge: ~30%&lt;br /&gt;Google Code: ~50%&lt;br /&gt;Launchpad: ~70%&lt;br /&gt;&lt;br /&gt;I've left the numbers rough because there's various uncertainties - should proprietary licenses be included in the numbers, is CC Sharealike enough like the GPL to count it there, that kind of thing. But what's clear is that these three sites have massively different levels of GPL use, and it's not hard to imagine why. They all attract different types of developer. The RubyForge figures are obviously going to be heavily influenced by Ruby developers, and that (handwavily) implies more of a bias towards web developers than the general developer population. Launchpad, on the other hand, is going to have a closer association with people with an Ubuntu background - it's probably more representative of Linux developers. Google Code? The 50% figure is the closest to the 56.8% figure that Black Duck give, so it's probably representative of the more general development community.&lt;br /&gt;&lt;br /&gt;The impression gained from this is that the probability of you using one of the GPL licenses is influenced by the community that you're part of. And it's not a huge leap to believe that an increasing number of developers are targeting the web, and the web development community has never been especially attached to the GPL. It's not hard to see why - the benefits of the GPL vanish pretty much entirely when you're never actually obliged to distribute the code, and while Affero attempts to compensate from that it also constrains your UI and deployment model. No matter how strong a believer in Copyleft you are, the web makes it difficult for users to take any advantage of the freedoms you'd want to offer. It's as easy not to bother.&lt;br /&gt;So it's pretty unsurprising that an increase in web development would be associated with a decrease in the proportion of projects licensed under the GPL.&lt;br /&gt;&lt;br /&gt;This obviously isn't a rigorous analysis. I have very little hard evidence to back up my assumptions. But nor does anyone who claims that the change is because the FSF alienated the community during GPLv3 development. I'd be fascinated to see someone spend some time comparing project type with license use and trying to come up with a more convincing argument.&lt;br /&gt;&lt;br /&gt;(Raw data from FLOSSmole: Howison, J., Conklin, M., &amp;amp; Crowston, K. (2006). FLOSSmole: A collaborative repository for FLOSS research data and analyses. International Journal of Information Technology and Web Engineering, 1(3), 17–26.)&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=10696&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Thu, 09 Feb 2012 22:33:55 +0000</pubDate>
</item>
<item>
	<title>Peter Hutterer: Multitouch in X - Multitouch-touchpads</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6112936277054198647.post-1867181930264233336</guid>
	<link>http://feedproxy.google.com/~r/Who-t/~3/0-aqIr3Mmko/multitouch-in-x-multitouch-touchpads.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/whot.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
This post is part of a series on multi-touch support in the X.Org X server.

&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://who-t.blogspot.com/2011/12/multitouch-in-x-getting-events.html&quot;&gt;Multitouch in X - Getting events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://who-t.blogspot.com/2011/12/multitouch-in-x-pointer-emulation.html&quot;&gt;Multitouch in X - Pointer emulation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://who-t.blogspot.com/2012/01/multitouch-in-x-touch-grab-handling.html&quot;&gt;Multitouch in X - Touch grab handling&lt;/a&gt;
&lt;/li&gt;&lt;/ol&gt;

In this post, I'll outline the handling of touch events for multitouch-capable touchpads.
Multi-touch touchpads that are supported are those that provide position information for more than one finger. The current version of the synaptics X driver does some tricks to pretend two-finger interaction on single-finger touchpads - such devices are not applicable here.

&lt;br /&gt;&lt;br /&gt;

Touchpads are primarily pointer devices and any multi-touch interaction is usually a gesture. In the protocol, such devices are of the type &lt;i&gt;XIDependentDevice&lt;/i&gt; and the server does adjust touch event delivery. I've already hinted at this &lt;a href=&quot;http://who-t.blogspot.com/2011/12/multitouch-in-x-getting-events.html&quot;&gt;here&lt;/a&gt; but this time I'll give a more detailed explanation.

&lt;h2&gt;Touch event delivery&lt;/h2&gt;
Unlike for direct touch devices such as touchscreens, dependent devices have a different picking mechanism in the server. We assume that all gestures are semantically associated with the cursor position. For example, for scrolling, you would move the cursor on top of the window to be scrolled, then you would start scrolling. The server thus adjusts event delivery accordingly. Whereas for direct touch devices the touch events are delivered to whichever window is at the position of the touch, touch events from dependent devices are &lt;i&gt;always&lt;/i&gt; delivered to the window underneath the pointer (grab semantics are adjusted to follow the same rules). So if you start a gesture in the top-left corner of the touchpad, the window underneath the cursor gets the events with the top-left coordinates. Note that the event and root coordinates always reflect the pointer position.
&lt;br /&gt;&lt;br /&gt;

The average multi-touch touchpad has two modes of operation: single-finger operation where the purpose is to move the visible cursor and multi-finger operation which is usually interpreted into a gesture on the client. These two modes are important, as they too affect event delivery. The protocol specifies that any interaction with the device that serves to move the visible cursor only should not generate touch events, and that touch events will start once that interaction becomes a true multi-touch interaction. This leaves the drivers a little bit of leeway, but the current implementation in the synaptics driver is the following:
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;A user places one finger on the touchpad and moves. The client will receive regular pointer events.&lt;/li&gt;
&lt;li&gt;The user places a second finger on the touchpad. The client will now receive a TouchBegin event for the &lt;b&gt;first and the second touch&lt;/b&gt;, at their respective current positions in device coordinate range.&lt;/li&gt;
&lt;li&gt;Movement of either finger now will generate touch events, but no pointer events.&lt;/li&gt;
&lt;li&gt;Any other fingers will generate touch events only.&lt;/li&gt;
&lt;li&gt;When one of two remaining fingers on the touchpoint ceases the touch, a TouchEnd is sent for &lt;b&gt;both the terminating touch and the remaining touch&lt;/b&gt;. The remaining finger will revert to sending pointer events.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Legacy in-driver gestures&lt;/h2&gt;
As you are likely aware, the synaptics driver currently supports several pseudo gestures such as tap-to-click or two-finger scrolling. These gestures are interpreted in the driver, thus the server and client never see the raw data for them.

&lt;br /&gt;&lt;br /&gt;
With proper multi-touch support these gestures are now somewhat misplaced. On the one hand, we want the clients to interpret multitouch, on the other hand we want the gestures to be handled in the same manner in all applications. (Coincidentally, this is also a problem that we need to solve for &lt;a href=&quot;http://wayland.freedesktop.org&quot;&gt;Wayland&lt;/a&gt;). 
&lt;br /&gt;&lt;br /&gt;
We toyed with ideas of marking emulated events so clients can filter but since we do need to be compatible to the core and XI 1.x behaviours, we only found one solution: any in-driver gestures that alter event deliver must not generate touch events. Thus, if the driver is set to handle two-finger scrolling, the clients will only see the pointer events and scroll events, they will not see touch events from two-fingers. To get two-finger scrolling handled by the client, the in-driver gesture must be disabled. The obvious side-effect of that is that you then cannot scroll in applications that don't support the gestures. Oh well, it's the price we have to pay for having integrated gesture support in the wrong place.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6112936277054198647-1867181930264233336?l=who-t.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Who-t/~4/0-aqIr3Mmko&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 07 Feb 2012 12:27:19 +0000</pubDate>
</item>
<item>
	<title>Benjamin Otte: Google is killing Free Software</title>
	<guid isPermaLink="false">http://blogs.gnome.org/otte/?p=429</guid>
	<link>http://blogs.gnome.org/otte/2012/02/01/google-is-killing-free-software/</link>

	<description>
			&lt;img src=&quot;http://people.freedesktop.org/~company/stuff/company.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;Now that I got your attention with the catchy title, lemme rephrase that in a somewhat longer sentence:&lt;br /&gt;
&lt;/p&gt;&lt;blockquote&gt;
Google is the greatest danger to the Free Software movement at the current time.&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I’m not sure I should presume intent because of &lt;a href=&quot;http://en.wikipedia.org/wiki/Hanlon%27s_razor&quot;&gt;Hanlon’s razor&lt;/a&gt;, but a lot of &lt;a href=&quot;http://www.samba.org/~jra/&quot;&gt;smart&lt;/a&gt; &lt;a href=&quot;http://behdad.org/&quot;&gt;people&lt;/a&gt; concerned about Free Software work at Google, so they should at least be aware of it.
&lt;/p&gt;&lt;p&gt;
The first problem I have with Google is that they are actively working on making the world of Free Software a worse place. The best example for this is &lt;a href=&quot;http://en.wikipedia.org/wiki/Google_Native_Client&quot;&gt;Native Client&lt;/a&gt;. It’s essentially a tool that allows building web pages without submitting anything even resembling source code to the client. And thereby it’s killing the “View Source” option. (You could easily build such a tool as Free Software if instead of transmitting the binary, you’d transmit the source code. Compare HTML with Flash here.)
&lt;/p&gt;&lt;p&gt;
The second problem I have with Google is that what they do actively confuses people about Free Software. Google likes to portray itself as an &lt;a href=&quot;http://code.google.com/opensource/&quot;&gt;Open Source company&lt;/a&gt; and managed to accumulate a lot of geek cred that way (compared to Apple, Amazon or Microsoft). But unfortunately, a lot of people get introduced to Open Source and Free Software via Google. And &lt;a href=&quot;http://lwn.net/Articles/435774/&quot;&gt;withholding source code for a while&lt;/a&gt;, shipping &lt;a href=&quot;http://www.google.de/search?q=is+google+chrome+open+source&quot;&gt;source code to something similar&lt;/a&gt; are close enough to confuse unsuspecting bystanders. And I fear that behavior is doing more harm than good to Free Software.
&lt;/p&gt;&lt;p&gt;
All that said, I don’t think Google is stupid, illegal or even illogical in what they do. Everything they do makes sense. All I’m saying is that they’re &lt;a href=&quot;http://knowyourmeme.com/memes/scumbag-steve&quot;&gt;scumbags&lt;/a&gt; and you should be aware of that.&lt;/p&gt;</description>
	<pubDate>Wed, 01 Feb 2012 16:40:12 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: The ongoing fight against GPL enforcement</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/10437.html</guid>
	<link>http://mjg59.dreamwidth.org/10437.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
GPL enforcement is a surprisingly difficult task. It's not just a matter of identifying an infringement - you need to make sure you have a copyright holder on your side, spend some money sending letters asking people to come into compliance, spend more money initiating a suit, spend even more money encouraging people to settle, spend yet more money actually taking them to court and then maybe, at the end, you have some source code. One of the (tiny) number of groups involved in doing this is the &lt;a href=&quot;http://sfconservancy.org/&quot;&gt;Software Freedom Conservancy&lt;/a&gt;, a non-profit organisation that offers various services to free software projects. One of their notable activities is enforcing the license of Busybox, a GPLed multi-purpose application that's used in many embedded Linux environments. And this is where things get interesting&lt;br /&gt;&lt;br /&gt;GPLv2 (the license covering the relevant code) contains the following as part of section 4:&lt;br /&gt;&lt;br /&gt;&lt;cite&gt;Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License&lt;/cite&gt;.&lt;br /&gt;&lt;br /&gt;There's some argument over what this means, precisely, but GPLv3 adds the following paragraph:&lt;br /&gt;&lt;br /&gt;&lt;cite&gt;However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation&lt;/cite&gt;&lt;br /&gt;&lt;br /&gt;which tends to support the assertion that, under V2, once the license is terminated you've lost it forever. That gives the SFC a lever. If a vendor is shipping products using Busybox, and is found to be in violation, this interpretation of GPLv2 means that they have no license to ship Busybox again until the copyright holders (or their agents) grant them another. This is a bit of a problem if your entire stock consists of devices running Busybox. The SFC will grant a new license, but on one condition - not only must you provide the source code to Busybox, you must provide the source code to all other works on the device that require source distribution.&lt;br /&gt;&lt;br /&gt;The outcome of this is that we've gained access to large bodies of source code that would otherwise have been kept by companies. The SFC have successfully used Busybox to force the source release of many vendor kernels, ensuring that users have the freedoms that the copyright holders granted to them. Everybody wins, with the exception of the violators. And it seems that they're unenthusiastic about that.&lt;br /&gt;&lt;br /&gt;A couple of weeks ago, &lt;a href=&quot;http://www.elinux.org/Busybox_replacement_project&quot;&gt;this page&lt;/a&gt; appeared on the elinux.org wiki. It's written by an engineer at Sony, and it's calling for contributions to rewriting Busybox. This would be entirely reasonable if it were for technical reasons, but it's not - it's explicitly stated that companies are afraid that Busybox copyright holders may force them to comply with the licenses of software they ship. If you ship this Busybox replacement instead of the original Busybox you'll be safe from the SFC. You'll be able to violate licenses with impunity.&lt;br /&gt;&lt;br /&gt;What can we do? The real problem here is that the SFC's reliance on Busybox means that they're only able to target infringers who use that Busybox code. No significant kernel copyright holders have so far offered to allow the SFC to enforce their copyrights, with the result that enforcement action will grind to a halt as vendors move over to this Busybox replacement. So, if you hold copyright over any part of the Linux kernel, I'd urge you to get in touch with them. The alternative is a strangely ironic world where Sony are simultaneously funding lobbying for copyright enforcement against individuals and tools to help large corporations infringe at will. I'm not enthusiastic about that.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=10437&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Mon, 30 Jan 2012 23:40:50 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: Getting conned: eBay/Paypal fun</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-60464287575012161</guid>
	<link>http://www.hadess.net/2012/01/getting-conned-ebaypaypal-fun.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
After seeing, this article about &quot;&lt;a href=&quot;http://www.guardian.co.uk/money/2012/jan/27/is-paypal-safe-protection&quot;&gt;How secure is Paypal for eBay sellers&lt;/a&gt;&quot; in this morning's Guardian, I'll share my personal experience with you.&lt;br /&gt;&lt;br /&gt;In October, I sold my first generation MacBook Air on eBay, and got a buyer within a day for the £500 &quot;Buy It Now&quot; price. &quot;Buy It Now&quot; requires using Paypal, and the £500 (minus commission) appeared in my Paypal account¹. After a bit of to and fro, the buyer got in contact, and suggested that he come and pick it up. Saving about £30 of shipping, and sorting out the sale faster, strike me as good ideas.&lt;br /&gt;&lt;br /&gt;The &quot;buyer&quot; said he couldn't come, sent one of his &quot;employees&quot;. A very courteous man came to pick the laptop. In hindsight, he seemed slightly uncomfortable, and looked like he was very happy to see how easy it was going to be.&lt;br /&gt;&lt;br /&gt;The spooky thing is that within 40 minutes -- note, not 3 hours, not a day after, not the day before) -- within 40 minutes of the laptop getting picked up, the holder of the eBay and Paypal accounts submitted an &quot;unauthorised account activity claim&quot;, leading to &quot;payment reversal&quot; (me owing £500 to Paypal²).&lt;br /&gt;&lt;br /&gt;During my call to eBay's customer support, I was told that &quot;I had nothing to worry about&quot; (I'm guessing that would be the case as long as I repaid the £500). Paypal promptly sent a mail mentioning they needed my help, but with very little possibilities from my side (&quot;no courier tracking number? Give us the money now&quot;).&lt;br /&gt;&lt;br /&gt;Surrey Police failed to find the culprits, with the 2 mobile numbers associated with the con only being pay-as-you-go phones (topped up in a little convenience store in North London that only keeps a day's worth of CCTV).&lt;br /&gt;&lt;br /&gt;So my advices:&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;&quot;&gt;&lt;li&gt;If you sell anything via eBay using Paypal, send it recorded, and keep the receipt.&lt;/li&gt;&lt;li&gt;If you bought a MacBook Air first generation with the serial W88500DJ12G, it's stolen, send me an e-mail.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;And as opposed to Mssrs Lodge and Reakes, Paypal didn't reimburse me anything, and I'm £500 out of pocket.&lt;br /&gt;&lt;br /&gt;¹: I'll pass you the details on eBay referring to a closed Paypal account that meant I got conned two days later than the &quot;buyers&quot; anticipated.&lt;br /&gt;²: On an account that was already closed, see ¹.&lt;br /&gt;&lt;br /&gt;Update: Added mention of eBay's ludicrously bad customer service.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-60464287575012161?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sat, 28 Jan 2012 16:27:55 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: Wacom tablets in GNOME 3.4</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-7984899940372226974</guid>
	<link>http://www.hadess.net/2012/01/wacom-tablets-in-gnome-34.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;a href=&quot;https://live.gnome.org/action/diff/Design/SystemSettings/Tablet#Mockups&quot;&gt;Working from designs&lt;/a&gt;.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;The cool stuff first&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&amp;lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://i.ytimg.com/vi/607uIdBmozU/0.jpg&quot; height=&quot;266&quot; width=&quot;320&quot;&amp;gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/607uIdBmozU?version=3&amp;amp;amp;f=user_uploads&amp;amp;amp;c=google-webdrive-0&amp;amp;amp;app=youtube_gdata&quot;/&amp;gt;&amp;lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot;/&amp;gt;&amp;lt;embed height=&quot;266&quot; src=&quot;http://www.youtube.com/v/607uIdBmozU?version=3&amp;amp;amp;f=user_uploads&amp;amp;amp;c=google-webdrive-0&amp;amp;amp;app=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;320&quot;&amp;gt;&amp;lt;/embed&amp;gt;&amp;lt;/object&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Cosimo Cecchi presents the updated Wacom settings&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;Go to &lt;a href=&quot;http://youtu.be/607uIdBmozU&quot;&gt;YouTube directly&lt;/a&gt; if you can't see the video here.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A new arrival&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As mentioned by Cosimo, we have a new library to help us implement the settings you saw: &lt;a href=&quot;http://linuxwacom.git.sourceforge.net/git/gitweb.cgi?p=linuxwacom/libwacom;a=summary&quot;&gt;libwacom&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;libwacom is there to give us metadata about tablets, whether or not they are connected to your system, the list of styli it supports, as well as information about the styli themselves. As you can see from the UI, it's pretty important that we know:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;whether the tablet is builtin (so we know whether you can calibrate it)&lt;/li&gt;&lt;li&gt;which form factor it has&lt;/li&gt;&lt;li&gt;the list of styli it supports&lt;/li&gt;&lt;li&gt;for each stylus, its full name, the number of buttons, what it looks like&lt;/li&gt;&lt;/ul&gt;In the past, all this information was only available within the drivers (as comments), exported in different ways (sysfs attributes), non-machine readable in public documentation, or, worst of all, hidden in Wacom's internal drivers for OS X or Windows.&lt;br /&gt;&lt;br /&gt;So if you have a Wacom tablet, send us a &lt;a href=&quot;http://linuxwacom.git.sourceforge.net/git/gitweb.cgi?p=linuxwacom/libwacom;a=blob;f=data/wacom.example;hb=HEAD&quot;&gt;definition file for your tablet&lt;/a&gt;, so you can configure it with the impression that the software actually knows about your device.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Where's that configuration again&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After knowing what each tablet had to offer, we had to have a way to match the definitions to XInput devices, assign settings per-tablet, and importantly, switch stylus configuration when the user switches stylus. This is done using the new GsdWacomDevice and GsdWacomStylus objects, shared between gnome-settings-daemon (which will apply the configuration) and gnome-control-center (which will set the configuration).&lt;br /&gt;&lt;br /&gt;This also means we have a few debugging applications, such as list-wacom in gnome-settings-daemon, &lt;a href=&quot;https://gist.github.com/1688632&quot;&gt;to show you the attached GsdWacomDevices&lt;/a&gt;, or test-wacom in gnome-control-center, to test display of particular tablets if you don't own them (this is the place where I spend a lot of time).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What's next&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Peter Hutterer, my input buddy at Red Hat, who made the original Wacom panel for GNOME 3.2, and the first version of libwacom, is currently spending a lot of time on Multi-Touch, and fixing bugs I report in the Wacom driver.&lt;br /&gt;&lt;br /&gt;Jason Gerecke, from Wacom, who did most of the initial work on calibration support, is working on the related display-mapping. This will allow choosing whether a tablet's working area is the whole desktop, or a single monitor when in multiple monitors are used.&lt;br /&gt;&lt;br /&gt;For my part, after fixing the layout bugs that so annoy me in the settings panel, I'll be starting work on tablet button mapping. I look forward to &lt;a href=&quot;http://eu.shop.wacom.eu/detail/index/sArticle/453/sCategory/86366&quot;&gt;making the LEDs on the tablet match up&lt;/a&gt; with the selected keyboard shortcut!&lt;br /&gt;&lt;br /&gt;Many thanks to Cosimo and Monty for helping out with presenting the work, and doing the video.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-7984899940372226974?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Fri, 27 Jan 2012 13:07:16 +0000</pubDate>
</item>
<item>
	<title>Lennart Poettering: The Case for the /usr Merge</title>
	<guid isPermaLink="false">http://0pointer.de/blog/projects/the-usr-merge</guid>
	<link>http://0pointer.de/blog/projects/the-usr-merge.html</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/big/mezcalero.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;One of the features of Fedora 17 is &lt;a href=&quot;https://fedoraproject.org/wiki/Features/UsrMove&quot;&gt;the /usr merge&lt;/a&gt;, put
forward by Harald Hoyer and Kay Sievers&lt;sup&gt;[1]&lt;/sup&gt;. In the time since this
feature has been proposed repetitive discussions took place all over the various
Free Software communities, and usually the same questions were asked: what the reasons
behind this feature were, and whether it makes sense to adopt the same scheme for
distribution XYZ, too.&lt;/p&gt;

&lt;p&gt;Especially in the Non-Fedora world it appears to be socially unacceptable to
actually have a look at the &lt;a href=&quot;https://fedoraproject.org/wiki/Features/UsrMove&quot;&gt;Fedora feature page&lt;/a&gt;
(where many of the questions are already brought up and answered) which is very unfortunate. To
improve the situation I spent some time today to summarize the reasons for the
/usr merge independently. I'd hence like to direct you to this new page I put
up which tries to summarize the reasons for this, with an emphasis on the
compatibility point of view:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge&quot;&gt;The Case for the /usr Merge&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that even though this page is in the systemd wiki, what it covers is
mostly orthogonal to systemd. systemd supports both systems with a merged /usr
and with a split /usr, and the /usr merge should be interesting for non-systemd
distributions as well.&lt;/p&gt;

&lt;p&gt;Primarily I put this together to have a nice place to point all those folks
who continue to write me annoyed emails, even though I am actually not even
working on all of this...&lt;/p&gt;

&lt;p&gt;Enjoy the read!&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;small&gt;Footnotes:&lt;/small&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;[1] And not actually by me, I am just a supportive spectator and am
not doing any work on it. Unfortunately some tech press folks created the false
impression I was behind this. But credit where credit is due, this is all
Harald's and Kay's work.&lt;/small&gt;&lt;/p&gt;</description>
	<pubDate>Thu, 26 Jan 2012 21:29:00 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: UEFI and bugs</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/10014.html</guid>
	<link>http://mjg59.dreamwidth.org/10014.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
I gave a presentation on UEFI at LCA 2012 - you can watch it &lt;a href=&quot;http://www.youtube.com/watch?v=V2aq5M3Q76U&amp;amp;feature=plcp&amp;amp;context=C357673bUDOEgsToPDskIJQ_A8jhzWG_EMZFIxAikS&quot;&gt;here&lt;/a&gt;, with the bonus repeat (and different jokes) &lt;a href=&quot;http://www.youtube.com/watch?v=IfKF7mEY5Dc&amp;amp;feature=plcp&amp;amp;context=C3959357UDOEgsToPDskJhioS9toUYMrSq2HTgo1Pf&quot;&gt;here&lt;/a&gt;. It's a gentle introduction to UEFI, followed by some discussion of the problems we've faced in dealing with implementation bugs.&lt;br /&gt;&lt;br /&gt;The fundamental problem is that UEFI is a lot of code. And I really do mean a &lt;em&gt;lot&lt;/em&gt; of code. Ignoring drivers, the x86 Linux kernel is around 30MB of code. A comparable subset of the UEFI tree is around 35MB. UEFI is of a comparable degree of complexity to the Linux kernel. There's no reason to assume that the people who've actually written this code are significantly more or less competent than an average Linux developer, so all else being equal we'd probably expect somewhere around the same number of bugs per line. Of course, not all else is equal.&lt;br /&gt;&lt;br /&gt;Even today, basically all hardware is shipping with BIOS by default. The only people to enable UEFI are enthusiasts. Various machines will pop up all kinds of dire warnings if you try to turn it on. UEFI has had very little real world testing. And it really does show. In the few months I've been working on UEFI I've discovered machines where SetVirtualAddressMap() calls code that has already been (per spec) discarded. I've seen cases where it was possible to create variables, but not to delete them. I've seen a machine that would irreparably corrupt its firmware when you tried to set a variable. I've tripped over code that fails to parse invalid boot variables, bricking the hardware. Many vendors independently fail to report the correct framebuffer stride. And those are just the ones that have ended up on hardware which crosses my desk, which means I haven't even tested the majority of consumer-grade hardware with UEFI.&lt;br /&gt;&lt;br /&gt;The problems with UEFI have very little to do with its design or the ability of the people implementing it. After a few years of iterative improvements it stands a good chance of being more reliable and useful than BIOS. Increased commonality of code between vendors is a blessing and a curse - in the long term it means that these bugs can be shaken out, but in the short term it means that at least one hardware-destroying bug has ended up carried by multiple vendors. Right now we're still in the short term and it's likely that we'll find yet more UEFI bugs that cause all sorts of problems. The next few years will probably be a bumpy ride.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=10014&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Mon, 23 Jan 2012 15:52:51 +0000</pubDate>
</item>
<item>
	<title>Lennart Poettering: Plumbers Wishlist, The Third Edition, a.k.a. "The Thank You Edition"</title>
	<guid isPermaLink="false">http://0pointer.de/blog/projects/plumbers-wishlist-3</guid>
	<link>http://0pointer.de/blog/projects/plumbers-wishlist-3.html</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/big/mezcalero.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;Last October &lt;a href=&quot;http://0pointer.de/blog/projects/plumbers-wishlist-2.html&quot;&gt;we published a
wishlist for plumbing related features&lt;/a&gt; we'd like to see added to the Linux
kernel. Three months later it's time to publish a short update, and explain
what has been implemented in the kernel, what people have started working on,
and what's still missing.&lt;/p&gt;

&lt;p&gt;The full, updated list is &lt;a href=&quot;https://docs.google.com/document/pub?id=1RmJrtIoTnivkmR9KCqfJNBnEll4X9Jtu0xj5w6hFGs8&quot;&gt;available
on Google Docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In general, I must say that the list turned out to be a great success. It
shows how awesome the Open Source community is: Just ask nicely and there's a
good chance they'll fulfill your wishes! Thank you very much, Linux
community!&lt;/p&gt;

&lt;p&gt;We'd like to thank everybody who worked on any of the features on that list:
Lucas De Marchi, Andi Kleen, Dan Ballard, Li Zefan, Kirill A. Shutemov,
Davidlohr Bueso, Cong Wang, Lennart Poettering, Kay Sievers.&lt;/p&gt;

&lt;p&gt;Of the items on the list 5 have been fully implemented and are already part
of a released kernel, or already merged for inclusion for the next kernels
being released.&lt;/p&gt;

&lt;p&gt;For 4 further items patches have been posted, and I am hoping they'll get
merged eventually. Davidlohr, Wang, Zefan, Kirill, it would be great if you'd
continue working on your patches, as we think they are following the right
approach&lt;sup&gt;[1]&lt;/sup&gt; even if there was some opposition to them on LKML. So,
please keep pushing to solve the outstanding issues and thanks for your work so far!&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;small&gt;Footnotes&lt;/small&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;[1] Yes, I still believe that tmpfs quota should be implemented via
resource limits, as everything else wouldn't work, as we don't want to
implement complex and fragile userspace infrastructure to racily upload complex
quota data for all current and future UIDs ever used on the system into each
tmpfs mount point at mount time.&lt;/small&gt;&lt;/p&gt;</description>
	<pubDate>Fri, 20 Jan 2012 20:26:00 +0000</pubDate>
</item>
<item>
	<title>Peter Hutterer: XKB breaking grabs - CVE-2012-0064</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6112936277054198647.post-8782642693717588379</guid>
	<link>http://feedproxy.google.com/~r/Who-t/~3/KBUJeNOWYMM/xkb-breaking-grabs-cve-2012-0064.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/whot.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
Given that there is a copious amount of misinformation being spread, here is a summary of &lt;a href=&quot;https://www.redhat.com/security/data/cve/CVE-2012-0064.html&quot;&gt;CVE-2012-0064&lt;/a&gt;, straight from a horse's mouth.

&lt;h2&gt;Outline of the issue&lt;/h2&gt;
The bug allows users to work around screen locking (e.g. gnome-screensaver) by hitting Control+Alt+keypad multiply or Control+Alt+keypad divide. This terminates the input grab the screensaver has and thus allows a user to interact with the desktop, skipping the password entry.

&lt;h2&gt;Affected versions&lt;/h2&gt;
Affected is anyone running X server 1.11 or later (or release candidates thereof). So if &quot;Xorg -version&quot; shows something else on your box, stop worrying. I doubt any distribution would have back-ported the patches.
&lt;br /&gt;&lt;br /&gt;
In Fedora/Red Hat land - the only distributions affected are Fedora 16 and current Fedora Rawhide. Both have been fixed, the F16 update is avaialble &lt;a href=&quot;https://admin.fedoraproject.org/updates/FEDORA-2012-0712/xkeyboard-config-2.3-3.fc16&quot;&gt;here&lt;/a&gt;. Note that the update is to &lt;b&gt;xkeyboard-config&lt;/b&gt;, not to the server itself.
&lt;br /&gt;&lt;br /&gt;

Fedora 15 is not affected. RHEL 4, 5, 6 and thus CentOS 4, 5, 6 and other derivatives are not affected. I believe that most other distributions have now pushed out updates as well, if you want to link to the respective updates, please do so in the comments.
&lt;br /&gt;&lt;br /&gt;
Sergey has also pushed out &lt;a href=&quot;http://listserv.bat.ru/xkb/Message/8375.html&quot;&gt;xkeyboard-config 2.5&lt;/a&gt; today with the fix included.

&lt;h2&gt;History of the feature&lt;/h2&gt;
The X protocol does not allow the server to break grabs. Once a client has a grab, the server must wait for that client to release the grab, terminate, or the grab window to become unviewable. This is an issue when debugging applications - if your client has a keyboard grab, you cannot use the debugger since all key events will go to the client being debugged. To avoid this issue, the X server has had two combinations to break grabs: Control+Alt+Keypad multiply and Control+Alt+Keypad divide. They forced grab termination inside the X server and although against the protocol it made debugging possible. The option required explicit enabling in the xorg.conf.
&lt;br /&gt;&lt;br /&gt;
These options were removed in server 1.4 and disabled since. Which made debugging hard, so last year we merged a patch to bring them back, together with some other features. They are triggered by XKB actions (as they used to be). The plan was to remove the XKB actions from the default keymap so that the action is available on request but not enabled by default. This is where a miscommunication happened, the removal from the default keymap never happened. So server 1.11 and vanilla xkeyboard-config ship with both the actions available and present in the current keymap. As a result, any user can break a grab from any application and thus get around screen locking.

&lt;h2&gt;Outline of the fix&lt;/h2&gt;
To shoot yourself in the foot, you need two items: a gun and a trigger. We have removed the trigger. The fix we've now pushed into xkeyboard-config removes the actions from the default keymap and into an XKB option instead. So the fix does not remove the gun, but it requires the user to screw the trigger in themselves before trying to hurt themselves. In a default configuration, it is thus no longer possible to break the grab of your screensaver.
&lt;br /&gt;&lt;br /&gt;
To re-enable grab debugging, run setxkbmap with &quot;-option grab:break_actions&quot; or enable &quot;Allow breaking grabs with keyboard actions (warning: security risk)&quot; in the &quot;Miscellaneous compatibility options&quot; in your keyboard layout configuration tool of choice.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6112936277054198647-8782642693717588379?l=who-t.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Who-t/~4/KBUJeNOWYMM&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 20 Jan 2012 02:39:39 +0000</pubDate>
</item>
<item>
	<title>Lennart Poettering: systemd for Administrators, Part XII</title>
	<guid isPermaLink="false">http://0pointer.de/blog/projects/security</guid>
	<link>http://0pointer.de/blog/projects/security.html</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/big/mezcalero.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;Here's &lt;a href=&quot;http://0pointer.de/blog/projects/inetd.html&quot;&gt;the&lt;/a&gt; &lt;a href=&quot;http://0pointer.de/blog/projects/instances.html&quot;&gt;twelfth&lt;/a&gt; &lt;a href=&quot;http://0pointer.de/blog/projects/on-etc-sysinit.html&quot;&gt;installment&lt;/a&gt;
&lt;a href=&quot;http://0pointer.de/blog/projects/the-new-configuration-files.html&quot;&gt;of&lt;/a&gt;

&lt;a href=&quot;http://0pointer.de/blog/projects/blame-game.html&quot;&gt;my&lt;/a&gt; &lt;a href=&quot;http://0pointer.de/blog/projects/changing-roots&quot;&gt;ongoing&lt;/a&gt; &lt;a href=&quot;http://0pointer.de/blog/projects/three-levels-of-off.html&quot;&gt;series&lt;/a&gt;
&lt;a href=&quot;http://0pointer.de/blog/projects/systemd-for-admins-4.html&quot;&gt;on&lt;/a&gt;
&lt;a href=&quot;http://0pointer.de/blog/projects/systemd-for-admins-3.html&quot;&gt;systemd&lt;/a&gt;
&lt;a href=&quot;http://0pointer.de/blog/projects/systemd-for-admins-2.html&quot;&gt;for&lt;/a&gt;
&lt;a href=&quot;http://0pointer.de/blog/projects/systemd-for-admins-1.html&quot;&gt;Administrators&lt;/a&gt;:&lt;/p&gt;

&lt;h4&gt;Securing Your Services&lt;/h4&gt;

&lt;p&gt;One of the core features of Unix systems is the idea of privilege separation
between the different components of the OS. Many system services run under
their own user IDs thus limiting what they can do, and hence the impact they
may have on the OS in case they get exploited.&lt;/p&gt;

&lt;p&gt;This kind of privilege separation only provides very basic protection
however, since in general system services run this way can still do at least as
much as a normal local users, though not as much as root. For security purposes
it is however very interesting to limit even further what services can do, and
shut them off a couple of things that normal users are allowed to do.&lt;/p&gt;

&lt;p&gt;A great way to limit the impact of services is by employing MAC technologies
such as SELinux. If you are interested to secure down your server, running
SELinux is a very good idea. systemd enables developers and administrators to
apply additional restrictions to local services independently of a MAC. Thus,
regardless whether you are able to make use of SELinux you may still enforce
certain security limits on your services.&lt;/p&gt;

&lt;p&gt;In this iteration of the series we want to focus on a couple of these
security features of systemd and how to make use of them in your services.
These features take advantage of a couple of Linux-specific technologies that have
been available in the kernel for a long time, but never have been exposed in a
widely usable fashion. These systemd features have been designed to be as easy to use
as possible, in order to make them attractive to administrators and upstream
developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Isolating services from the network&lt;/li&gt;
&lt;li&gt;Service-private &lt;tt&gt;/tmp&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Making directories appear read-only or inaccessible to services&lt;/li&gt;
&lt;li&gt;Taking away capabilities from services&lt;/li&gt;
&lt;li&gt;Disallowing forking, limiting file creation for services&lt;/li&gt;
&lt;li&gt;Controlling device node access of services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All options described here are documented in systemd's man pages, notably &lt;a href=&quot;http://0pointer.de/public/systemd-man/systemd.exec.html&quot;&gt;systemd.exec(5)&lt;/a&gt;.
Please consult these man pages for further details.&lt;/p&gt;

&lt;p&gt;All these options are available on all systemd systems, regardless if
SELinux or any other MAC is enabled, or not.&lt;/p&gt;

&lt;p&gt;All these options are relatively cheap, so if in doubt use them. Even if you
might think that your service doesn't write to &lt;tt&gt;/tmp&lt;/tt&gt; and hence enabling
&lt;tt&gt;PrivateTmp=yes&lt;/tt&gt; (as described below) might not be necessary, due to
today's complex software it's still beneficial to enable this feature, simply
because libraries you link to (and plug-ins to those libraries) which you do
not control might need temporary files after all. Example: you never know what
kind of NSS module your local installation has enabled, and what that NSS module
does with &lt;tt&gt;/tmp&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;These options are hopefully interesting both for administrators to secure
their local systems, and for upstream developers to ship their services secure
by default.  We strongly encourage upstream developers to consider using these
options by default in their upstream service units. They are very easy to make
use of and have major benefits for security.&lt;/p&gt;

&lt;h4&gt;Isolating Services from the Network&lt;/h4&gt;

&lt;p&gt;A very simple but powerful configuration option you may use in systemd
service definitions is &lt;tt&gt;PrivateNetwork=&lt;/tt&gt;:&lt;/p&gt;

&lt;pre&gt;...
[Service]
ExecStart=...
PrivateNetwork=yes
...&lt;/pre&gt;

&lt;p&gt;With this simple switch a service and all the processes it consists of are
entirely disconnected from any kind of networking. Network interfaces became
unavailable to the processes, the only one they'll see is the loopback device
&quot;lo&quot;, but it is isolated from the real host loopback. This is a very powerful
protection from network attacks.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Caveat:&lt;/b&gt; Some services require the network to be operational. Of
course, nobody would consider using &lt;tt&gt;PrivateNetwork=yes&lt;/tt&gt; on a
network-facing service such as Apache. However even for non-network-facing
services network support might be necessary and not always obvious. Example: if
the local system is configured for an LDAP-based user database doing glibc name
lookups with calls such as &lt;tt&gt;getpwnam()&lt;/tt&gt; might end up resulting in network access.
That said, even in those cases it is more often than not OK to use
&lt;tt&gt;PrivateNetwork=yes&lt;/tt&gt; since user IDs of system service users are required to
be resolvable even without any network around. That means as long as the only
user IDs your service needs to resolve are below the magic 1000 boundary using
&lt;tt&gt;PrivateNetwork=yes&lt;/tt&gt; should be OK.&lt;/p&gt;

&lt;p&gt;Internally, this feature makes use of network namespaces of the kernel. If
enabled a new network namespace is opened and only the loopback device
configured in it.&lt;/p&gt;

&lt;h4&gt;Service-Private /tmp&lt;/h4&gt;

&lt;p&gt;Another very simple but powerful configuration switch is
&lt;tt&gt;PrivateTmp=&lt;/tt&gt;:&lt;/p&gt;

&lt;pre&gt;...
[Service]
ExecStart=...
PrivateTmp=yes
...&lt;/pre&gt;

&lt;p&gt;If enabled this option will ensure that the &lt;tt&gt;/tmp&lt;/tt&gt; directory the
service will see is private and isolated from the host system's &lt;tt&gt;/tmp&lt;/tt&gt;.
&lt;tt&gt;/tmp&lt;/tt&gt; traditionally has been a shared space for all local services and
users. Over the years it has been a major source of security problems for a
multitude of services. Symlink attacks and DoS vulnerabilities due to guessable
&lt;tt&gt;/tmp&lt;/tt&gt; temporary files are common. By isolating the service's
&lt;tt&gt;/tmp&lt;/tt&gt; from the rest of the host, such vulnerabilities become moot.&lt;/p&gt;

&lt;p&gt;For Fedora 17 a &lt;a href=&quot;https://fedoraproject.org/wiki/Features/ServicesPrivateTmp&quot;&gt;feature has
been accepted&lt;/a&gt; in order to enable this option across a large number of
services.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Caveat:&lt;/b&gt; Some services actually misuse &lt;tt&gt;/tmp&lt;/tt&gt; as a location
for IPC sockets and other communication primitives, even though this is almost
always a vulnerability (simply because if you use it for communication you need
guessable names, and guessable names make your code vulnerable to DoS and symlink
attacks) and &lt;tt&gt;/run&lt;/tt&gt; is the much safer replacement for this, simply
because it is not a location writable to unprivileged processes. For example,
X11 places it's communication sockets below &lt;tt&gt;/tmp&lt;/tt&gt; (which is actually
secure -- though still not ideal -- in this exception since it does so in a
safe subdirectory which is created at early boot.) Services which need to
communicate via such communication primitives in &lt;tt&gt;/tmp&lt;/tt&gt; are no
candidates for &lt;tt&gt;PrivateTmp=&lt;/tt&gt;. Thankfully these days only very few
services misusing &lt;tt&gt;/tmp&lt;/tt&gt; like this remain.&lt;/p&gt;

&lt;p&gt;Internally, this feature makes use of file system namespaces of the kernel.
If enabled a new file system namespace is opened inheritng most of the host
hierarchy with the exception of &lt;tt&gt;/tmp&lt;/tt&gt;.&lt;/p&gt;

&lt;h4&gt;Making Directories Appear Read-Only or Inaccessible to Services&lt;/h4&gt;

&lt;p&gt;With the &lt;tt&gt;ReadOnlyDirectories=&lt;/tt&gt; and &lt;tt&gt;InaccessibleDirectories=&lt;/tt&gt;
options it is possible to make the specified directories inaccessible for
writing resp. both reading and writing to the service:&lt;/p&gt;

&lt;pre&gt;...
[Service]
ExecStart=...
InaccessibleDirectories=/home
ReadOnlyDirectories=/var
...
&lt;/pre&gt;

&lt;p&gt;With these two configuration lines the whole tree below &lt;tt&gt;/home&lt;/tt&gt;
becomes inaccessible to the service (i.e. the directory will appear empty and
with 000 access mode), and the tree below &lt;tt&gt;/var&lt;/tt&gt; becomes read-only.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Caveat:&lt;/b&gt; Note that &lt;tt&gt;ReadOnlyDirectories=&lt;/tt&gt; currently is not
recursively applied to submounts of the specified directories (i.e. mounts below
&lt;tt&gt;/var&lt;/tt&gt; in the example above stay writable). This is likely to get fixed
soon.&lt;/p&gt;

&lt;p&gt;Internally, this is also implemented based on file system namspaces.&lt;/p&gt;

&lt;h4&gt;Taking Away Capabilities From Services&lt;/h4&gt;

&lt;p&gt;Another very powerful security option in systemd is
&lt;tt&gt;CapabilityBoundingSet=&lt;/tt&gt; which allows to limit in a relatively fine
grained fashion which kernel capabilities a service started retains:&lt;/p&gt;

&lt;pre&gt;...
[Service]
ExecStart=...
CapabilityBoundingSet=CAP_CHOWN CAP_KILL
...
&lt;/pre&gt;

&lt;p&gt;In the example above only the CAP_CHOWN and CAP_KILL capabilities are
retained by the service, and the service and any processes it might create have
no chance to ever acquire any other capabilities again, not even via setuid
binaries. The list of currently defined capabilities is available in &lt;a href=&quot;http://linux.die.net/man/7/capabilities&quot;&gt;capabilities(7)&lt;/a&gt;.
Unfortunately some of the defined capabilities are overly generic (such as
CAP_SYS_ADMIN), however they are still a very useful tool, in particular for
services that otherwise run with full root privileges.&lt;/p&gt;

&lt;p&gt;To identify precisely which capabilities are necessary for a service to run
cleanly is not always easy and requires a bit of testing. To simplify this
process a bit, it is possible to blacklist certain capabilities that are
definitely not needed instead of whitelisting all that might be needed. Example: the
CAP_SYS_PTRACE is a particularly powerful and security relevant capability
needed for the implementation of debuggers, since it allows introspecting and
manipulating any local process on the system. A service like Apache obviously
has no business in being a debugger for other processes, hence it is safe to
remove the capability from it:&lt;/p&gt;

&lt;pre&gt;...
[Service]
ExecStart=...
CapabilityBoundingSet=~CAP_SYS_PTRACE
...&lt;/pre&gt;

&lt;p&gt;The &lt;tt&gt;~&lt;/tt&gt; character the value assignment here is prefixed with inverts
the meaning of the option: instead of listing all capabalities the service
will retain you may list the ones it will not retain.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Caveat:&lt;/b&gt; Some services might react confused if certain capabilities are
made unavailable to them. Thus when determining the right set of capabilities
to keep around you need to do this carefully, and it might be a good idea to talk
to the upstream maintainers since they should know best which operations a
service might need to run successfully.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Caveat 2:&lt;/b&gt; &lt;a href=&quot;https://forums.grsecurity.net/viewtopic.php?f=7&amp;amp;t=2522&quot;&gt;Capabilities are
not a magic wand.&lt;/a&gt; You probably want to combine them and use them in
conjunction with other security options in order to make them truly useful.&lt;/p&gt;

&lt;p&gt;To easily check which processes on your system retain which capabilities use
the &lt;tt&gt;pscap&lt;/tt&gt; tool from the &lt;tt&gt;libcap-ng-utils&lt;/tt&gt; package.&lt;/p&gt;

&lt;p&gt;Making use of systemd's &lt;tt&gt;CapabilityBoundingSet=&lt;/tt&gt; option is often a
simple, discoverable and cheap replacement for patching all system daemons
individually to control the capability bounding set on their own.&lt;/p&gt;

&lt;h4&gt;Disallowing Forking, Limiting File Creation for Services&lt;/h4&gt;

&lt;p&gt;Resource Limits may be used to apply certain security limits on services
being run. Primarily, resource limits are useful for resource control (as the
name suggests...) not so much access control. However, two of them can be
useful to disable certain OS features: RLIMIT_NPROC and RLIMIT_FSIZE may be
used to disable forking and disable writing of any files with a size &amp;gt;
0:&lt;/p&gt;

&lt;pre&gt;...
[Service]
ExecStart=...
LimitNPROC=1
LimitFSIZE=0
...&lt;/pre&gt;

&lt;p&gt;Note that this will work only if the service in question drops privileges
and runs under a (non-root) user ID of its own or drops the CAP_SYS_RESOURCE
capability, for example via &lt;tt&gt;CapabilityBoundingSet=&lt;/tt&gt; as discussed above.
Without that a process could simply increase the resource limit again thus
voiding any effect.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Caveat:&lt;/b&gt; &lt;tt&gt;LimitFSIZE=&lt;/tt&gt; is pretty brutal. If the service
attempts to write a file with a size &amp;gt; 0, it will immeidately be killed with
the SIGXFSZ which unless caught terminates the process. Also, creating files
with size 0 is still allowed, even if this option is used.&lt;/p&gt;

&lt;p&gt;For more information on these and other resource limits, see &lt;a href=&quot;http://linux.die.net/man/2/setrlimit&quot;&gt;setrlimit(2)&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Controlling Device Node Access of Services&lt;/h4&gt;

&lt;p&gt;Devices nodes are an important interface to the kernel and its drivers.
Since drivers tend to get much less testing and security checking than the core
kernel they often are a major entry point for security hacks. systemd allows
you to control access to devices individually for each service:&lt;/p&gt;

&lt;pre&gt;...
[Service]
ExecStart=...
DeviceAllow=/dev/null rw
...&lt;/pre&gt;

&lt;p&gt;This will limit access to &lt;tt&gt;/dev/null&lt;/tt&gt; and only this device node,
disallowing access to any other device nodes.&lt;/p&gt;

&lt;p&gt;The feature is implemented on top of the &lt;tt&gt;devices&lt;/tt&gt; cgroup controller.&lt;/p&gt;

&lt;h4&gt;Other Options&lt;/h4&gt;

&lt;p&gt;Besides the easy to use options above there are a number of other security
relevant options available. However they usually require a bit of preparation
in the service itself and hence are probably primarily useful for upstream
developers. These options are &lt;tt&gt;RootDirectory=&lt;/tt&gt; (to set up
&lt;tt&gt;chroot()&lt;/tt&gt; environments for a service) as well as &lt;tt&gt;User=&lt;/tt&gt; and
&lt;tt&gt;Group=&lt;/tt&gt; to drop privileges to the specified user and group. These
options are particularly useful to greatly simplify writing daemons, where all
the complexities of securely dropping privileges can be left to systemd, and
kept out of the daemons themselves.&lt;/p&gt;

&lt;p&gt;If you are wondering why these options are not enabled by default: some of
them simply break seamntics of traditional Unix, and to maintain compatibility
we cannot enable them by default. e.g. since traditional Unix enforced that
&lt;tt&gt;/tmp&lt;/tt&gt; was a shared namespace, and processes could use it for IPC we
cannot just go and turn that off globally, just because &lt;tt&gt;/tmp&lt;/tt&gt;'s role in
IPC is now replaced by &lt;tt&gt;/run&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;And that's it for now. If you are working on unit files for upstream or in
your distribution, please consider using one or more of the options listed
above. If you service is secure by default by taking advantage of these options
this will help not only your users but also make the Internet a safer
place.&lt;/p&gt;</description>
	<pubDate>Fri, 20 Jan 2012 01:26:00 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Why UEFI secure boot is difficult for Linux</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/9844.html</guid>
	<link>http://mjg59.dreamwidth.org/9844.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
I wrote about the &lt;a href=&quot;http://mjg59.dreamwidth.org/6054.html&quot;&gt;technical details&lt;/a&gt; of supporting the UEFI secure boot specification with Linux. Despite me pretty clearly saying that this was ignoring issues of licensing and key distribution and the like, people are now using it to claim that Linux could support secure boot with minimal effort. In a sense, they're right. The technical implementation details are fairly straightforward. But they're not the difficult bit.&lt;br /&gt;&lt;h3&gt;Secure boot requires that all code that can touch hardware be trusted&lt;/h3&gt;Right now, if you can run unstrusted code before the OS then you can subvert the OS. Secure boot gives you a mechanism for making sure you only run trusted code, which protects against that. So your UEFI drivers have to be signed, your bootloader has to be signed, and your bootloader must only load a signed kernel. If you've only booted trusted code then you know that your OS is safe. But, unlike trusted boot, secure boot provides no way for you to know that only trusted code was executed. That has to be ensured by OS policy.&lt;br /&gt;&lt;br /&gt;This doesn't sound like too much of a problem. But it is. Imagine we have a signed Linux bootloader and a signed Linux kernel, and that these signatures are made with a globally trusted key. These will boot on any hardware using secure boot. Now imagine that an attacker writes a kernel module that sets up a fake UEFI environment, stops the kernel from running code and then executes the Windows bootloader - kind of like kexec, but a little more fiddly. The Windows bootloader believes that it's performing a secure boot, but in fact everything that it believes is trustworthy is the attacker's fake UEFI code. The user's encryption passphrase is logged, the Windows kernel is modified to hide the Linux code and despite everything looking fine your credit card details are on their way to China. In this scenario, the signed Linux kernel is simply used as a malware loader. The only sign that anything is wrong is that boot will be slightly slowed down.&lt;br /&gt;&lt;br /&gt;Signing the kernel isn't enough. Signed Linux kernels must refuse to load any unsigned kernel modules. Virtualbox on Linux? Dead. Nvidia binary driver on Linux? Dead. All out of tree kernel modules? Utterly, utterly dead. Building an updated driver locally? Not going to happen. That's going to make some people fairly unhappy.&lt;br /&gt;&lt;br /&gt;(The same applies to Windows, of course. Windows 7 allows you to disable driver integrity checks. Windows 8 will have to forbid that when the system's using secure boot)&lt;br /&gt;&lt;h3&gt;Licensing&lt;/h3&gt;GPLv3 has various requirements for signing keys to be available. Microsoft's new requirement that systems support the installation of user keys would let users boot their own modified bootloaders, so that may end up being sufficient to satisfy the license. But we're then beholden on Microsoft - if they remove that requirement then users lose that freedom, and suddenly we're in an awkward licensing situation. There are ongoing conversations about exactly what we're able to do here, but it's not a solved problem.&lt;br /&gt;&lt;h3&gt;Key distribution&lt;/h3&gt;The UEFI spec doesn't describe or mandate a central certifying authority. Microsoft require that everyone carry their key. We could generate our own, but we have much less sway with vendors. There's no way to guarantee that all hardware vendors will generate our key. And, obviously, if we generate a key, we can't just hand the private half out to others. That means that it becomes impossible for people to produce derivative versions of Linux distributions without getting their own key. The kind of identity verification that would be required for getting such a key is likely to be expensive, and also fairly likely to require that the distribution have a legally registered company in order to facilitate the identity verification. Think Extended Validation certificates, not Startssl Free. Hobbyist Linux distributions will be a thing of the past.&lt;br /&gt;&lt;h3&gt;Doesn't custom mode fix this?&lt;/h3&gt;Microsoft's certification requirements now state that all systems must support a custom mode, implying that it will be possible for a user to install their own keys. Linux vendors would then be able to ship with their own keys on the install media and impose their own policies. Everyone's happy. It's not really good enough, though. People have spent incredible amounts of time and effort making it easy to install Linux by doing little more than putting a CD in a drive. Asking them to go into the firmware and reconfigure things adds an extra barrier that restricts the ability to install Linux to more technically skilled users. And it's even worse than that. This is the full description of the requirement for custom mode:&lt;cite&gt;&lt;ol&gt;&lt;li&gt;It shall be possible for a physically present user to use the Custom Mode firmware setup option to modify the contents of the Secure Boot signature databases and the PK.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If the user ends up deleting the PK then, upon exiting the Custom Mode firmware setup, the system will be operating in Setup Mode with Secure Boot turned off.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The firmware setup shall indicate if Secure Boot is turned on, and if it is operated in Standard or Custom Mode. The firmware setup must provide an option to return from Custom to Standard Mode which restores the factory defaults.&lt;/li&gt;&lt;/ol&gt;&lt;/cite&gt;&lt;br /&gt;There's a few things missing from this, namely:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Any description of the UI. It's effectively impossible to document Linux installation when the first step becomes (a) complicated and (b) vendor specific. Vendors are using the UEFI transition to differentiate themselves by coming up with their own unique firmware interfaces. Custom mode is going to look different everywhere.&lt;/li&gt;&lt;li&gt;Any description of the key format. A raw binary representation of the key? An EFI_SIGNATURE_DATA struct? A base64 encoding of one, further protected with ROT13? We just don't know.&lt;/li&gt;&lt;li&gt;Any way to use custom mode for unattended installs. It's a firmware interface that requires a physically present user. Want to install a few thousand machines over the network? This isn't a scalable approach&lt;/li&gt;&lt;li&gt;…and this one's nitpicking, but there's not actually any requirement that the user be able to add keys - a vendor could conform to this language by only letting users delete keys. This is actually ok as long as the user deletes Pk, because then we'll effectively be back in setup mode and can install our own keys from the installer, but it still results in some practical problems&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;So no, custom mode doesn't make everything ok. Custom mode with a mandated UI and a documented key format would be much closer, but it wouldn't solve the problem of unattended automated installs.&lt;br /&gt;&lt;h3&gt;Summary&lt;/h3&gt;We can write the code required to support secure boot on Linux in a minimal amount of time - in fact, most of it's now done. But significant practical problems remain, and so far we have no workable solutions for any of them.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=9844&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Wed, 18 Jan 2012 00:55:05 +0000</pubDate>
</item>
<item>
	<title>Richard Hughes: New developments in the color management world</title>
	<guid isPermaLink="false">http://blogs.gnome.org/hughsie/?p=565</guid>
	<link>http://blogs.gnome.org/hughsie/2012/01/17/new-developments-in-color-management-world/</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/hughsie.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;My work in color management has been bubbling away in the background, and new features are being added slowly and carefully.&lt;/p&gt;
&lt;p&gt;One small, but nice feature is the new &lt;a href=&quot;https://gitorious.org/colord/master/blobs/master/doc/metadata-spec.txt&quot;&gt;metadata tags&lt;/a&gt; that I’ve been standardising with Florian Höch and others. Of these, &lt;em&gt;MAPPING_device_id&lt;/em&gt; is probably most interesting. This is a key that is automatically stored in the binary ICC profile itself, and stores the &lt;a href=&quot;https://gitorious.org/colord/master/blobs/master/doc/device-and-profile-naming-spec.txt&quot;&gt;device ID&lt;/a&gt; of the device that it was created for. This means if you re-install the system, or email the profile file to someone with identical hardware, it automatically gets added as the default profile, unless you’ve manually set the device to something better.&lt;/p&gt;
&lt;p&gt;From a security point of view, the colord daemon is no longer being ran as root, and instead uses a private group. Most of the work was done by Vincent Untz and the OpenSuse security team, but a few Ubuntu guys helped too and now we can worry less about random library vulnerabilities affecting us.&lt;/p&gt;
&lt;p&gt;Benedikt Morbach also switched colord to optionally use a systemd service file, which will allow us to do some cool things in the future with regard to preventing network access, respawning on failure and that kind of thing.&lt;/p&gt;
&lt;p&gt;So slowly but surely, we’re increasing the number of things that “just work” and updating colord to use a few best practices and the latest technologies. For the future, I’m looking at a wayland extension for full screen color management using a GLSL shader, but that’s some time away before it’ll be really useful, and allow us to simplify color management for applications even more by putting all the heavy lifting in toolkits.&lt;/p&gt;
&lt;p&gt;… so we’re getting there. &lt;img src=&quot;http://blogs.gnome.org/hughsie/wp-content/mu-plugins/tango-smilies/tango/face-smile.png&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;</description>
	<pubDate>Tue, 17 Jan 2012 09:10:34 +0000</pubDate>
</item>
<item>
	<title>Lennart Poettering: PulseAudio vs. AudioFlinger</title>
	<guid isPermaLink="false">http://0pointer.de/blog/projects/aruns-numbers</guid>
	<link>http://0pointer.de/blog/projects/aruns-numbers.html</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/big/mezcalero.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;&lt;a href=&quot;http://arunraghavan.net/2012/01/pulseaudio-vs-audioflinger-fight/&quot;&gt;Arun
put an awesome article up&lt;/a&gt;, detailing how PulseAudio compares to Android's
AudioFlinger in terms of power consumption and suchlike. Suffice to say,
PulseAudio rocks, but go and read the whole thing, it's worth it.&lt;/p&gt;

&lt;p&gt;Apparently, AudioFlinger is a great choice if you want to shorten your
battery life.&lt;/p&gt;</description>
	<pubDate>Mon, 16 Jan 2012 15:31:00 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Firmware bugs considered enraging</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/9525.html</guid>
	<link>http://mjg59.dreamwidth.org/9525.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
Part of our work to make it possible to use UEFI Secure Boot on Linux has been to improve our EFI variable support code. Right now this has a hardcoded assumption that variables are 1024 bytes or smaller, which was true in pre-1.0 versions of the EFI spec. Modern implementations allow the maximum variable size to be determined by the hardware, and with implementations using large key sizes and hashes 1024 bytes isn't really going to cut it. My first attempt at this was a little ugly but also fell foul of the fact that sysfs only allows writes of up to the size of a page - so 4KB on most of the platforms we're caring about. So I've now reimplemented it as a filesystem[1], which is trickier but avoids this problem nicely.&lt;br /&gt;&lt;br /&gt;Things were almost working fine - I could read variables of arbitrary sizes, and I could write to existing variables. I was just finishing hooking up new variable creation, but in the process accidentally set the contents of the Boot0002 variable to 0xffffffff 0xffffffff 0x00000000. Boot* variables provide the UEFI firmware with the different configured boot devices on the system - they can point either at a raw device or at a bootloader on a device, and they can do so using various different namespaces. They have a defined format, as documented in chapter 9 of the UEFI spec. At boot time the boot manager reads the variables and attempts to boot from them in a configured order as found in the BootOrder variable.&lt;br /&gt;&lt;br /&gt;Now, obviously, 0xffffffff 0x00000000 is unlikely to conform to the specification. And when I rebooted the machine, it gave me a flashing cursor and did nothing. Fair enough - I should be able to choose another boot path from the boot manager. Except the boot manager behaves identically, and I get a flashing cursor and nothing else.&lt;br /&gt;&lt;br /&gt;I reported this to the EDK2 development list, and Andrew Fish (who invented EFI back in the 90s) pointed me at the code that's probably responsible. It's in the BDS (Boot Device Selection) library that's part of the UEFI reference implementation from Intel, and you can find it &lt;a href=&quot;https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c&quot;&gt;here&lt;/a&gt;. The relevant function is BdsLibVariableToOption, which is as follows (with irrelevant bits elided):&lt;br /&gt;&lt;pre&gt;BdsLibVariableToOption (
  IN OUT LIST_ENTRY                   *BdsCommonOptionList,
  IN  CHAR16                          *VariableName
  )
{
  UINT16                    FilePathSize;
  UINT8                     *Variable;
  UINT8                     *TempPtr;
  UINTN                     VariableSize;
  VOID                      *LoadOptions;
  UINT32                    LoadOptionsSize;
  CHAR16                    *Description;

  //
  // Read the variable. We will never free this data.
  //
  Variable = BdsLibGetVariableAndSize (
              VariableName,
              &amp;amp;gEfiGlobalVariableGuid,
              &amp;amp;VariableSize
              );
  if (Variable == NULL) {
    return NULL;
  }
&lt;/pre&gt;So so far so good - we read the variable from flash and put it in Variable, Variable is now 0xffffffff 0xffffffff 0x00000000. If it hadn't existed we'd have skipped over and continued. VariableSize is 12.&lt;br /&gt;&lt;pre&gt;  //
  // Get the option attribute
  //
  TempPtr   =  Variable;
  Attribute =  *(UINT32 *) Variable;
  TempPtr   += sizeof (UINT32);
&lt;/pre&gt;Attribute is now 0xffffffff and TempPtr points to Variable + 4.&lt;br /&gt;&lt;pre&gt;  //
  // Get the option's device path size
  //
  FilePathSize =  *(UINT16 *) TempPtr;
  TempPtr      += sizeof (UINT16);
&lt;/pre&gt;FilePathSize is 0xffff, TempPtr points to Variable + 6.&lt;br /&gt;&lt;pre&gt;  //
  // Get the option's description string size
  //
  TempPtr     += StrSize ((CHAR16 *) TempPtr);
&lt;/pre&gt;TempPtr points to 0xffff 0x0000, so StrSize (which is basically strlen) will be 4. TempPtr now points to Variable + 10.&lt;br /&gt;&lt;pre&gt;  //
  // Get the option's device path
  //
  DevicePath =  (EFI_DEVICE_PATH_PROTOCOL *) TempPtr;
  TempPtr    += FilePathSize;
&lt;/pre&gt;TempPtr now points to Variable + 65545 (FilePathSize is 0xffff).&lt;br /&gt;&lt;pre&gt;  LoadOptions     = TempPtr;
  LoadOptionsSize = (UINT32) (VariableSize - (UINTN) (TempPtr - Variable));
&lt;/pre&gt;LoadOptionsSize is now 12 - (Variable + 65545 - Variable), or 12 - 65545, or -65533. But it's cast to an unsigned 32 bit integer, so it's actually 4294901763.&lt;br /&gt;&lt;pre&gt;  Option-&amp;gt;LoadOptions = AllocateZeroPool (LoadOptionsSize);
  ASSERT(Option-&amp;gt;LoadOptions != NULL);
&lt;/pre&gt;We attempt to allocate just under 4GB of RAM. This probably fails - if it does the boot manager exits. This probably means game over. But if it somehow succeeds:&lt;br /&gt;&lt;pre&gt;CopyMem (Option-&amp;gt;LoadOptions, LoadOptions, LoadOptionsSize);
&lt;/pre&gt;we then proceed to read almost 4GB of content from uninitialised addresses, and since Variable was probably allocated below 4GB that almost certainly includes all of your PCI space (which is typically still below 4GB) and bits of your hardware probably generate very unhappy signals on the bus and you lose anyway.&lt;br /&gt;&lt;br /&gt;So now I have a machine that won't boot, and the clear CMOS jumper doesn't clear the flash contents so I have no idea how to recover from it. And because this code is present in the Intel reference implementation, doing the same thing on most other UEFI machines would probably have the same outcome. Thankfully, it's not something people are likely to do by accident - using any of the standard interfaces will always generate a valid entry, so you could only trigger this when modifying variables by hand. But now I need to set up another test machine.&lt;br /&gt;&lt;br /&gt;[1] All code in Linux will evolve until the point where it's implemented as a filesystem.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=9525&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Fri, 06 Jan 2012 20:17:56 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: The economic incentive to violate the GPL</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/9387.html</guid>
	<link>http://mjg59.dreamwidth.org/9387.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
My &lt;a href=&quot;http://mjg59.dreamwidth.org/8991.html&quot;&gt;post&lt;/a&gt; yesterday on how Google gains financial benefit from vendor GPL violations contained an assertion that some people have questioned - namely, &lt;cite&gt;&quot;unscrupulous hardware vendors save money by ignoring their GPL obligations&quot;&lt;/cite&gt;. And, to be fair, as written it's true but not entirely convincing. So instead, let's consider &quot;unscrupulous hardware vendors have economic incentives to ignore their GPL obligations&quot;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The direct act of compliance costs money&lt;/h3&gt;&lt;br /&gt;Complying with the GPL means having the source code that built the binaries you ship. This is easy if your workflow involves putting source in at one end and getting binaries out at the other, but getting to that workflow means having a certain degree of engineering rigour. If your current build process involves mixing a bunch of known good binaries you got from somewhere but you can't remember where with a hacked up source tree that exists on someone's hard drive and then pushing all of these into a tool that only runs on Windows ME, before taking the resulting image and replacing chunks of it by hand, compliance is effectively impossible.&lt;br /&gt;&lt;br /&gt;We all know that this is against all kinds of best practices and probably causes so many problems that it's more expensive in the long term, but retooling and hiring someone to oversee all of this takes time and money, and given the margins on many of these devices that's probably enough to make you uncompetitive for a couple of product cycles. Maybe you'll be in a better position afterwards, but you don't know that there'll be an afterwards.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Suppliers who don't provide you with the source code may be cheaper than those who do&lt;/h3&gt;&lt;br /&gt;You can't be in compliance if you don't have the source code in the first place. The same arguments that apply to the hardware vendors also apply to the people selling you your chips, so there's also an economic incentive for them to avoid complying. And there's an obvious incentive for you to choose the cheaper chipset, even if they don't comply.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Getting the source may cost money&lt;/h3&gt;&lt;br /&gt;Buying a chipset doesn't necessarily get you the software that makes it work - several silicon vendors will charge you for the SDK. But many of these devices are effectively reference platforms, so are basically identical from a hardware perspective. So if one of your competitors paid for the SDK, you can just dump the binaries off their machine, flash them onto your own boards and save yourself a decent amount of money. You obviously don't get the source, and nor do you have the standing to insist that the vendor whose binaries you misappropriated give you the source.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;In the absence of enforcement, GPL compliance only works if it's the norm&lt;/h3&gt;&lt;br /&gt;Let's imagine two companies, A and B. Both build a tablet device, and buy the full SDK including source code. Both find a bunch of bugs in the vendor SDK and fix a different subset of them. They ship. A provides source code. B doesn't. B can now take A's bugfixes and incorporate them, resulting in a more compelling product without any significant extra cost. You now have two products that can sell for the same price, but B's is better. A would need to prove that B copied their bugfixes rather than simply fixing them themselves , which probably isn't going to happen.&lt;br /&gt;&lt;br /&gt;In a larger market, if B is the only vendor who does this then their advantage isn't large - some of A's work is misappropriated by B, but A does benefit from the engineering work contributed by C, D, E, F and G. A combination of social pressure and legal threats may bring B into compliance. But if infringement is the norm, A has no incentive at all to release the source - by doing so they'll be helping not only B, but also C, D, E, F and G. Everyone undercuts A and they go out of business quite quickly.&lt;br /&gt;&lt;br /&gt;Moral: In the absence of enforcement, if everyone else is infringing, a single company who complies is at a disadvantage.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;If compliance cost nothing then everyone would do it&lt;/h3&gt;&lt;br /&gt;You can argue that cheap tablets from China are infringing simply because nobody knows better. But what's HTC's excuse? They've clearly decided that there's a benefit in holding back their source code releases[1], balancing this against the risk of being sued. They know full well what they're doing. If compliance was free they'd ship the source at the same time as they shipped the binaries. Other significant vendors are also fully aware of their obligations but choose to ignore them anyway.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Summary&lt;/h3&gt;&lt;br /&gt;There are economic incentives to infringe the GPL, and therefore (all else being equal) an infringing device can be sold for less money. All else being equal, a cheaper device will sell more units. More sales means more devices selling adverts for Google. Google makes more money because Android vendors infringe the GPL.&lt;br /&gt;&lt;br /&gt;Edited to add:&lt;br /&gt;&lt;br /&gt;But don't just take my word for it - Jean-Baptiste Queru says the same &lt;a href=&quot;https://plus.google.com/112218872649456413744/posts/75aLL1dWY2u&quot;&gt;here&lt;/a&gt; (search for &quot;scrubbing&quot; - is there any way to link directly to a Google plus comment?)&lt;br /&gt;&lt;br /&gt;[1] The usual argument is &quot;We will release the source code within 120 days&quot;, implying that it's a process that takes time and we should just be patient. Every single time I've started making threatening noises, the source has appeared within a week.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=9387&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Wed, 04 Jan 2012 15:08:34 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Android, GPL violations and Google</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/8991.html</guid>
	<link>http://mjg59.dreamwidth.org/8991.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
A bit over a year ago, I &lt;a href=&quot;http://mjg59.livejournal.com/132339.html&quot;&gt;wrote&lt;/a&gt; about how an incredible number of Android tablets on the market were in violation of the terms of the GPL. I've had rather a lot else to do since then so it's now awfully out of date - but taking a quick browse through the current stack of cheaper devices indicates that things aren't all that much better. We've got source code for some chipsets that were missing it before, but to compensate we've got a whole bunch of new hardware that's entirely lacking. It's all pretty poor, really.&lt;br /&gt;&lt;br /&gt;At the time, I wrote the following:&lt;br /&gt;&lt;br /&gt;&lt;cite&gt;&quot;(Side note: People sometimes ask why Google aren't doing more to prevent infringing devices. For the vast majority of these cases, Google's sole contribution has been to put Android source code on a public website. Red Hat own more of the infringing code than Google do. There's no real reason why Google should be the ones taking the lead role here, and there's fairly sound business reasons why it's not in their interest to do so)&quot;&lt;/cite&gt;&lt;br /&gt;&lt;br /&gt;Factually speaking, nothing's changed. Each of these devices contains code owned by Google, and Google could absolutely take legal action against the vendors. Equally, so could Red Hat, Intel, Nokia and dozens of other companies who hold copyright on portions of the code carried on these devices, and so could thousands of individuals around the world. Nobody's obliged to enforce their copyrights, and in the absence of anyone else doing so it's unreasonable to insist that Google should do it.&lt;br /&gt;&lt;br /&gt;However.&lt;br /&gt;&lt;br /&gt;Google gives Android away. This seems like an odd thing for them to do, given that it's a significant engineering effort and costs a lot of money to produce. But remember what Android brings to Google - it's a platform with a well-integrated mechanism for distributing advertising to users. Scanning the market shows a huge number of ad-supported apps, and Google's getting money for every single one of those that gets shown. The more Android devices, the bigger the market for apps - and the wider their advertising reach.&lt;br /&gt;&lt;br /&gt;In other words: unscrupulous hardware vendors save money by ignoring their GPL obligations. This lets them appeal on price, increasing the number of Android devices in use and increasing Google's profits. Google makes money off other people's violation of the GPL.&lt;br /&gt;&lt;br /&gt;Could Google do anything to stop this? Yes. They could sue for copyright infringement, but that kind of thing's time consuming and awkward and any argument about the GPL always seems to end up as a big argument involving conspiracy theories. Instead, Google could attach some extra conditions to the Android trademark. Requiring that the trademark only be attached to GPL-compliant products ought to allow Google to take advantage of the existing well-tested mechanisms for seizing counterfeit goods, providing a direct economic incentive for companies to come into compliance. For added marks, they could restrict the adwords code to devices that use the trademark - if the vendor removes the trademark, applications depending on the adwords functionality would refuse to run and Google wouldn't make money off the infringing hardware.&lt;br /&gt;&lt;br /&gt;Or, of course, they could just carry on making extra money as a result of vendors denying users the freedoms granted by the copyright holders. Although that sounds kind of evil to me.&lt;br /&gt;&lt;br /&gt;Edit: You probably also want to read the followup post &lt;a href=&quot;http://mjg59.dreamwidth.org/9387.html&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=8991&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Wed, 04 Jan 2012 03:11:38 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: TVs are all awful</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/8705.html</guid>
	<link>http://mjg59.dreamwidth.org/8705.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
A discussion a couple of days ago about DPI detection (which is best summarised by &lt;a href=&quot;http://lists.fedoraproject.org/pipermail/devel/2011-October/157671.html&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;http://lists.fedoraproject.org/pipermail/devel/2011-October/157760.html&quot;&gt;this&lt;/a&gt; and I am not having this discussion again) made me remember a chain of other awful things about consumer displays and EDID and there not being enough gin in the world, and reading various bits of the internet and wikipedia seemed to indicate that almost everybody who's written about this has issues with either (a) technology or (b) English, so I might as well write something.&lt;br /&gt;&lt;br /&gt;The first problem is unique (I hope) to 720p LCD TVs. 720p is an HD broadcast standard that's defined as having a resolution of 1280x720. A 720p TV is able to display that image without any downscaling. So, naively, you'd expect them to have 1280x720 displays. Now obviously I wouldn't bother mentioning this unless there was some kind of hilarious insanity involved, so you'll be entirely unsurprised when I tell you that most actually have 1366x768 displays. So your 720p content has to be upscaled to fill the screen anyway, but given that you'd have to do the same for displaying 720p content on a 1920x1080 device this isn't the worst thing ever in the world. No, it's more subtle than that.&lt;br /&gt;&lt;br /&gt;EDID is a standard for a blob of data that allows a display device to express its capabilities to a video source in order to ensure that an appropriate mode is negotiated. It allows resolutions to be expressed in a bunch of ways - you can set a bunch of bits to indicate which standard modes you support (1366x768 is not one of these standard modes), you can express the standard timing resolution (the horizontal resolution divided by 8, followed by an aspect ratio) and you can express a detailed timing block (a full description of a supported resolution).&lt;br /&gt;&lt;br /&gt;1366/8 = 170.75. Hm.&lt;br /&gt;&lt;br /&gt;Ok, so 1366x768 can't be expressed in the standard timing resolution block. The closest you can provide for the horizontal resolution is either 1360 or 1368. You also can't supply a vertical resolution - all you can do is say that it's a 16:9 mode. For 1360, that ends up being 765. For 1368, that ends up being 769.&lt;br /&gt;&lt;br /&gt;It's ok, though, because you can just put this in the detailed timing block, except it turns out that basically no TVs do, probably because the people making them are the ones who've taken all the gin.&lt;br /&gt;&lt;br /&gt;So what we end up with is a bunch of hardware that people assume is 1280x720, but is actually 1366x768, except they're telling your computer that they're either 1360x765 or 1368x769. And you're probably running an OS that's doing sub-pixel anti-aliasing, which requires that the hardware be able to address the pixels directly which is obviously difficult if you think the screen is one size and actually it's another. Thankfully Linux takes care of you here, and &lt;a href=&quot;http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/gpu/drm/drm_edid.c;h=3e927ce7557d6a41f7bc1a6e27b088be127006d0;hb=HEAD#l715&quot;&gt;this code&lt;/a&gt; makes everything ok. Phew, eh?&lt;br /&gt;&lt;br /&gt;But ha ha, no, it's worse than that. And the rest applies to 1080p ones as well.&lt;br /&gt;&lt;br /&gt;Back in the old days when TV signals were analogue and got turned into a picture by a bunch of magnets waving a beam of electrons about all over the place, it was impossible to guarantee that all TV sets were adjusted correctly and so you couldn't assume that the edges of a picture would actually be visible to the viewer. In order to put text on screen without risking bits of it being lost, you had to steer clear of the edges. Over time this became roughly standardised and the areas of the signal that weren't expected to be displayed were called overscan. Now, of course, we're in a mostly digital world and such things can be ignored, except that when digital TVs first appeared they were mostly used to watch analogue signals so still needed to overscan because otherwise you'd have the titles floating weirdly in the middle of the screen rather than towards the edges, and so because it's never possible to kill technology that's escaped into the wild we're stuck with it.&lt;br /&gt;&lt;br /&gt;tl;dr - Your 1920x1080 TV takes a 1920x1080 signal, chops the edges off it and then stretches the rest to fit the screen because of decisions made in the 1930s.&lt;br /&gt;&lt;br /&gt;So you plug your computer into a TV and even though you know what the resolution really is you still don't get to address the individual pixels. Even worse, the edges of your screen are missing.&lt;br /&gt;&lt;br /&gt;The best thing about overscan is that it's not rigorously standardised - different broadcast bodies have different recommendations, but you're then still at the mercy of what your TV vendor decided to implement. So what usually happens is that graphics vendors have some way in their drivers to compensate for overscan, which involves you manually setting the degree of overscan that your TV provides. This works very simply - you take your 1920x1080 framebuffer and draw different sized black borders until the edge of your desktop lines up with the edge of your TV. The best bit about this is that while you're still scanning out a 1920x1080 mode, your desktop has now shrunk to something more like 1728x972 and your TV is then scaling it back up to 1920x1080. Once again, you lose.&lt;br /&gt;&lt;br /&gt;The HDMI spec actually defines an extension block for EDID that indicates whether the display will overscan or not, but doesn't provide any way to work out &lt;em&gt;how much&lt;/em&gt; it'll overscan. We haven't seen many of those in the wild. It's also possible to send an HDMI information frame that indicates whether or not the video source is expecting to be overscanned or not, but (a) we don't do that and (b) it'll probably be ignored even if we did, because who ever tests this stuff. The HDMI spec also says that the default behaviour for 1920x1080 (but not 1366x768) should be to assume overscan. Charming.&lt;br /&gt;&lt;br /&gt;The best thing about all of this is that the same TV will often have different behaviour depending on whether you connect via DVI or HDMI, but some TVs will still overscan DVI. Some TVs have options in the menu to disable overscan and others don't. Some monitors will overscan if you feed them an HD resolution over HDMI, so if you have HD content and don't want to lose the edges then your hardware needs to scale it down and let the display scale it back up again. It's all awful. I recommend you drink until everything's already blurry and then none of this will matter.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=8705&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Tue, 03 Jan 2012 17:46:40 +0000</pubDate>
</item>
<item>
	<title>Peter Hutterer: Multitouch in X - Pointer emulation</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6112936277054198647.post-7626048294161699148</guid>
	<link>http://feedproxy.google.com/~r/Who-t/~3/SNSKUmogx84/multitouch-in-x-pointer-emulation.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/whot.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
This post is part of a series on multi-touch support in the X.Org X server. 

&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://who-t.blogspot.com/2011/12/multitouch-in-x-getting-events.html&quot;&gt;Multitouch in X - Getting events&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

In this post, I'll outline how pointer emulation on touch events works.

This post assumes basic knowledge of the XI2 Xlib interfaces.

&lt;h2&gt;Why pointer emulation?&lt;/h2&gt;
One of the base requirements of adding multitouch support to the X server
was that traditional, non-multitouch applications can still be used.
Multitouch should be a transparent addition, available where needed, not
required where not supported.
&lt;br /&gt;
&lt;br /&gt;
So we do pointer emulation for multitouch events, and it's actually
specified in the protocol how we do it. Mainly so it's reliable and
predictable for clients.

&lt;h2&gt;What is pointer emulation in X&lt;/h2&gt;
Pointer emulation simply means that for specific touch sequences, we
generate pointer events. The conditions for emulation are that the 
the touch sequence is eligible for pointer emulation (details
below) and that no other client has a touch selection on that window/grab.
&lt;br /&gt;
&lt;br /&gt;

The second condition is important: if your client selects for both touch and
pointer events on a window, you will never see the emulated pointer events.
If you are an XI 2.2 client and you select for pointer but not touch events,
you will see pointer events. These events are marked with the
&lt;i&gt;XIPointerEmulated&lt;/i&gt; so that you know they come from an emulated source.

&lt;h2&gt;Emulation on direct-touch devices&lt;/h2&gt;
For direct-touch devices, we emulate pointer events for a touch sequence provided the touch is the &lt;i&gt;first&lt;/i&gt; touch on the device, i.e. no other touch sequences were active for this device when the touch started. The touch sequence is emulated until it ends, even if other touches start and end while that sequence is active.

&lt;h2&gt;Emulation on dependent-touch devices&lt;/h2&gt;
Dependent touch devices do not emulate pointer events. Rather, we send the
normal mouse movements from the device as regular pointer events.

&lt;h2&gt;Button events and button state&lt;/h2&gt;
Pointer emulation triggers motion events and, more importantly, button
events. The button number for touches is hardcoded to 1 (any more specific
handling such as long-click for right buttons should be handled by
touch-aware clients instead), so the detail field of an emulated button
event is 1 (unless the button is logically mapped).
&lt;br /&gt;
&lt;br /&gt;

The button state field on emulated pointer events adjusts for pointer emulation as it would for regular button events. The button state is thus (usually) 0x0 for the emulated ButtonPress and 0x100 for the MotionNotify and ButtonRelease events.

&lt;br /&gt;
&lt;br /&gt;
Likewise, any request that returns the button state will have the appropriate
state set, &lt;b&gt;even if no emulated event actually got sent&lt;/b&gt;.
&lt;br /&gt;
&lt;br /&gt;

Grab handling works as for regular pointer events, though the interactions
between touch grabs and emulated pointer grabs are somewhat complex. I'll
get to that in a later post.

&lt;h2&gt;The confusing bit&lt;/h2&gt;
There is one behaviour about the pointer emulation that may be confusing,
even though the specs may seem logical and the behaviour is within the
specs.
&lt;br /&gt;
&lt;br /&gt;

If you put one finger down, it will emulate pointer events. If you then put
another finger down, the first finger will continue to emulate pointer
events. If you now lift the first finger (keeping the second down) and put
the first finger down again, that finger will not generate events. 
This is noticable mainly in bi-manual or multi-user interaction.
&lt;br /&gt;
&lt;br /&gt;

The reason this doesn't work is simple: to the X server, putting the first
finger down just looks like another touchpoint appearing when there is
already one present. The server does not know that this is the same finger
again, it doesn't know that your intention was to emulate again with that
finger. Most of the semantics for such interaction is in your head alone and
hard to guess. Guessing it wrong can be quite bad, since that new touchpoint
may have been part of a two-finger gesture with the second finger and whoops
- instead of scrolling you just closed a window, pasted your password
somewhere or killed a kitten. So we err on the side of
caution, because, well, think of the kittens.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6112936277054198647-7626048294161699148?l=who-t.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Who-t/~4/SNSKUmogx84&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Mon, 02 Jan 2012 23:56:19 +0000</pubDate>
</item>
<item>
	<title>Peter Hutterer: Multitouch in X - Touch grab handling</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6112936277054198647.post-8511630842963928276</guid>
	<link>http://feedproxy.google.com/~r/Who-t/~3/cfCLwsGqMbI/multitouch-in-x-touch-grab-handling.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/whot.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
This post is part of a series on multi-touch support in the X.Org X server.

&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://who-t.blogspot.com/2011/12/multitouch-in-x-getting-events.html&quot;&gt;Multitouch in X - Getting events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://who-t.blogspot.com/2011/12/multitouch-in-x-pointer-emulation.html&quot;&gt;Multitouch in X - Pointer emulation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

In this post, I'll outline how grabs on touch events work. This post assumes basic knowledge of the XI2 Xlib interfaces. 
&lt;h2&gt;Passive grabs&lt;/h2&gt;
The &lt;a href=&quot;http://cgit.freedesktop.org/xorg/lib/libXi/tree/include/X11/extensions/XInput2.h&quot;&gt;libXi
interface&lt;/a&gt; has one new passive grab call: &lt;i&gt;XIGrabTouchBegin&lt;/i&gt;, which
works pretty much like the existing passive grab APIs. As with event selection, you must
set all three event masks XI_TouchBegin, XI_TouchUpdate and XI_TouchEnd or a
BadValue error occurs. Once a passive grab activates in response to a touch,
the client &lt;b&gt;must&lt;/b&gt; choose to either &lt;b&gt;accept&lt;/b&gt; or &lt;b&gt;reject&lt;/b&gt; a touch.
Details on that below.
&lt;br /&gt; &lt;br /&gt;
Grabs activate on a TouchBegin event and due to the nature of multitouch,
multiple touch grabs may be active at any time - some of them for different
clients.

&lt;h2&gt;Active grabs&lt;/h2&gt;
Active grabs do not have a new call, they are handled through the event masks of the existing &lt;a href=&quot;http://www.x.org/archive/X11R7.5/doc/man/man3/XIGrabDevice.3.html&quot;&gt;XIGrabDevice(3)&lt;/a&gt; call. If a client has an active touch grab on the device, it is automatically the owner of the touch sequence (ownership is described below). If a client has an active pointer or keyboard grab on the device, it is the owner of the touch sequence for pointer emulated touch events only. Other touch events are unaffected by the grab and are processed normally.

&lt;h2&gt;Acceptance and rejection&lt;/h2&gt;
Pointer grabs provide exclusive access to the device, but to some degree a
client can opt to replay the event it received on the next client. We expect
that touch sequences will often trigger gesture recognition, and a client may realise after a few events that it doesn't actually want that touch sequence. So we expanded
the replay semantics. clients with a touch
grab &lt;b&gt;must&lt;/b&gt; choose to either &lt;b&gt;accept&lt;/b&gt; or &lt;b&gt;reject&lt;/b&gt; a touch.
&lt;br /&gt; &lt;br /&gt;

Accepting a touch signals to the server that the touch sequence is meant for
this client and no-one else. The server then exclusively delivers to that
client until the terminating TouchEnd. &lt;br /&gt; &lt;br /&gt;

Rejecting a touch sequence signals that the touch sequence is not meant for
this client. Once a client rejects a touch sequence, the server sends the
TouchEnd event to that client (if the touch is still active) and &lt;i&gt;replays
the full touch sequence&lt;/i&gt; &lt;a href=&quot;http://feeds.feedburner.com/Who-t#footnote_1&quot;&gt;[1]&lt;/a&gt; on the next grab
or window. We use the term &lt;b&gt;owner&lt;/b&gt; of a touch sequence to talk about
the current recipient.
&lt;br /&gt;
&lt;br /&gt;
The order of events for two clients Cg and Cw, with Cg having a
grab and Cw having a regular touch event selection on a window, is thus:
&lt;pre style=&quot;&quot;&gt;TouchBegin to Cg    → 
TouchUpdate to Cg   → 
TouchUpdate to Cg   → 
                    ← Cg rejects touch
                    ← Cw becomes new owner
TouchEnd+ to Cg     →
TouchBegin* to Cw   → 
TouchUpdate* to Cw  → 
TouchUpdate* to Cw  → 
#### physical touch ends #### 
TouchEnd to Cw      →
&lt;/pre&gt;
&lt;small&gt;Events with + mark an event created by the server, * mark events replayed by the server&lt;/small&gt;

&lt;br /&gt;
&lt;br /&gt;
For nested grabs, this sequence simply repeats for each client until either
a grabbing client accepts the touch or the client with the event selection
becomes the owner.
&lt;br /&gt;
&lt;br /&gt;
In the above case, the touch ended after Cg rejected the touch. If the touch
ends before the current owner accepted or rejected it, the owner gets the
TouchEnd event and the touch is left handing until the owner accepts or
rejects it. If accepted, that's it. If rejected, the new owner gets the
full sequence in one go, including the TouchEnd event. The sequence is thus:
&lt;pre style=&quot;&quot;&gt;TouchBegin to Cg    → 
TouchUpdate to Cg   → 
TouchUpdate to Cg   → 
#### physical touch ends #### 
TouchEnd to Cg      →
                    ← Cg rejects touch
                    ← Cw becomes new owner
TouchBegin* to Cw   → 
TouchUpdate* to Cw  → 
TouchUpdate* to Cw  → 
TouchEnd* to Cw     →
&lt;/pre&gt;
&lt;h2&gt;Touch ownership handling&lt;/h2&gt;
One additional event type that XI 2.2 introduces is the
&lt;i&gt;XI_TouchOwnership&lt;/i&gt; event. Clients selecting for this event signal that
they need to receive touch events &lt;b&gt;before they're the owner of the
touch sequence&lt;/b&gt;. This  event type can be selected on both grabs and event
selections.
&lt;br /&gt;&lt;br /&gt;
First up: there are specific use-cases where you need this. If you don't
fall into them, you're better off just skipping on ownership events, they
make everything more complicated. And whether you need ownership events
depends not only on you, but also the stack you're running under.
On normal touch event selection, touch events are only delivered to the
current owner of the touch. With multiple grabs, the delivery is sequential
and delivery of touch events may be delayed.
&lt;br /&gt;&lt;br /&gt;
Clients selecting for touch ownership events get the events as they occur,
even if they are not the current owner. The XI_TouchOwnership event is
delivered if and when they become the current owner. The last part is
important: if you select for ownership events, you may receive touch events
but you may not become the owner of that sequence. So while you can start
reacting to that sequence, anything your app does must be undo-able in case
the e.g. window manager claims the touch sequence.
&lt;br /&gt;&lt;br /&gt;
If we look at the same sequence as above with two clients selecting for
ownership, the sequence looks like this:
&lt;br /&gt;
&lt;pre style=&quot;&quot;&gt;TouchBegin to Cg     → 
TouchBegin to Cw     → 
TouchOwnership to Cg →
TouchUpdate to Cg    → 
TouchUpdate to Cw    → 
TouchUpdate to Cg    → 
TouchUpdate to Cw    → 
                     ← Cg rejects touch
                     ← Cw becomes new owner
TouchEnd+ to Cg      →
TouchOwnership to Cw →
#### physical touch ends #### 
TouchEnd to Cw      →
&lt;/pre&gt;
&lt;small&gt;Note: TouchOwnership events do not correspond to any physical event, they are always generated by the server&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;
If a touch ends before the owner accepts, the current owner gets the
TouchEnd, all others get a TouchUpdate event instead. That TouchUpdate has a
flag &lt;b&gt;XITouchPendingEnd&lt;/b&gt; set, signalling that no more actual events
will arrive from this touch but the touch is still waiting for owner
acceptance.
&lt;pre style=&quot;&quot;&gt;TouchBegin to Cg     → 
TouchBegin to Cw     → 
TouchOwnership to Cg →
TouchUpdate to Cg    → 
TouchUpdate to Cw    → 
TouchUpdate to Cg    → 
TouchUpdate to Cw    → 
#### physical touch ends #### 
TouchEnd to Cg       →
TouchUpdate to Cw    →  (XITouchPendingEnd flag set)
                     ← Cg rejects touch
                     ← Cw becomes new owner
TouchOwnership to Cw →
TouchEnd to Cw       →
&lt;/pre&gt;
In both cases, we dealt with a rejecting owner. For an accepting owner, the
sequences look like this:
&lt;pre style=&quot;&quot;&gt;TouchBegin to Cg     → 
TouchBegin to Cw     → 
TouchOwnership to Cg →
TouchUpdate to Cg    → 
TouchUpdate to Cw    → 
TouchUpdate to Cg    → 
TouchUpdate to Cw    → 
                     ← Cg accepts touch
TouchEnd+ to Cw      →
TouchUpdate to Cg    → 
#### physical touch ends #### 
TouchEnd to Cg      →
&lt;/pre&gt;
or 
&lt;pre style=&quot;&quot;&gt;TouchBegin to Cg     → 
TouchBegin to Cw     → 
TouchOwnership to Cg →
TouchUpdate to Cg    → 
TouchUpdate to Cw    → 
TouchUpdate to Cg    → 
TouchUpdate to Cw    → 
#### physical touch ends #### 
TouchEnd to Cg       →
TouchUpdate to Cw    →  (XITouchPendingEnd flag set)
                     ← Cg accepts touch
TouchEnd* to Cw      →
&lt;/pre&gt;
In the case of multiple grabs, the same strategy applies in order of grab
activation. Ownership events may be selected by some clients but not others.
In that case, each client is treated as requested, so the event sequence the
server deals with may actually look like this:
&lt;pre style=&quot;&quot;&gt;TouchBegin to C1     → 
TouchBegin to C3     → 
TouchOwnership to C1 →
TouchUpdate to C1    → 
TouchUpdate to C3    → 
TouchUpdate to C1    → 
TouchUpdate to C3    → 
                     ← C1 rejects touch
                     ← C2 becomes new owner
TouchEnd+ to C1      →
TouchBegin* to C2    → 
TouchUpdate* to C2   → 
TouchUpdate* to C2   → 
                     ← C2 rejects touch
                     ← C3 becomes new owner
TouchEnd+ to C2      →
TouchOwnership to C3 →
#### physical touch ends #### 
TouchEnd to C3       →
&lt;/pre&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;small&gt;
&lt;a name=&quot;footnote_1&quot;&gt;&lt;/a&gt;[1] obviously we need to store these events so
&quot;full sequence&quot; really means all events until the buffer was full
&lt;/small&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6112936277054198647-8511630842963928276?l=who-t.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Who-t/~4/cfCLwsGqMbI&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Mon, 02 Jan 2012 23:56:05 +0000</pubDate>
</item>
<item>
	<title>Richard Hughes: Translators wanted!</title>
	<guid isPermaLink="false">http://blogs.gnome.org/hughsie/?p=561</guid>
	<link>http://blogs.gnome.org/hughsie/2011/12/28/translators-wanted/</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/hughsie.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;Does anybody want to help translate the&lt;a href=&quot;https://gitorious.org/colorhug/client&quot;&gt; colorhug-client project&lt;/a&gt; to new languages? The transifex page &lt;a href=&quot;https://www.transifex.net/projects/p/colorhug-client/&quot;&gt;is here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If any strings are difficult to translate let me know and I’ll either add translator comments or reword them. Thanks!&lt;/p&gt;</description>
	<pubDate>Wed, 28 Dec 2011 11:56:13 +0000</pubDate>
</item>
<item>
	<title>Dave Airlie: update on hotplug server</title>
	<guid isPermaLink="false">http://airlied.livejournal.com/75555.html</guid>
	<link>http://airlied.livejournal.com/75555.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
No new videos yet, need to fix some more rendering bugs so it looks nicer :)&lt;br /&gt;&lt;br /&gt;So I've been working towards 3 setups:&lt;br /&gt;&lt;br /&gt;a) intel rendering + nouveau offload&lt;br /&gt;b) nouveau rendering + DVI output + intel LVDS output&lt;br /&gt;c) hotplug USB with either intel or nvidia rendering.&lt;br /&gt;&lt;br /&gt;Categorisation of devices roles:&lt;br /&gt;I've identified 4 devices roles so far:&lt;br /&gt;preferred master: the device is happy to be master&lt;br /&gt;reluctant master: the device can be a master but would rather not be&lt;br /&gt;offload slave: device can be used as an additional DRI2 renderer for a master&lt;br /&gt;output slave: device can be used an additional output for a master&lt;br /&gt;&lt;br /&gt;For the 3 setups above:&lt;br /&gt;a) intel would be preferred master, nvidia would be offload slave&lt;br /&gt;b) nvidia would be preferred master, intel would be output slave&lt;br /&gt;c) usb devices would be output slaves, however if no master exists, usb device would be reluctant master.&lt;br /&gt;&lt;br /&gt;I've rebased the prime work[1] on top of the dma-buf upstream work, and worked through most of the lifetime problems. Some locking issues still exist, and I'll have to get back to them. But the code works and doesn't oops randomly which is good.&lt;br /&gt;&lt;br /&gt;prime is the kernel magic needed for this work, as it allows sharing of a buffer between two drm drivers, so for (a) it shares the dri2 front pixmap between devices, for (b/c) it shares a pixmap that the rendering gpu copies dirty updates to and the output slaves use as their scanout pixmap.&lt;br /&gt;&lt;br /&gt;So I've done nearly all the work to share between intel and nouveau and I've done the kernel driver work for udl, but I haven't done the last piece in userspace for (c), which is to use the shared pixmap as usb scanout via the modesetting driver.&lt;br /&gt;&lt;br /&gt;Today I hacked in a switch on the first randr command, so I can start the X server with intel as master and nouveau in offload mode. I can run gears on intel or nouveau, then after the randr command and another randr command to set a mode, the X server migrates everything to the nouveau driver, puts it in master mode, and places the intel driver into output slave mode. It seems to render my xterm + metacity content fine.&lt;br /&gt;&lt;br /&gt;So the current short-term TODO is:&lt;br /&gt;fix some issues with my nouveau/exa port rendering&lt;br /&gt;fix some issues with xcompmgr&lt;br /&gt;add usb output slave support.&lt;br /&gt;&lt;br /&gt;Medium-term TODO:&lt;br /&gt;worked out how to control this stuff, via randr protocol. How much information do we need to expose to clients about GPUs, and how do we control them. Open issues with atomicity of updates to avoid major uglys. Switching from intel master to nvidia master + intel outputs, means we have to reconfigure the Intel output to point at the new pixmap, but the more steps we put in there for clients to do, the more ugly and flashing we'll see on screen, however we probably want a lot of this to be client driven (i.e. gnome-settings-daemon).&lt;br /&gt;&lt;br /&gt;Longer term TODO:&lt;br /&gt;Get GLX_ARB_robustness done, now that Ian has done the context creation stuff, this should be a lot more trivial. (so trivial someone else could do it :)&lt;br /&gt;&lt;br /&gt;[1] &lt;a href=&quot;http://cgit.freedesktop.org/~airlied/linux/log/?h=drm-prime-dmabuf&quot; rel=&quot;nofollow&quot;&gt;http://cgit.freedesktop.org/~airlied/linux/log/?h=drm-prime-dmabuf&lt;/a&gt;</description>
	<pubDate>Thu, 22 Dec 2011 17:28:41 +0000</pubDate>
</item>
<item>
	<title>Peter Hutterer: Multitouch in X - Getting events</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6112936277054198647.post-1128244402269092940</guid>
	<link>http://feedproxy.google.com/~r/Who-t/~3/34WFAyndvzs/multitouch-in-x-getting-events.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/whot.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
This post is part of a series on multi-touch support in the X.Org X server.
I recommend re-reading &lt;a href=&quot;http://who-t.blogspot.com/2010/10/thoughts-on-linux-multitouch.html&quot;&gt;Thoughts on Linux multitouch&lt;/a&gt; from last year for some higher-level comments.&lt;br /&gt;
In this post, I'll outline how to identify touch devices and register for touch events.
&lt;br /&gt;&lt;br /&gt;
This post assumes basic knowledge of the XI2 Xlib interfaces. Code examples
should not be scrutinised for language-correctness.
&lt;br /&gt;
&lt;h2&gt;New event types&lt;/h2&gt;
XI 2.2 defines four new event types: &lt;i&gt;XI_TouchBegin&lt;/i&gt;, &lt;i&gt;XI_TouchUpdate&lt;/i&gt;, &lt;i&gt;XI_TouchEnd&lt;/i&gt; are the standard events that most applications will be using. The fourth event, &lt;i&gt;XI_TouchOwnership&lt;/i&gt; is mainly for handling specific situations where reaction speed is at a premium and gesture processing when grabs are active. I won't be covering those in this post.
&lt;h2&gt;
Identifying touch devices&lt;/h2&gt;
To use multitouch functionality from a client application, the client must announce support for the X Input Extension version 2.2 through the &lt;a href=&quot;http://www.x.org/archive/X11R7.5/doc/man/man3/XIQueryVersion.3.html&quot;&gt;XIQueryVersion(3)&lt;/a&gt; request. 
&lt;pre&gt;int major = 2, minor = 2;
XIQueryVersion(dpy, &amp;amp;major, &amp;amp;minor);
if (major * 1000 + minor &amp;lt; 2002)
    printf(&quot;Server does not support XI 2.2\n&quot;);
&lt;/pre&gt;
Once announced, an &lt;a href=&quot;http://www.x.org/archive/X11R7.5/doc/man/man3/XIQueryDevice.3.html&quot;&gt;XIQueryDevice(3)&lt;/a&gt; call may return a new class type, the &lt;i&gt;XITouchClass&lt;/i&gt;. If this class is present on a device, the device supports multitouch.The class struct itself is defined like this:&lt;br /&gt;
&lt;pre&gt;typedef struct
{
    int         type;
    int         sourceid;
    int         mode;
    int         num_touches;
} XITouchClassInfo;
&lt;/pre&gt;
The &lt;b&gt;num_touches&lt;/b&gt; field specifies the number of simultaneous touches supported by the device. If the number is 0, we simply don't know (likely) or the device supports an unlimited number of touches (less likely). Regardless of the value expect that some devices lie, so it's best to treat this value as a guide only.

&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;mode&lt;/b&gt; field specifies the type of touch devices. We currently define two types and the server behaviour differs depending on the type:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;XIDirectTouch&lt;/b&gt; for direct-input touch devices (e.g. your average touchscreen or tablet).  For this type of device, the touch events will be delivered to the windows at the of the touch point. Again, similar to what you would expect from a tablet interface - you press top left and the application top-left responds.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;XIDependentTouch&lt;/b&gt; for a indirect input devices with multi-touch functionality. Touchpads are the prime example here. Touch events on such devices will be sent to the window underneath the cursor and clients are expected to interpret the touchpoints as (semantically) relative to the cursor position. For example, if your cursor is inside a Firefox window and you touch with two fingers on the top-left corner of the touchpad, Firefox will get those events. It can then decide on how to interpret those touchpoints.&lt;/li&gt;
&lt;/ul&gt;
A device that has a TouchClass may send touch events, but these events use the same axes as pointer events. Having said that, a touch device may still send pointer events as well - if the physical device generates both.
&lt;br /&gt;
Your code to identify touch devices could roughly look like this:
&lt;br /&gt;
&lt;pre&gt;XIDeviceInfo *info;
int nevices;

info = XIQueryDevice(display, XIAllDevices, &amp;amp;ndevices);

for (i = 0; i &amp;lt; ndevices; i++)
{
    XIDeviceInfo *dev = &amp;amp;info[i];
    printf(&quot;Device name %d\n&quot;, dev-&amp;gt;name);
    for (j = 0; j &amp;lt; dev-&amp;gt;num_classes; j++)
    {
        XIAnyClassInfo *class = dev-&amp;gt;classes[j];
        XITouchClassInfo *t = (XITouchClassInfo*)class;

        if (class-&amp;gt;type != XITouchClass)
            continue;

        printf(&quot;%s touch device, supporting %d touches.\n&quot;,
               (t-&amp;gt;mode == XIDirectTouch) ?  &quot;direct&quot; : &quot;dependent&quot;,
               t-&amp;gt;num_touches);
    }
}

&lt;/pre&gt;
&lt;h2&gt;
Selecting for touch events&lt;/h2&gt;
Selecting for touch events on a window is mostly identical to pointer events. A client creates an event mask and submits it with &lt;a href=&quot;http://www.x.org/archive/X11R7.5/doc/man/man3/XISelectEvents.3.html&quot;&gt;XISelectEvents(3)&lt;/a&gt;. One exception applies: a client must always select for all three touch events &lt;a href=&quot;http://feeds.feedburner.com/Who-t#footnote_1&quot;&gt;[1]&lt;/a&gt;, &lt;i&gt;XI_TouchBegin&lt;/i&gt;, &lt;i&gt;XI_TouchUpdate&lt;/i&gt;, &lt;i&gt;XI_TouchEnd&lt;/i&gt;. Selecting for one or two only will result in a BadValue error.
&lt;br /&gt;&lt;br /&gt;
As for button events, only one client may select for touch events on any given window and the event delivery attempts traverse from the bottom-most window in the window tree up to the root window. Where a matching event selection is found, the event is delivered and the traversal stops.

&lt;br /&gt;
&lt;h2&gt;
Handling touch events&lt;/h2&gt;
The three event types &lt;a href=&quot;http://feeds.feedburner.com/Who-t#footnote_1&quot;&gt;[1]&lt;/a&gt; are &lt;i&gt;XIDeviceEvents&lt;/i&gt; like pointer and keyboard events. So from a client's point of view, in essence all we added was new event types.&lt;br /&gt;
&lt;br /&gt;
The &lt;b&gt;detail&lt;/b&gt; field of touch events specifies the touch ID, a unique ID for this particular touch for the lifetime of the touch sequence. Each touch sequence consists of a TouchBegin event, zero or more TouchUpdate events and one TouchEnd event. Since multiple touch sequences may be ongoing at any time, keeping track of the ID is important. The server guarantees that the touch ID is unique per device and that it will not be re-used &lt;a href=&quot;http://feeds.feedburner.com/Who-t#footnote_2&quot;&gt;[2]&lt;/a&gt;. Note that while touch IDs increase, they increase by an implementation-defined amount. Don't rely on the next touch ID to be the current ID + 1. 
&lt;br /&gt;
&lt;br /&gt;
The button state in a touch event is the state of the physical buttons only. A TouchUpdate or TouchEnd event will thus usually have a zero button state. &lt;a href=&quot;http://feeds.feedburner.com/Who-t#footnote_3&quot;&gt;[3]&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
That's pretty much it, otherwise the handling of touch events is identical to pointer or keyboard events. Touch event handling should be straightforward and the significant deviations from the current protocol are in the grab handling, something I'll handle in a future post.

&lt;br /&gt;
&lt;br /&gt;
&lt;small&gt;
&lt;a href=&quot;http://feeds.feedburner.com/Who-t&quot; name=&quot;footnote_1&quot;&gt;&lt;/a&gt;[1] I know, it's four. Good that you're paying attention.&lt;br /&gt;
&lt;a href=&quot;http://feeds.feedburner.com/Who-t&quot; name=&quot;footnote_2&quot;&gt;&lt;/a&gt;[2] Technically ID collision may occur. For that to happen, you'd need to hold at least one touch down while triggering enough touches to exhaust a 32 bit ID range. And hope that after the wraparound you will get the same ID. There are better ways to spend your weekend.&lt;br /&gt;
&lt;a href=&quot;http://feeds.feedburner.com/Who-t&quot; name=&quot;footnote_3&quot;&gt;&lt;/a&gt;[3] pointer emulation changes this, but I'll get to that some other time.&lt;br /&gt;
&lt;/small&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6112936277054198647-1128244402269092940?l=who-t.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Who-t/~4/34WFAyndvzs&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Thu, 22 Dec 2011 00:30:21 +0000</pubDate>
</item>
<item>
	<title>Peter Hutterer: Multitouch patches posted</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6112936277054198647.post-4647055768960313953</guid>
	<link>http://feedproxy.google.com/~r/Who-t/~3/C2iltvx4a74/multitouch-patches-posted.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/whot.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
After pulling way too many 12+ hour days, I've finally polished the patchset for native multitouch support in the X.Org server into a reasonable state. The &lt;a href=&quot;http://lists.freedesktop.org/archives/xorg-devel/2011-December/027775.html&quot;&gt;full set of patches&lt;/a&gt; is now on the list. And I'm still expecting this to get merged for 1.12 (and thus in time for Fedora 17). &lt;br /&gt;
&lt;br /&gt;
The code is available from the &lt;i&gt;multitouch&lt;/i&gt; branches of the following repositories:&lt;br /&gt;
&lt;pre&gt;  git://people.freedesktop.org/~whot/xserver
  git://people.freedesktop.org/~whot/inputproto
  git://people.freedesktop.org/~whot/xf86-input-evdev
  git://people.freedesktop.org/~whot/libXi
&lt;/pre&gt;
Here's a screencast running Fedora 16 with the modified X server and a little multitouch event debugging application.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;
&amp;lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://i.ytimg.com/vi/TBZtSf3sgeQ/0.jpg&quot; height=&quot;266&quot; width=&quot;320&quot;&amp;gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/TBZtSf3sgeQ?version=3&amp;amp;amp;f=user_uploads&amp;amp;amp;c=google-webdrive-0&amp;amp;amp;app=youtube_gdata&quot;/&amp;gt;
&amp;lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot;/&amp;gt;
&amp;lt;embed height=&quot;266&quot; src=&quot;http://www.youtube.com/v/TBZtSf3sgeQ?version=3&amp;amp;amp;f=user_uploads&amp;amp;amp;c=google-webdrive-0&amp;amp;amp;app=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;320&quot;&amp;gt;&amp;lt;/embed&amp;gt;&amp;lt;/object&amp;gt;&lt;/div&gt;
&lt;br /&gt;
Below is a short summary of what multitouch in X actually means, but one thing is important: being the windowing system, X provides multitouch &lt;b&gt;support&lt;/b&gt;. That does not mean that every X application now supports multitouch, it merely means that they can now &lt;i&gt;use&lt;/i&gt; multitouch if they want to. That also includes gestures, they need application support.&lt;br /&gt;
&lt;br /&gt;
A car analogy: X provides a new road, the applications still have to opt to drive on it.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Multitouch events&lt;/h2&gt;
XI 2.2 adds three main event types: XI_TouchBegin, XI_TouchUpdate and XI_TouchEnd. These three make up a touch sequence. X clients must subscribe to all three events at once and will then receive the events as they come in from the device (more or less, grabs can interfere here). Each touch event has a unique touch ID so clients can track the touches over time.&lt;br /&gt;
&lt;br /&gt;
We support two device types: XIDirectDevice includes tablets and touchscreens where the events are delivered to the position the touch occurs at. XIDependentDevice includes multitouch-capable touchpads. Such devices still control a normal pointer by default, but for multi-finger gestures are possible. For such devices, the touchpoints are delivered to the window underneath the pointer.&lt;br /&gt;
&lt;br /&gt;
That is pretty much the gist of it. I'll post more information over time as the release gets closer, so stay tuned.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Pointer emulation&lt;/h2&gt;
Multitouch can be a compelling interaction method but as said above, X only provides &lt;b&gt;support&lt;/b&gt; for multitouch. It will take a while for applications to pick it up (&lt;a href=&quot;http://blogs.gnome.org/carlosg/&quot;&gt;Carlos Garnacho is working on GTK3&lt;/a&gt;) and some never will. Since we still need to interact with those applications, we provide backwards-compatible pointer emulation. Again, the details are in the protocol but the gist of it is that for the first touchpoint we emulate pointer events.&lt;br /&gt;
&lt;br /&gt;
That's the really nasty bit, because you now have to sync up the grab event semantics of the core, XI 1.x and XI2 protocols and wrap it all around the new grab semantics. So that if you have a multitouch app running under a window manager without multitouch support everything still works as expected.&lt;br /&gt;
That framework is now in place too though I expect it to still have bugs, especially in the hairier corner cases.&lt;br /&gt;
&lt;br /&gt;
But other than that, it should work just as intended. I can interact with my GNOME3 desktop quite well and I get multitouch events to my test applications.&lt;br /&gt;
&lt;br /&gt;
[edit Dec 20: typo fix]&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6112936277054198647-4647055768960313953?l=who-t.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Who-t/~4/C2iltvx4a74&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Mon, 19 Dec 2011 22:18:41 +0000</pubDate>
</item>
<item>
	<title>Peter Hutterer: A short update on multitouch</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6112936277054198647.post-1528783139374363600</guid>
	<link>http://feedproxy.google.com/~r/Who-t/~3/-lcWDyWwL-Q/short-update-on-multitouch.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/whot.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
For the last couple of weeks I've been pretty much working full-time on getting multitouch/XI 2.2 ready for the merge (well, I was on holidays for a bit too). So first of all - sorry if I've been ignoring bugs or emails, I'm working to a few deadlines here. Anyway, here's a bit of a status update.&lt;br /&gt;&lt;br /&gt;Right now, it looks like touch event delivery is working, including nested grabs.Chase Douglas started on the pointer emulation while I was away and we're now at the point where emulation works, except that pointer grabs on top of multitouch clients aren't handled yet. I'm still rather optimistic to get this into 1.12, though it's getting a bit unwieldly. Carlos Garnacho has already sent me some patches, so he's testing the lot against the GTK branches.&lt;br /&gt;&lt;br /&gt;However, since touch support cannot simply be bolted on top and needs to be integrated properly, this has triggered some extra rewrites here and there. I'm currently some 200 commits ahead of  master sync-point. I'm planning to get this number down to something sane before merging but meanwhile, sorry, I'll have to keep ignoring you until this is done.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6112936277054198647-1528783139374363600?l=who-t.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Who-t/~4/-lcWDyWwL-Q&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 06 Dec 2011 22:05:32 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: Stalk^W Following designs, the easy way</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-1340165624831027093</guid>
	<link>http://www.hadess.net/2011/12/stalkw-following-designs-easy-way.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
If you want to follow all the new designs from the &lt;a href=&quot;https://live.gnome.org/Design&quot;&gt;GNOME Design team&lt;/a&gt;, including work-in-progress mockups, gathering of relevant art, etc. be sure to subscribe yourself to the pages that interest you in the various sections of the &lt;a href=&quot;https://live.gnome.org/&quot;&gt;GNOME Wiki&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A nice trick is using our Wiki's notification, with regex support. Head onto &lt;a href=&quot;https://live.gnome.org/action/userprefs/Home?action=userprefs&amp;amp;sub=notification&quot;&gt;your notification settings page&lt;/a&gt;, and add those lines to the &quot;Subscribed wiki pages&quot;:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;GnomeLive:Design*&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;GnomeLive:GnomeShell/Design*&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Courier New', Courier, monospace;&quot;&gt;GnomeLive:GnomeOS/Design*&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-1340165624831027093?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 05 Dec 2011 10:13:04 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: WebKitGTK+ Hackfest: Day 5</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-7863731896463421974</guid>
	<link>http://www.hadess.net/2011/12/webkitgtk-hackfest-day-5.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
Yesterday was our sponsored dinner, at a very nice vegetarian place, followed by some cinema discussions in a bar where the toilets are hidden behind mirrored walls (most strange).&lt;br /&gt;&lt;br /&gt;Still, quite a few happenings in code land:&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;&quot;&gt;&lt;li&gt;Nayan is banging his head against the wall with some Accelerated Compositing issues.&lt;/li&gt;&lt;li&gt;Mario has done a lot of work on &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=72589&quot;&gt;enabling WebKit2 accessibility&lt;/a&gt;, as well as fixing some WebKit accessibility bugs. He also committed an &lt;a href=&quot;http://git.gnome.org/browse/epiphany-extensions/commit/?id=f9fb2ae8787193eefa6d96fbe5769551cf99041b&quot;&gt;updated AdBlocker extension&lt;/a&gt; for Epiphany.&lt;/li&gt;&lt;li&gt;Xan wrote a &lt;a href=&quot;http://blogs.gnome.org/xan/2011/12/04/a-new-design-for-epiphany-web/&quot;&gt;blog post about Web design&lt;/a&gt;, and worked on implementation with Claudio.&lt;/li&gt;&lt;li&gt;Philippe started work on fullscreen support for WebKit2 (this includes, but isn't limited to &amp;lt;video&amp;gt;&lt;/li&gt;&lt;li&gt;And I wrote a &lt;a href=&quot;http://www.hadess.net/2011/12/vegas-baby.html&quot;&gt;replacement plugin for Flash videos&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The hackfest is drawing to a close, and I'll take this opportunity to thank our very kind sponsors for flights, accomodation and even feeding us in the office so we didn't have to stop hacking for long.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://foundation.gnome.org/&quot;&gt;&lt;img src=&quot;http://www.gnome.org/wp-content/themes/gnome-grass/images/gnome-logo.png&quot; alt=&quot;&quot; height=&quot;76&quot; width=&quot;199&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.igalia.com/&quot;&gt;&lt;img src=&quot;http://blogs.gnome.org/xan/files/2011/12/igalia.png&quot; alt=&quot;&quot; height=&quot;60&quot; width=&quot;168&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.collabora.co.uk/&quot;&gt;&lt;img src=&quot;http://foundation.gnome.org/img/logos/collabora.png&quot; alt=&quot;&quot; height=&quot;87&quot; width=&quot;181&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also a big thank you to Igalia for providing us with hacking beer in the evenings (left-overs from Igalia's 10th anniversary party, a happy coincidence).&lt;br /&gt;&lt;br /&gt;Many thanks to Xan, Juanjo and Alex for the hackfest organisation, and the personal chauffeur service, and my most heartfelt thanks to Juanjo for his infinite patience to our tourist needs (such as showing us the &lt;a href=&quot;http://en.wikipedia.org/wiki/Torre_de_H%C3%A9rcules&quot;&gt;Torre de Hércules&lt;/a&gt; &lt;a href=&quot;http://instagr.am/p/XJk5c/?ref=nf&quot;&gt;on a windy December afternoon&lt;/a&gt;).&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-7863731896463421974?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sun, 04 Dec 2011 19:38:21 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: Vegas Baby!</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-4479714946223919366</guid>
	<link>http://www.hadess.net/2011/12/vegas-baby.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://4.bp.blogspot.com/-6GKS1_96NW0/Ttu2rdz-fCI/AAAAAAAAAbo/-_R_taTJsyc/s1600/no-video.png&quot;&gt;&lt;img src=&quot;http://4.bp.blogspot.com/-6GKS1_96NW0/Ttu2rdz-fCI/AAAAAAAAAbo/-_R_taTJsyc/s400/no-video.png&quot; height=&quot;281&quot; border=&quot;0&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Before: No video, because no Flash, and no MP4 support&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;clear: both; text-align: center;&quot; class=&quot;separator&quot;&gt;&lt;a style=&quot;margin-left: 1em; margin-right: 1em;&quot; href=&quot;http://2.bp.blogspot.com/-y-Gu--ZS7o0/Ttu200TNe3I/AAAAAAAAAbw/p3_xGt4lBRI/s1600/video.png&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/-y-Gu--ZS7o0/Ttu200TNe3I/AAAAAAAAAbw/p3_xGt4lBRI/s400/video.png&quot; height=&quot;281&quot; border=&quot;0&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;After: Video, through Totem's Vegas plugin&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;Totem's new Vegas browser plugin provides you with a way to watch Flash based videos, without using Flash, using &lt;a href=&quot;http://quvi.sourceforge.net/&quot;&gt;libquvi'&lt;/a&gt;s &lt;a href=&quot;http://repo.or.cz/w/libquvi-scripts.git/tree/HEAD:/share/lua/website&quot;&gt;growing collection of supported sites&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Code is available from &lt;a href=&quot;http://git.gnome.org/browse/totem&quot;&gt;GNOME git&lt;/a&gt; this instant. Be sure to pass &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--enable-vegas-plugin=yes&lt;/span&gt; to compile the plugin.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-4479714946223919366?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sun, 04 Dec 2011 18:20:44 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: WebKitGTK+ Hackfest: Day 4</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-6571456525103534154</guid>
	<link>http://www.hadess.net/2011/12/webkitgtk-hackfest-day-4.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
The crema de ojuro took effect. While the effects simmered down, code fixing was still in full flow.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;&quot;&gt;&lt;li&gt;Philippe finished landing the fullscreen fixes for the &amp;lt;video&amp;gt;&lt;/li&gt;&lt;li&gt;Xan and Claudio started fixing GNOME 3.4 Epiphany design bugs (on the road towards the Web app design)&lt;/li&gt;&lt;li&gt;Alex, Martin, Joone and Nayan all looked into Accelerated Compositing. They all owe you, dear reader, blog posts full of nitty gritty details.&lt;/li&gt;&lt;li&gt;Jon didn't spend the day debugging bizarre browsers crashes&lt;/li&gt;&lt;li&gt;Wingo punched the air as he figured out a tricky memory allocation issue. He also listened to the &lt;a href=&quot;http://www.thundercatsfans.org/tcdownloads/audio.php&quot;&gt;Thundercats theme tune&lt;/a&gt;, in a loop&lt;/li&gt;&lt;li&gt;Gustavo and Dan figured out a design for multipart/x-mixed-replace support, as used by some streaming IP cameras, and Gustavo started the implementation&lt;/li&gt;&lt;li&gt;Nayan showed legendary patience waiting for tourists outside a haberdashery&lt;/li&gt;&lt;li&gt;Dan committed a number of libsoup related cleanups in WebKitGTK+, including a very impressive &lt;a href=&quot;http://trac.webkit.org/changeset/101917/trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp&quot;&gt;minus 200 lines cleanup&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-6571456525103534154?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sat, 03 Dec 2011 20:16:35 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: WebKitGTK+ Hackfest: Day 3</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-8147889265808710886</guid>
	<link>http://www.hadess.net/2011/12/webkitgtk-hackfest-day-3.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
Another incredible day of hacks, and UI design.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;&quot;&gt;&lt;li&gt;Carlos added &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=73662&quot;&gt;support for downloads to the MiniBrowser&lt;/a&gt;, the WebKit2 test application&lt;/li&gt;&lt;li&gt;Bob, Juanjo and I visited the GUADEC facilities, ahead of next summer's conference&lt;/li&gt;&lt;li&gt;We had a long discussion about HTML5 applications, hosted and packaged ones, as well as native applications&lt;/li&gt;&lt;li&gt;The discussion about the new &quot;Web&quot; UI carried on, with some more details being added to the &lt;a href=&quot;http://live.gnome.org/Design/Apps/Web&quot;&gt;Wiki page&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Andy carried on his work on &lt;a href=&quot;http://wingolog.org/archives/2011/12/02/webkittens-lexical-scoping-is-in-danger&quot;&gt;adding gnome-shell required language features to JavaScriptCore&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;And despite the &lt;a href=&quot;http://es.wikipedia.org/wiki/Orujo#El_Orujo_en_Espa.C3.B1a&quot;&gt;crema de ojuro&lt;/a&gt;, hacking carries on at the week-end. Join us in #webkit-gtk-hackfest on GIMPNet.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-8147889265808710886?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Sat, 03 Dec 2011 10:16:01 +0000</pubDate>
</item>
<item>
	<title>Peter Hutterer: Improving code readability through temporary variables</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-6112936277054198647.post-7877096907711500974</guid>
	<link>http://feedproxy.google.com/~r/Who-t/~3/PYhYG28nVQc/improving-code-readability-through.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/whot.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
We don't always have the luxury of using library interfaces that are sensibly designed and enforce readability self-explanatory (see &lt;a href=&quot;http://cworth.org/~cworth/papers/guadec_2006/&quot;&gt;this presentation&lt;/a&gt;). A fictional function may look like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;extern void foo(struct foo *f, &lt;br /&gt;                Bool check_device, &lt;br /&gt;                int max_devices, &lt;br /&gt;                Bool emulate);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;But a calls often end up like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;foo(mystruct, TRUE, 0, FALSE);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Or, even worse, the function call could be:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;foo(mystruct, !dev-&amp;gt;invalid, 0, list_is_first_entry(dev-&amp;gt;list));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The above is virtually unreadable and to understand it one needs to look at the function definition and the caller at the same time. The simple use of a temporary variable can do wonders here:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Bool check_device = !dev-&amp;gt;invalid;&lt;br /&gt;Bool emulate_pointer = list_is_first_entry(dev-&amp;gt;list));&lt;br /&gt;&lt;br /&gt;foo(mystruct, check_device, 0, emulate_pointer);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It adds a few lines of code (though I suspect the compiler will mostly reduce the output anyway) but it improves readability. Especially in the cases where the source field name is vastly different to the implied effect. In the second example, it's immediately obvious that pointer emulation should happen for the first entry.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/6112936277054198647-7877096907711500974?l=who-t.blogspot.com&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Who-t/~4/PYhYG28nVQc&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Fri, 02 Dec 2011 01:23:10 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: WebKitGTK+ Hackfest: Day 2</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-8612638779131265744</guid>
	<link>http://www.hadess.net/2011/12/webkitgtk-hackfest-day-2.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
After a late evening yesterday, the hackfest started a bit slower, but started picking up pace again with a big ticket item, the WebKit2 GTK+ API discussion. This was the destination for a lot of the WebKitGTK+ hackers, leaving us outsiders, well, outside. The discussion isn't quite finished.&lt;span id=&quot;goog_746794990&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_746794991&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This lead us onto a little lunchtime kick-about. The arrange 6 v. 6 game turned into a 5 v. 4 before getting to the ground, and finish as a 3 v. 4 when two of our most jet-lagged/backbroke hackers dropped out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And then onto a lunch. And another late evening.&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;&quot;&gt;&lt;li&gt;Philippe fixed more bugs in WebKitGTK+'s fullscreen video playback mode&lt;/li&gt;&lt;li&gt;Bob uploaded a new draft of his WebKitGTK+ cookbook&lt;/li&gt;&lt;li&gt;Gustavo was playing Street Fighter whilst increasing the size of his farm on Facebook (in WebApp mode!)&lt;/li&gt;&lt;li&gt;And the new buildbot is up, running, and churning through test suites in a loop, as fast as the hackers can add new code.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-8612638779131265744?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Thu, 01 Dec 2011 22:00:25 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: WebKitGTK+ Hackfest: Day 1, Afternoon</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-5106580999431868093</guid>
	<link>http://www.hadess.net/2011/11/webkitgtk-hackfest-day-1-afternoon.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
After num-num tapas for lunch (and some chocolatey cake), we got back to the &lt;a href=&quot;http://live.gnome.org/Hackfests/WebKitGTK2011/Agenda&quot;&gt;agenda&lt;/a&gt;, with &lt;a href=&quot;http://blogs.gnome.org/mccann/&quot;&gt;Jon&lt;/a&gt; presenting the design for the &lt;a href=&quot;http://live.gnome.org/Design/Apps/Web&quot;&gt;Web application&lt;/a&gt;, successor (in spirit, and perhaps in code) to &lt;a href=&quot;http://projects.gnome.org/epiphany/&quot;&gt;Epiphany&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://wingolog.org/&quot;&gt;Andy&lt;/a&gt; did the initial work on adding new language features to JavaScriptCore (&lt;i&gt;let&lt;/i&gt; and &lt;i&gt;const&lt;/i&gt;, as used heavily in gnome-shell)&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://abandonedwig.info/&quot;&gt;Martin&lt;/a&gt; and &lt;a href=&quot;http://blog.kov.eti.br/&quot;&gt;Gustavo&lt;/a&gt; worked on a way to automate running the WebKitGTK tests with test fonts, and are working on making all the tests automated, and reproduceable&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://base-art.net/&quot;&gt;Philippe&lt;/a&gt; fixed fullscreen support in the HTML5 YouTube player&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://danw.mysterion.org/&quot;&gt;Dan&lt;/a&gt; fixed the broken security status in Epiphany&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://blogs.igalia.com/carlosgc&quot;&gt;Carlos&lt;/a&gt; worked on the WebKit2 support for windowed plugins, and the WebKit side of favicons support&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://base-art.net/&quot;&gt;Philippe&lt;/a&gt;, &lt;a href=&quot;http://abandonedwig.info/&quot;&gt;Martin&lt;/a&gt; and yours truly discussed sharing of &lt;a href=&quot;http://live.gnome.org/Design/Proposals/FullscreenControls&quot;&gt;fullscreen media controls&lt;/a&gt; (UI and behaviour) between WebKitGTK, Totem and Sushi, as well as a way to &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=641648&quot;&gt;make fullscreening smoother&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;I hear they didn't finish all the beers for Igalia's 10th anniversary party...&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-5106580999431868093?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Wed, 30 Nov 2011 17:53:39 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: WebKitGTK+ Hackfest: Day 1, morning</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-7353316783840344623</guid>
	<link>http://www.hadess.net/2011/11/webkitgtk-hackfest-day-1-morning.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
After landing in (not so sunny) A Coruña yesterday, we started bright and early today with the &lt;a href=&quot;http://live.gnome.org/Hackfests/WebKitGTK2011/&quot;&gt;WebKitGTK+ hackfest&lt;/a&gt; agenda.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We've got most of the topics pinned, &lt;a href=&quot;http://live.gnome.org/Hackfests/WebKitGTK2011/Agenda&quot;&gt;as listed on the wiki&lt;/a&gt;. If you have more topics to add to the discussion, feel free to drop by #webkit-gtk-hackfest on &lt;a href=&quot;http://live.gnome.org/GnomeIrcChannels&quot;&gt;GIMPNet IRC&lt;/a&gt;, and try to drum up interest in somebody championing your topic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It looks like we could get some pretty cool demos done by the end of this week!&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-7353316783840344623?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Wed, 30 Nov 2011 11:08:42 +0000</pubDate>
</item>
<item>
	<title>Caolán McNamara: fakemail is handy</title>
	<guid isPermaLink="false">http://blogs.linux.ie/caolan/?p=525</guid>
	<link>http://blogs.linux.ie/caolan/2011/11/21/fakemail-is-handy/</link>

	<description>
			&lt;img src=&quot;http://fedoraproject.org/people/heads/caolan.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;For debugging mail problem, e.g. when debugging some emailmerge stuff in LibreOffice recently, &lt;a href=&quot;http://www.lastcraft.com/fakemail.php&quot;&gt;fakemail&lt;/a&gt; was really really handy when you have a bug which requires generating a couple of hundred emails in quick succession to trigger.&lt;/p&gt;</description>
	<pubDate>Mon, 21 Nov 2011 13:00:05 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Clarifying the "secure boot attack"</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/8488.html</guid>
	<link>http://mjg59.dreamwidth.org/8488.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
Yesterday I &lt;a href=&quot;http://mjg59.dreamwidth.org/8339.html&quot;&gt;wrote&lt;/a&gt; about an alleged attack on the Windows 8 secure boot implementation. As I later clarified, it turns out that the story was, to put it charitably, entirely wrong. The attack is a boot kit targeted towards BIOS-based boots. It lives in the MBR. It'll never be executed on any UEFI systems, let alone secure boot ones. In fact, this is precisely the kind of attack that secure boot is intended to protect against. So, context.&lt;br /&gt;&lt;br /&gt;The MBR contains code that's executed by the BIOS at boot time. This code is unverifiable - it's permitted to have arbitrary functionality. There's only 440 bytes, but that's enough to jump to somewhere else and read code from elsewhere. There's no way for the BIOS to know that this code is malicious. And one thing this code can obviously do is load the normal boot code and modify it to behave differently. Any self-validation code in the loader can be patched out at this point. The modified loader will then load the kernel, and potentially also modify it. At this point, you've lost. Any attempts to validate the code can be redirected to the original code and so everything will look fine, up until the point where the user runs a specific application and suddenly your kernel is sending all your keystrokes over UDP to someone in Nigeria.&lt;br /&gt;&lt;br /&gt;These attacks exist now. They're in the wild. In a normal UEFI world you'd do the same thing by just replacing the UEFI bootloader. But with secure boot you'll be able to validate that the bootloader is appropriately signed and if someone's modified it you'll drop into some remediation mode that recovers your files, from install media if necessary.&lt;br /&gt;&lt;br /&gt;Obviously, this protection is based on all the components of secure boot (ie, everything that runs before ExitBootServices() is called) being perfect. As I said, if any of them accept untrusted input and misinterpret it in such a way that they can be tricked into running arbitrary code, you'll still have problems. But when discussing the pros and cons of secure boot, it's important to make sure that we're talking about reality rather than making provably false assertions.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=8488&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Fri, 18 Nov 2011 21:03:08 +0000</pubDate>
</item>
<item>
	<title>Lennart Poettering: Introducing the Journal</title>
	<guid isPermaLink="false">http://0pointer.de/blog/projects/the-journal</guid>
	<link>http://0pointer.de/blog/projects/the-journal.html</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/big/mezcalero.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;In the past weeks we have been working on a major new addition to systemd
that will hopefully positively change the Linux ecosystem in a number of ways.
But see for yourself, check out the full explanation on what we have
implemented on the &lt;a href=&quot;https://docs.google.com/document/pub?id=1IC9yOXj7j6cdLLxWEBAGRL6wl97tFxgjLUEHIX3MSTs&quot;&gt;design
document we put up on Google Docs&lt;/a&gt;.&lt;/p&gt;</description>
	<pubDate>Fri, 18 Nov 2011 15:28:00 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Attacks on secure boot</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/8339.html</guid>
	<link>http://mjg59.dreamwidth.org/8339.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;a href=&quot;http://arstechnica.com/business/news/2011/11/security-researcher-defeats-windows-8-secure-boot.ars&quot;&gt;This&lt;/a&gt; is interesting. It's obviously lacking in details yet, but it does highlight one weakness of secure boot. The security for secure boot is all rooted in the firmware - there's no external measurement to validate that everything functioned as expected. That means that if you can cause any trusted component to execute arbitrary code then you've won. So, what reads arbitrary user data? The most obvious components are any driver that binds to user-controlled hardware, any filesystem driver that reads user-provided filesystems and any signed bootloader that reads user-configured data. A USB drive could potentially trigger a bug in the USB stack and run arbitrary code. A malformed FAT filesystem could potentially trigger a bug in the FAT driver and run arbitrary code. A malformed bootloader configuration file or kernel could potentially trigger a bug in the bootloader and run arbitrary code. It may even be possible to find bugs in the PE-COFF binary loader. And once you have the ability to run arbitrary code, you can replace all the EFI entry points and convince the OS that everything is fine anyway.&lt;br /&gt;&lt;br /&gt;None of this should be surprising. Secure boot is predicated upon the firmware only executing trusted material until the OS handoff. If you can sidestep that restriction then the entire chain of trust falls down. We're talking about a large body of code that was written without the assumption that it would have to be resistant to sustained attack, and which has now been put in a context where people are actively trying to break it. Bugs are pretty inevitable. I'd expect a lot of work to be done on firmware implementations between now and Windows 8 ship date.&lt;br /&gt;&lt;br /&gt;(Update: It's probably worth pointing out that although Ars talk about it defeating secure boot, the primary sources don't seem to mention secure boot at all. Windows 8 will boot without secure boot, so it's possible that this attack merely handles the non-secure boot case)&lt;br /&gt;&lt;br /&gt;(Further update: It &lt;a href=&quot;https://twitter.com/#!/Kleissner/status/137274722281979904&quot;&gt;turns out&lt;/a&gt; to be a purely BIOS based attack. In other words, it's an example of the kind of thing that secure boot is intended to prevent, not any kind of compromise of a secure boot implementation)&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=8339&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Thu, 17 Nov 2011 16:52:03 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: GPT disks in a BIOS world</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/8035.html</guid>
	<link>http://mjg59.dreamwidth.org/8035.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
Starting with Fedora 16 we're installing using GPT disklabels &lt;a href=&quot;http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/sect-Release_Notes-Changes_for_Sysadmin.html#id1513384&quot;&gt;by default&lt;/a&gt;, even on BIOS-based systems. This is worth noting because most BIOSes have absolutely no idea what GPT is, which you'd think would create some problems. And, unsurprisingly, it does. Shock. But let's have an overview.&lt;br /&gt;&lt;br /&gt;GPT, or GUID Partition Table, is part of the UEFI specification. It defines a partition table format that allows up to 128 partitions per disk, with 64 bit start and end values allowing partitions up to 9.4ZB (assuming 512 byte blocks). This is great, because the existing MBR partitioning format only allows up to 2.2TB when using 512 byte blocks. But most BIOSes (and most older operating systems) don't understand GPT, so plugging in a GPT-partitioned disk would result in the system believing that the drive was uninitialised. This is avoided by specifying a protective MBR. This is a valid MBR partition table with a single partition covering the entire disk (or the first 2.2TB of the disk if it's larger than that) and the partition type set to 0xee (&quot;GPT Protective&quot;). GPT-unaware BIOSes and operating systems will see a partition they don't understand and simply ignore it.&lt;br /&gt;&lt;br /&gt;But how do we boot a GPT-labelled disk with a protective MBR on a system that doesn't understand GPT? The key here is that BIOS is pretty dumb. Typically a BIOS will see a disk and just attempt to execute the code in the first sector. This MBR code knows how to do the rest of the boot, including parsing the partition table if necessary. The BIOS doesn't need to care at all.&lt;br /&gt;&lt;br /&gt;Of course, some BIOSes choose to care. We've seen a small number of machines that, when exposed to a GPT disk, refuse to boot because they parse the MBR partition map and don't like what they see. This is typically accompanied by a message along the lines of &quot;No operating system found&quot;. What we've found is that they're looking for a partition marked with the bootable flag, and if no partitions are marked bootable they assume that there's no OS. This is in contrast to the traditional use of the flag, which is merely a hint to the MBR as to which partition boot code it should execute.&lt;br /&gt;&lt;br /&gt;So, should we set that flag?  The UEFI specification specifically forbids it - table 15 states that the BootIndicator byte must be set to 0. Once again we're left in an unfortunate position where the specification and reality collide in an awkward way.&lt;br /&gt;&lt;br /&gt;If this happens to you after a Fedora 16 install, you have two choices. The first is to reinstall with the &quot;nogpt&quot; boot argument. The installer will then set up a traditional MBR partition table. The second is to boot off a live CD and run fdisk against the boot disk. It'll give a bunch of scary warnings. Ignore them. Hit &quot;a&quot;, then &quot;1&quot;, then &quot;w&quot; to write it to disk. Things ought to work then. We'll figure out something better for F17.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=8035&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Thu, 17 Nov 2011 15:54:30 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Making timeouts work with suspend</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/7846.html</guid>
	<link>http://mjg59.dreamwidth.org/7846.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
A reasonably common design for applications that want to run code at a specific time is something like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;time_t wakeup_time = get_next_event_time();
time_t now = time(NULL);
sleep(wakeup_time-now);&lt;/pre&gt;&lt;br /&gt;This works absolutely fine, except that sleep() ignores time spent with a suspended system. If you sleep(3600) and then immediately suspend for 45 minutes you'll wake up after 105 minutes, not 60. Which probably isn't what you want. If you want a timer that'll expire at a specific time (or immediately after resume if that time passed during suspend), use the POSIX timer family (timer_create, timer_settime and friends) with CLOCK_REALTIME. It's a signal-driven interface rather than a blocking one, so implementation may be a little more complicated, but it has the advantage of actually working.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=7846&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Thu, 17 Nov 2011 13:51:47 +0000</pubDate>
</item>
<item>
	<title>Caolán McNamara: libexttextcat 3.2.0</title>
	<guid isPermaLink="false">http://blogs.linux.ie/caolan/?p=521</guid>
	<link>http://blogs.linux.ie/caolan/2011/11/13/libexttextcat-3-2-0/</link>

	<description>
			&lt;img src=&quot;http://fedoraproject.org/people/heads/caolan.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;Released libexttextcat 3.2.0 (Extended Text Categorization used to guess the language that input text is written in). It can be found in this &lt;a href=&quot;http://dev-www.libreoffice.org/src/libexttextcat/&quot;&gt;download dir&lt;/a&gt;. No code changes from 3.1.1, but adds a large collection of extra language signatures to nearly add the same language support to libexttextcat as LibreOffice supports, modulo languages that LibreOffice supports which don’t have a convenient UDHR translation to use as a basis to generate a language fingerprint.&lt;/p&gt;</description>
	<pubDate>Sun, 13 Nov 2011 22:41:59 +0000</pubDate>
</item>
<item>
	<title>Richard Hughes: Introducing the ColorHug open source colorimeter</title>
	<guid isPermaLink="false">http://blogs.gnome.org/hughsie/?p=557</guid>
	<link>http://blogs.gnome.org/hughsie/2011/11/13/introducing-the-colorhug-open-source-colorimeter/</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/hughsie.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;For the past 3 weeks I’ve been working long nights on an open source colorimeter called the ColorHug. This is hardware that measures the colors shown on the screen and creates a color profile. Existing hardware is proprietary and 100% closed, and my hardware &lt;a href=&quot;https://gitorious.org/colorhug&quot;&gt;is open source&lt;/a&gt;. It has a GPL bootloader, GPL firmware image and GPL hardware schematics and PCBs. It’s faster than the proprietary hardware, and more importantly a lot cheaper.&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://blogs.gnome.org/hughsie/files/2011/11/colorhug3-large.jpg&quot;&gt;&lt;img src=&quot;http://blogs.gnome.org/hughsie/files/2011/11/colorhug3-large.jpg&quot; alt=&quot;&quot; height=&quot;320&quot; class=&quot;aligncenter size-full wp-image-558&quot; width=&quot;478&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Making hardware does cost money, and I can’t give the hardware away for free like I do my other software. I’m aiming to do an initial production run of 50 units, but I’m going to need some advanced orders just to make sure I don’t get stuck with a lot of stock and no buyers. I’m offering a 20% discount on each unit, on the assumption the first users will be testing the firmware and reporting problems. If you want to support a cool open source project, I’m asking £48 for each unit, plus postage and packaging. There’s a &lt;a href=&quot;http://www.hughski.com/&quot;&gt;whole website&lt;/a&gt; if you want to know more about the project, and there’s even &lt;a href=&quot;http://www.hughski.com/about.html&quot;&gt;a newsletter&lt;/a&gt; if you don’t need hardware, but what to know how we’re getting on.&lt;/p&gt;
&lt;p&gt;I would very much appreciate it if people could publicize this project, and help me get to my target of 50 pre-orders.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;</description>
	<pubDate>Sun, 13 Nov 2011 22:28:33 +0000</pubDate>
</item>
<item>
	<title>Dan Williams: Blue sky, white sand, and NetworkManager 0.9.2</title>
	<guid isPermaLink="false">http://blogs.gnome.org/dcbw/?p=668</guid>
	<link>http://blogs.gnome.org/dcbw/2011/11/10/blue-sky-white-sand-and-networkmanager-0-9-2/</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;div style=&quot;width: 650px;&quot; id=&quot;attachment_669&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/shazwan/409580429/&quot;&gt;&lt;img src=&quot;http://blogs.gnome.org/dcbw/files/2011/11/beach.jpg&quot; alt=&quot;&quot; height=&quot;293&quot; class=&quot;size-full wp-image-669&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;The view as I type 'git tag 0.9.2'... (shazwan cc-by-2.0)&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;There’s no better way to celebrate the release of NetworkManager 0.9.2 than a sip of ice-cold cocktail.  It’s something &lt;span style=&quot;color: #ff00ff;&quot;&gt;pink-colored&lt;/span&gt; — I don’t know what — and it’s phenomenal.  And if I ever run out, I just ring a bell and somebody fills it up!  It’s basically like Paradise, except Paradise doesn’t have the latest version of NetworkManager.  Here’s a hot tip: &lt;strong&gt;make your first half billion and buy yourself a private island&lt;/strong&gt;.  Then move there and write open-source software for fun.  It’s a pretty great life.  After a hard day on the beach bending networks to my will, I wind down by building buried hatches solely to confuse the island’s next owner (I’m trading up to a private archipelago in a few years).&lt;/p&gt;
&lt;p&gt;But I digress.  So many people contributed to this release.  Unfortunately they couldn’t all fly out to my private island for the release party so I’ll just have to call them out by name instead.  I’m sure they’ll take Internet fame as a consolation prize, right?  So a huge thanks to Alfredo Matos, Colin Walters, Dan Winship, David Rothlisberger, Evan Broder, Florian Echtler, Gary Ching-Pang Lin, Jirí Klimeš, Larry Reaves, Ludwig Nussel, Mathieu Trudel-Lapierre, Michael Stapelberg, Thomas Bechtold, Thomas Graf, Thomas Jarosch, Tore Anderson, Michael Biebl, Vincent Untz, Anders Feder, Giovanni Campagna, Murilo Opsfelder, David Woodhouse, all our translators, and all our testers.  It wouldn’t have happened without you.&lt;/p&gt;
&lt;p&gt;This release &lt;strong&gt;packs in some great stuff&lt;/strong&gt; aside from the usual bug fixes and pixie dust: translated country names in the mobile broadband provider wizard, VPN details in the applet’s Connection Information dialog, auto-unlocking of GSM modems, support for libnl2 and libnl3, better IPv6 handling, enhancements for nmcli, rfkill fixes for EeePCs, GObject Introspection updates, better cooperation with unmanaged devices, timestamps for VPN connections, increased dnsmasq cache size, and more.  Get your tarballs on:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://ftp.gnome.org/pub/gnome/sources/NetworkManager/0.9/&quot;&gt;http://ftp.gnome.org/pub/gnome/sources/NetworkManager/0.9/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://ftp.gnome.org/pub/gnome/sources/network-manager-applet/0.9/&quot;&gt;http://ftp.gnome.org/pub/gnome/sources/network-manager-applet/0.9/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-openconnect/0.9/&quot;&gt;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-openconnect/0.9/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-openswan/0.9/&quot;&gt;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-openswan/0.9/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-openvpn/0.9/&quot;&gt;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-openvpn/0.9/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-pptp/0.9/&quot;&gt;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-pptp/0.9/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-vpnc/0.9/&quot;&gt;http://ftp.gnome.org/pub/gnome/sources/NetworkManager-vpnc/0.9/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;0.9.4: a Smörgåsbord of Freaking Awesome&lt;br /&gt;
&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What’s even more exciting is what’s all piled up for 0.9.4.  We’ve killed WEXT and now use the more robust nl80211 for talking to well-behaved kernel drivers.  We’ve uncoupled IPv4 and IPv6 addressing so that when one completes the connection is usable while we wait for the other one to complete or time out.  We’ve added bonding support, and VLANs and bridges are next.  We’ll have better firewall interaction.  We’ll probably have connectivity detection as well.  Many of these features are finished and merged to git master already.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hey, 0.8.6 is out too!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you’re into anachronisms, then we’ve got another release for you too.  0.8.6 got tagged earlier this week, and it’s got IPv6 fixes, auto-unlocking of GSM modems, improved usability of IP address and routing entry in the editor, notifications of mobile broadband changes, VPN information in the Connection Information dialog, better handling of gadget devices, retry of Ethernet connections on carrier bounces, allowing certificate paths in keyfile plugins, MAC address blacklists, on-the-fly recognition of newly installed VPN plugins, subject verification of 802.1x certificates, builds without PolicyKit, and much more.&lt;/p&gt;
&lt;p&gt;So really it’s just raining NetworkManager goodness.  Except here on my island, where it’s always sunny, breezy, and absolutely perfect.  Time for another drink.  Cheers.&lt;/p&gt;</description>
	<pubDate>Thu, 10 Nov 2011 23:49:59 +0000</pubDate>
</item>
<item>
	<title>Matthias Clasen: Better logging</title>
	<guid isPermaLink="false">http://blogs.gnome.org/mclasen/?p=13</guid>
	<link>http://blogs.gnome.org/mclasen/2011/11/09/better-logging/</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;First an update on deprecations: GLib and GTK+ master have been fully converted to use function attributes for deprecations now, and most uses of G_DISABLE_DEPRECATED guards in GLib headers have been removed. They are still used for deprecated things that are not symbols, like macros and enum values. I haven’t done the same for GTK_DISABLE_DEPRECATED yet, but it should happen fairly soon. Looking forward to a future of less deprecation-induced build breakage (unless you insist on -Werror, of course…).&lt;/p&gt;
&lt;p&gt;Continuing the theme of ‘making things suck less for developers’… another favourite is logging.  It is very hard to get right; you want to add plenty of debug and diagnostic messages to help with, well, debugging. But then people complain if you fill up their syslog or .xsession-errors with tons of debug spew, like &lt;a href=&quot;http://bugs.freedesktop.org/show_bug.cgi?id=41379&quot;&gt;here&lt;/a&gt;. The GLib logging system with g_log() and the macro wrappers g_debug(), g_warning(), etc leaves much to be desired. It does have the concept of replaceable log handler functions, which is ok for complicated uses. But unfortunately, the default handler is so inflexible that many applications are forced to install a custom handler just to be able to turn debug output on and off.&lt;/p&gt;
&lt;p&gt;As a small step towards making better logging, the default log handler in GLib master now only emits errors, warnings and criticals. Informational and debug messages are only emitted if you set the G_MESSAGES_DEBUG environment variable. The value can be a list of log domains that you are interested in, or the special value ‘all’ to get it all. As a reminder, the log domain is almost invisible in your code unless you use g_log() directly; it’s what you define by adding -DG_LOG_DOMAIN=”MyCoolApp” to your CPPFLAGS.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
	<pubDate>Wed, 09 Nov 2011 22:41:58 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Properly booting a Mac</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/7468.html</guid>
	<link>http://mjg59.dreamwidth.org/7468.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
This is mostly for my own reference, but since it might be useful to others:&lt;br /&gt;&lt;br /&gt;By &quot;Properly booting&quot; I mean &quot;Integrating into the boot system as well as Mac OS X does&quot;. The device should be visible from the boot picker menu and should be selectable as a startup disk. For this to happen the boot should be in HFS+ format and have the following files:&lt;ul&gt;&lt;li&gt;/mach_kernel (can be empty)&lt;/li&gt;&lt;li&gt;/System/Library/CoreServices/boot.efi (may be booted, if so should be a symlink to the actual bootloader)&lt;/li&gt;&lt;li&gt;/System/Library/CoreServices/SystemVersion.plist which should look something like&lt;pre&gt;&amp;lt;xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;plist version=&quot;1.0&quot;&amp;gt;
&amp;lt;dict&amp;gt;
        &amp;lt;key&amp;gt;ProductBuildVersion&amp;lt;/key&amp;gt;
        &amp;lt;string&amp;gt;&amp;lt;/string&amp;gt;
        &amp;lt;key&amp;gt;ProductName&amp;lt;/key&amp;gt;
        &amp;lt;string&amp;gt;Linux&amp;lt;/string&amp;gt;
        &amp;lt;key&amp;gt;ProductVersion&amp;lt;/key&amp;gt;
        &amp;lt;string&amp;gt;Fedora 16&amp;lt;/string&amp;gt;
&amp;lt;/dict&amp;gt;
&amp;lt;/plist&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;That's enough to get it to appear in the startup disk boot pane. Getting it in the boot picker requires it to be blessed. You probably also want a .VolumeIcon.icns in / in order to get an appropriate icon.&lt;br /&gt;&lt;br /&gt;Now all I need is an aesthetically appealing boot loader.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=7468&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Wed, 09 Nov 2011 22:06:07 +0000</pubDate>
</item>
<item>
	<title>Owen Taylor: Application/Compositor Synchronization</title>
	<guid isPermaLink="false">http://blog.fishsoup.net/?p=417</guid>
	<link>http://blog.fishsoup.net/2011/11/08/applicationcompositor-synchronization/</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/owen.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;This blog entry continues an extended series of posts over the last couple of years. Older entries:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; &lt;a href=&quot;http://blog.fishsoup.net/2009/05/28/frames-not-idles/&quot;&gt;Frames not Idles&lt;/a&gt; (May 2009)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.fishsoup.net/2009/06/02/timing-frame-display/&quot;&gt;Timing Frame Display&lt;/a&gt; (June 2009)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.fishsoup.net/2011/06/22/what-to-do-if-you-cant-do-60fps/&quot;&gt;What to do if you can’t do 60fps &lt;/a&gt; (June 2011)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.fishsoup.net/2011/06/30/frame-timing-the-simple-way/&quot;&gt;Frame Timing the Simple Way&lt;/a&gt; (June 2011)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What we figured out in the last post was that if you can’t animate at 60fps, then from the point of achieving a smooth display, a very good thing to do is to just animate as fast as you can while still giving the compositor time to redraw. The process is represented visually below. (You can click on the image for a larger version.)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://owtaylor.files.wordpress.com/2011/11/acx-loaded-large.png&quot;&gt;&lt;img src=&quot;http://owtaylor.files.wordpress.com/2011/11/acx-loaded-small.png?w=640&amp;amp;h=400&quot; title=&quot;Application/Compositor Synchronization (Loaded)&quot; height=&quot;400&quot; width=&quot;640&quot; alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-419&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The top section shows a timeline of activity for the Application, Compositor, and X server. At the bottom, we show the contents of the application’s window pixmap, the back buffer, and the front buffer as time progresses. From this, we can get an idea of the time between the point where a user hits a key and the point where that displays on the screen: the input latency. The keystroke C almost immediately makes its way into a new application frame, and that new frame is almost immediately drawn by the compositor into the back buffer, and the back buffer is almost immediately swapped by the X server. On the other hand, the keystroke D suffers multiple delays.&lt;/p&gt;
&lt;p&gt;What happens if we use the same algorithm when we’re unloaded – when the total drawing time is less than the interval between screen refreshes? Then it looks like:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://owtaylor.files.wordpress.com/2011/11/acx-unloaded-large.png&quot;&gt;&lt;img src=&quot;http://owtaylor.files.wordpress.com/2011/11/acx-unloaded-small.png?w=640&amp;amp;h=400&quot; title=&quot;Application/Compositor Synchronization (Unloaded)&quot; height=&quot;400&quot; width=&quot;640&quot; alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-426&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is basically working pretty well – but we note that even though the application is drawing quickly and the entire system is unloaded we still have a lot of input latency.  If we plot the latency versus the application drawing time it looks like:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://owtaylor.files.wordpress.com/2011/11/acx-latency-draw-immediately.png?w=639&amp;amp;h=479&quot; title=&quot;Input Latency vs. Application Draw Time&quot; height=&quot;479&quot; width=&quot;639&quot; alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-423&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The shaded area shows the theoretical range of latencies, the solid line the theoretical average latency, and the points show min/max/avg latencies as measured in a simulation. (It should be mentioned that this is only the latency when we’re continually drawing frames. An isolated frame won’t have any problems with previously queued frames, so will appear on the screen with minimal latency.)&lt;/p&gt;
&lt;p&gt;We could potentially improve this by having the application delay rendering a new frame – the compositor can use the time used to render the last frame to make a guess as to a “deadline” – a time by which the application needs to have the frame rendered. We can again look at a timeline plot and simulated latencies for this algorithm:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://owtaylor.files.wordpress.com/2011/11/acx-unloaded-both-delay-large.png&quot;&gt;&lt;img src=&quot;http://owtaylor.files.wordpress.com/2011/11/acx-unloaded-both-delay-small.png?w=640&amp;amp;h=400&quot; title=&quot;Application/Compositor Synchronization (Unloaded, With Delay)&quot; height=&quot;400&quot; width=&quot;640&quot; alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-425&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://owtaylor.files.wordpress.com/2011/11/acx-latency-wait.png?w=639&amp;amp;h=479&quot; title=&quot;Input Latency vs. Application Draw Time (With Delay)&quot; height=&quot;479&quot; width=&quot;639&quot; alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-422&quot; /&gt;&lt;/p&gt;
&lt;p&gt;There are downsides to delaying frame render – the obvious one is that if we guess wrong and the application starts the frame too late, then we can entirely miss a frame. From a smoothness point of view this looks really bad. In general, an application should only use a deadline provided by the compositor if it has reason to believe that the next frame is roughly similar to the previous one. Another disadvantage is that the delay algorithm does cause a frame-rate cliff as soon as the time to draw a frame exceeds the vblank period – there is an instant drop from 60fps to 30fps.&lt;/p&gt;
&lt;p&gt;Which of these two algorithms is better likely depends upon the application: if an application wants maximum animation smoothness and protection from glitches, drawing frames as early makes sense. On the other hand, if input latency is a critical factor – for a game or real-time music application, then delaying frame drawing as late as possible would be preferable.&lt;/p&gt;
&lt;p&gt;So, what we want to do from the level of application/compositor synchronization is provide enough information to allow applications to implement different algorithms. After drawing a frame, the compositor should send a message to the application containing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The expected time at which the frame will be displayed on screen&lt;/li&gt;
&lt;li&gt;If possible, a deadline by which the application needs to have finished drawing the next frame to get it appear onscreen.
&lt;/li&gt;&lt;li&gt;The time that the next frame will be displayed onscreen&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But even without the deadline information, just having a basic response at the end of the frame already greatly improves the situation from the current situation. I’m working on a &lt;a href=&quot;https://mail.gnome.org/archives/wm-spec-list/2011-October/msg00006.html&quot;&gt;proposal&lt;/a&gt; to add application/compositor synchronization to the Extended Window Manager Hints specification.&lt;/p&gt;
&lt;br /&gt;  &lt;a href=&quot;http://feeds.wordpress.com/1.0/gocomments/owtaylor.wordpress.com/417/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/comments/owtaylor.wordpress.com/417/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godelicious/owtaylor.wordpress.com/417/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/delicious/owtaylor.wordpress.com/417/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gofacebook/owtaylor.wordpress.com/417/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/facebook/owtaylor.wordpress.com/417/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gotwitter/owtaylor.wordpress.com/417/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/twitter/owtaylor.wordpress.com/417/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/gostumble/owtaylor.wordpress.com/417/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/stumble/owtaylor.wordpress.com/417/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/godigg/owtaylor.wordpress.com/417/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/digg/owtaylor.wordpress.com/417/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.wordpress.com/1.0/goreddit/owtaylor.wordpress.com/417/&quot; rel=&quot;nofollow&quot;&gt;&lt;img src=&quot;http://feeds.wordpress.com/1.0/reddit/owtaylor.wordpress.com/417/&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;img src=&quot;http://stats.wordpress.com/b.gif?host=blog.fishsoup.net&amp;amp;blog=1430594&amp;amp;post=417&amp;amp;subd=owtaylor&amp;amp;ref=&amp;amp;feed=1&quot; alt=&quot;&quot; height=&quot;1&quot; border=&quot;0&quot; width=&quot;1&quot; /&gt;</description>
	<pubDate>Tue, 08 Nov 2011 20:41:55 +0000</pubDate>
</item>
<item>
	<title>Lennart Poettering: Kernel Hackers Panel</title>
	<guid isPermaLink="false">http://0pointer.de/blog/projects/linuxcon-kernel-panel</guid>
	<link>http://0pointer.de/blog/projects/linuxcon-kernel-panel.html</link>

	<description>
			&lt;img src=&quot;http://planet.gnome.org/heads/big/mezcalero.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;p&gt;At LinuxCon Europe/ELCE I had the chance to moderate the &lt;a href=&quot;https://events.linuxfoundation.org/events/linuxcon-europe/kernel-panel&quot;&gt;kernel hackers
panel with Linus Torvalds, Alan Cox, Paul McKenney and Thomas Gleixner on
stage&lt;/a&gt;. I like to believe it went quite well, but check it out for yourself, as
a video recording is now available online:&lt;/p&gt;

&amp;lt;video controls=&quot;1&quot; height=&quot;450&quot; width=&quot;800&quot;&amp;gt;
  &amp;lt;source src=&quot;http://free-electrons.com/pub/video/2011/elce/elce-2011-torvalds-cox-gleixner-mackenney-kernel-developer-panel-450p.webm&quot;&amp;gt;
&amp;lt;/video&amp;gt;

&lt;p&gt;For me personally I think the most notable topic covered was Control Groups,
and the clarification that they are something that is needed even though their
implementation right now is in many ways less than perfect. But in the end there is no
reasonable way around it, and much like SMP, technology that complicates things
substantially but is ultimately unavoidable.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://free-electrons.com/blog/elce-2011-videos/&quot;&gt;Other videos from ELCE are online now, too.&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Mon, 07 Nov 2011 15:53:00 +0000</pubDate>
</item>
<item>
	<title>Bastien Nocera: ObexFTP in GNOME, (non-)update</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-977684764667858073.post-4029747881050013395</guid>
	<link>http://www.hadess.net/2011/11/obexftp-in-gnome-non-update.html</link>

	<description>
			&lt;img src=&quot;http://planet.freedesktop.org/faces/hadess.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
If you've tried to use ObexFTP browsing (browsing files on mobile phones over Bluetooth) in GNOME in recent times, and didn't get a good experience from it (crashes, or very unreliable browsing), &lt;a href=&quot;https://bugzilla.gnome.org/buglist.cgi?product=gvfs&amp;amp;bug_status=UNCONFIRMED&amp;amp;bug_status=NEW&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=REOPENED&amp;amp;component=obexftp%20backend&quot;&gt;those problems are known&lt;/a&gt;, and due to the architecture used to implement the functionality.&lt;br /&gt;&lt;br /&gt;If you want to help make ObexFTP browsing good again, please try to convince one of your coder friends to &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=609340#c17&quot;&gt;help port the existing code&lt;/a&gt; to use the &quot;&lt;a href=&quot;http://git.kernel.org/?p=bluetooth/obexd.git;a=tree;f=gobex;h=3d185dd8364af86c1beef760132fb34dddf131da;hb=HEAD&quot;&gt;gobex&lt;/a&gt;&quot; library that the &lt;a href=&quot;http://git.kernel.org/?p=bluetooth/obexd.git;a=summary&quot;&gt;obexd D-Bus service&lt;/a&gt; uses.&lt;br /&gt;&lt;br /&gt;Unless somebody steps up in the GNOME 3.4 timeframe, I will disable the access to the functionality in gnome-bluetooth. The brokenness makes us look very bad, and the files are still available through other (cabled) means in most cases.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/tracker/977684764667858073-4029747881050013395?l=www.hadess.net&quot; alt=&quot;&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Mon, 07 Nov 2011 15:14:15 +0000</pubDate>
</item>
<item>
	<title>Matthew Garrett: Understanding the current state of UEFI</title>
	<guid isPermaLink="false">http://mjg59.dreamwidth.org/7411.html</guid>
	<link>http://mjg59.dreamwidth.org/7411.html</link>

	<description>
			&lt;img src=&quot;http://planet.fedoraproject.org/desktop/images/heads/default.png&quot;  alt=&quot;&quot; style=&quot;float: right;&quot;&gt;
&lt;a href=&quot;http://benjaminkerensa.com/2011/10/23/uefi-headaches-begin-linux/&quot;&gt;This story&lt;/a&gt; has been floating around for a week or so. The summary is that someone bought a system that has UEFI and is having trouble installing Linux on it. In itself, not a problem. But various people have either conflated this with the secure boot issue or suggested that UEFI is a fundamentally anti-Linux technology.&lt;br /&gt;&lt;br /&gt;Right now there are no machines shipping to the public with secure boot enabled. None at all. If you're having problems installing Linux on a machine with UEFI then it's not because of secure boot. So what is actually causing the problem?&lt;br /&gt;&lt;br /&gt;UEFI is a complicated specification, with 2.3.1A being 2214 pages long. It's a large body of code. There's a lot of subtleties. It's very easy for people to get things wrong. For example, we've seen issues where calling SetVirtualAddressMap() resulted in the firmware referencing boot services code, a clear violation of the spec on the firmware authors' part. We've also found machines that failed to boot because grub wasn't aligning its stack properly, a clear violation of the spec on our part.&lt;br /&gt;&lt;br /&gt;Software is difficult. People make mistakes. When something mysteriously fails to work the immediate assumption should be that you've found a bug, not a conspiracy. Over time we'll find those bugs and fix them, but until then just treat UEFI boot failures like any other bug - annoying, but not malicious.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.dreamwidth.org/tools/commentcount?user=mjg59&amp;amp;ditemid=7411&quot; alt=&quot;comment count unavailable&quot; height=&quot;12&quot; style=&quot;vertical-align: middle;&quot; width=&quot;30&quot; /&gt; comments</description>
	<pubDate>Thu, 03 Nov 2011 17:47:36 +0000</pubDate>
</item>

</channel>
</rss>

