Zack's Kernel News
Total Page:16
File Type:pdf, Size:1020Kb
Community Notebook Kernel News Zack’s Kernel News Chronicler Zack Don’t Trust Firmware stead of simply modifying the commit, it Over the course of debugging something, Mar- would be better to keep a record of the be- Brown reports on cin Slusarz remarked that the problem looked lated Ack in the Git tree itself. He suggested the latest news, like it might be an ACPI bug, to which Linus that some semantics like Torvalds replied: views, dilemmas, Here’s the #1 thing to keep in mind about git --attach SHA1 <comment> firmware: and developments - firmware is *always* buggy. would be good. within the Linux It’s that simple. Don’t expect anything else. Jeff King pointed out that Firmware is written by people who have lost the kernel community. will to live (why? Because they do firmware de- git notes add -m <comment> SHA1 velopment for a living), and the only thing By Zack Brown keeping them going is the drugs. And they’re was already available. He explained, “The re- not the ‘fun’ kind of drugs. The end result is sulting notes are stored in a separate revision- predictable. In their drug-induced haze, they controlled branch and can be pushed and make a mess. pulled like regular refs. Note, though, that the So saying ‘ACPI is buggy’ is like saying ‘water default refspecs do not yet include refs/ notes, is wet’. Deal with it. so you’d have to add them manually. The He added: workflows around notes are not very mature You need to understand that ACPI has been yet, so if you start using them, feedback tested with one thing, and one thing only: Win- would be appreciated.” dows. Clearly windows doesn’t ask for some Thomas was very enthusiastic about this three-byte region. So it doesn’t work. Big sur- feature, and he and several others started prise. Untested code written by monkeys on peppering Jeff with feature suggestions. But crack – what did you expect? regarding this Git feature, Linus Torvalds re- So don’t do ‘clever’ things. When it comes to marked, “Don’t use them for anything global. firmware, you need to expect it to be buggy, and Use them for local codeflow, but don’t expect try to access it the way Windows accesses it. them to be distributed. It’s a separate ‘flow’, There actually turned out to be some ques- and while it *can* be distributed, it’s not tion about whether the problem really was going to be for the kernel, for example. So no, with the firmware, or if it was actually with the don’t start using this to ack things, because kernel’s ACPI implementation. The issue the acks *will* get lost.” wasn’t resolved on the kernel mailing list, but However, Al did want something that could Linus’s rant still seems like it might be useful be used for the official kernel tree. He sug- to remember. gested a Patch Acknowledgement git commit --allow-empty Process In the course of hacking on Linux, Al Viro where the comment field could contain a be- suggested a change to the patch submission lated Ack for a specific commit, although he procedures. He wanted there to be a detached wasn’t sure it was in good taste to allow ZACK BROWN Acked-by object that could amend the commit something like that. Linus replied, “Don’t The Linux kernel mailing list message of a given patch in a Git tree. He bother. It’s not that important, and it’s just comprises the core of Linux said, “The situation when ACKs come only distracting. It’s not like this is vital informa- development activities. after the commit has been pushed is quite tion. If you pushed it out without the ack, it’s Traffic volumes are immense, common. Linus, what do you think about out without the ack. Big deal.” often reaching 10,000 [the] usefulness of such [a] thing? Ability to Ingo Molnár also pointed out that patch messages in a week, and keeping up to date with the append ACKed-by/ Tested-by of an earlier Acks were mostly useful before the patch was entire scope of development commit to a branch instead of git commit accepted, as a way of making sure that at is a virtually impossible task --amend+ possibly some cherry-picks+ force- least someone else’s eyes had been on it be- for one person. One of the push, that is.” fore it went into the kernel. Once in the ker- few brave souls to take on Thomas Gleixner agreed that this was a nel, Ingo said, Acks were mainly only useful this task is Zack Brown. common situation, although he felt that, in- for bureaucratic purposes. 88 FEBRUARY 2013 ISSUE 147 LINUX-MAGAZINE.COM | LINUXPROMAGAZINE.COM Dissatisfaction with udev Maintainership Mauro Carvalho Chehab complained that the udev developers had not ad- dressed some very important and long- standing breakages. He summarized a variety of things that he and others had done to try to fix or work around the problems, and concluded: For Kernel 3.6, we’ll likely apply some quick hack. However, for 3.7 or 3.8, I think that better is to revert changeset 177bc7dade38b5 and to stop with udev’s insanity of requiring asynchronous firm- ware load during device driver initializa- Community Notebook Kernel News use it to build a one-time kernel with as- ting and multiple pieces of information kernel solution would have to take ac- sociated modules, and then throw away per file. But, Arnd Bergmann pointed count of really big systems, with massive the key files. Those users would then out that, although the files were located numbers of CPUs working simultane- have a system that would be much less in the /sys directory tree, they actually ously. This was not the use case Pawel vulnerable to rootkit attacks. used DebugFS as their underlying file- had considered, and it put some new He said that an alternative use case, in system, which had no such ugliness re- constraints on any solution. which a distribution used the powers of strictions. Andy Green also suggested that even a key-signing to control a user’s system The whole email thread was essen- single-CPU system could have additional against their will, “is garbage and should tially about ways to enhance the patch relevant power consumption data, such largely be ignored.” and correct any problems, so it seems as as the effect of DDR RAM on power con- Linus went on, “In contrast, the case I if there’s plenty of interest in this sort of sumption. He suggested that any solu- outlined above is about true *security*, information going into the kernel. As Lee tion should incorporate the ability to not some ‘vendor control’ bullshit. And said in his original email, the overhead track other types of power usage on a THAT is the case that kernel developers for the kernel is very low; so, I expect given system. should encourage: using cryptography to this patch to get into the kernel at some Guenter Roeck also replied to Pawel’s secure individual users, instead of con- point in the not too distant future. third idea, saying that an in-kernel API trolling things for others.” had been tried a couple of times and that He added, “your ‘get rid of all the au- Power Tracking “the result was, at least so far, more tomatic module signing stuff completely’ Pawel Moll had been maintaining some complexity on the driver side. So the dif- answer makes me think that your power usage graphs for ARM, his em- ficulty is really to define an API which is agenda is fundamentally flawed,” and he ployer, and they started asking for infor- really simple, and does not just compli- went on, “if I believed this was about mation that wasn’t yet provided by the cate driver development for a (presum- redhat or microsoft keys, I would never kernel. They wanted ftrace and perf to ably) rare use case.” have merged the code at all.” output power usage information as well, A few other issues cropped up, and The rest of the thread was mostly a and they also wanted a CPU frequency various suggestions were made. Thomas technical discussion of Linus’s original governor that could adjust the speed of Renninger suggested that the whole patch. Rusty Russell posted a new patch the CPU in response to power utilization. thing might just be best solved in user that fixed some things that Linus had Pawel readily admitted he didn’t know space; indeed, that seemed to be the di- pruned too aggressively, and Josh Boyer how to go about creating a frequency rection Pawel was heading, at least for also posted some improvements as well. governor (although he had an idea or the moment. Typically, the existence of a Linus liked these changes, and the three two), but he had come up with three userspace solution to a given problem of them – and a couple other folks – con- possibilities for the ftrace/ perf issue. means it probably won’t be addressed tinued developing the patch for awhile. His first idea was to make power usage inside the kernel, so the most likely sce- data available to ftrace and perf by defin- nario for Pawel’s (and ARM’s) problem Tracking Boot Speed ing a simple trace event that would allow seems to be that he’ll just have to keep Lee Jones sent in a patch by Jonas Aaberg any sort of monitoring driver, such as looking for userspace solutions.