[go: up one dir, main page]

|
|
Log in / Subscribe / Register

The LPC Android microconference, part 2

September 14, 2015

This article was contributed by Nathalie Chan King Choy and John Stultz


Linux Plumbers Conference

The Linux Plumbers Android microconference was held in Seattle on August 20th. It included discussions of a variety of topics, many of which need to be coordinated within the Android ecosystem. The microconference was split up into two separate sessions; this summary covers the second session, which was held for three hours in the evening. Topics were toybox in Android, improving AOSP vendor trees, providing per-task quality of service, and improving big.LITTLE on Android.

The first session's summary can be found here.

Toybox in Android

Rob Landley started the second half of the microconference with some background on the toybox project, which has recently been included in the Android Open Source Project (AOSP), replacing some components of Android's toolbox. Landley described his early attempts to learn how to build a distribution from scratch, starting in 1999, which he would use to create his Aboriginal Linux project. He picked up the BusyBox tool for his project and, after improving it, became the maintainer.

It was after the GPLv3 came out that the trouble started, Landley said. Some code contributed to BusyBox was GPLv2-only, which caused trouble with relicensing. So efforts to audit the code, then remove and replace any GPLv2-only submissions, were made. He became disillusioned with what he saw as the "breaking" of "the GPL", as no longer was there just "the GPL", and it was no longer a universal receiver of code. In the past, most open-source licenses were GPL-compatible and could be up-converted to GPL as needed. With the introduction of GPLv3, along with lots of GPLv2-only code in existence, suddenly this was no longer the case. He handed over BusyBox maintainership to the best person he knew for the job, and started playing with toybox, which he wrote under what he calls a "BSD zero-clause" license—basically public-domain—which would allow the code to be compatible with any other license.

However, soon after starting toybox, he mothballed the project. This was mostly due to the fact that he liked the new BusyBox maintainer and didn't want to undermine the project by leaving and immediately starting a competitor. Also BusyBox had a ten-year head start, which made it intimidating to try to catch up.

Landley then started talking about a paper he had co-written a decade ago that described how big transitions in computing are always opportunities, since big established players are often unseated by smaller upstarts. The paper was focused on the transition to 64-bit systems and how this was an opportunity for Linux to unseat Windows.

Landley realized that the transition to mobile was a similar major transition, and Apple's iOS was likely to eventually unseat existing workstations if it were to become dominant. He saw Android as thus becoming an important vehicle for the preservation of a non-proprietary future. His history with Aboriginal Linux made him interested in trying to make Android self-hosting. Unfortunately, due to Android not accepting any GPL code in user space, BusyBox would not be able to be used, but toybox could be. Thus, he restarted development on toybox.

At this point, Karim Yaghmour had a few questions, the first being: how far is toybox currently away from BusyBox? Landley pointed to a online status page that explains (with a somewhat complicated key) what parts are left to do. There is also a roadmap, which helps show the scope of what the project is trying to achieve. That list includes: POSIX-2008, Linux Standard Base (LSB), a self-hosting environment, as well as fully replacing Android's toolbox and Tizen's core tools.

Yaghmour also asked which commands from toybox have not yet replaced the equivalents in Android's toolbox. Again, he referred people to the status page, but Landley also pointed out that you can look in AOSP at the toolbox Android.mk file, which will clarify which non-toybox tools are still being used. Landley noted that Elliott Hughes of the Android team has been helping with some of the testing of toybox. Hughes syncs upstream toybox to the AOSP tree every two weeks.

At this point the talk ran out of time.

Improving vendor AOSP repositories

The next talk (slides [PDF]) was a discussion led by John Stultz from Linaro on some of the issues he's seen in various vendor trees, and what might be done to improve things. Most vendors utilize a fork-and-try-to-forget model with AOSP, targeting each device with its own tree. Linaro isn't any different, really, as it maintains quite a number of separate AOSP trees for efforts like 96board support, work on Project Ara, as well as for other projects. This behavior is problematic, since it makes operating system updates more complicated, so vendor device updates suffer. That results in real security difficulties, as recently seen with the Stagefright issue.

Additionally, devices do tend to include functionality from a number of different vendors: a system-on-chip (SoC) from one vendor, Bluetooth and WiFi from another, sensors from another, etc. As noted in previous talks in the microconference, integrating vendor hardware abstraction layers (HALs) into an AOSP repository is usually a non-trivial process. HALs do not integrate into the tree in a uniform way and some vendor HALs require tweaks to the framework layer. This all complicates things further when it comes time to handle a release update, since there are now multiple parties that are being depended on for updates, which all have to be integrated together.

Another area of pain is the build system. The device.mk and BoardConfig.mk files used to describe the device usually contain a large set of global build variables, which have no expressions of inter-dependencies (for example, enabling BOARD_HAVE_BLUETOOTH_BCM won't do anything if one forgets to enable BOARD_HAVE_BLUETOOTH), and the device.mk files that list out the PRODUCT_PACKAGES to be included have a ton of duplication from device to device. In fact, it seems most vendors create mid-layer common directories and have logic to try to share some of the standard entries for different devices, just to avoid the heavy duplication required.

AOSP is not really structured to be able to host community contributions, which is another issue. Google has reasonably limited AOSP to hosting device-specific code only for Nexus devices, which the company is able to test and maintain. While this is a understandable and practical decision for Google, it keeps vendors and others in the community working in their own private trees. Since there's no reason to submit code, this results in a limited culture of review, so there isn't necessarily a community sense for what is good or bad code.

Further, there's a missing sense of best-practices. This may not be true for some vendors who are closer partners with Google, but for the wider community that can't attend the private boot-camp meetings, it is. There is a lack of documentation, so things like HAL integration approaches often end up being done in a cargo-cult manner. Improving documentation and having better examples are areas that need work.

After running through the issues, the discussion was opened up to try to see what could be done to improve things, and not just from the "Google should do X" angle, but also what the community-at-large could potentially implement.

One question was "should HALs be submitted to AOSP?", but since AOSP doesn't accept non-Nexus device support, this didn't seem appropriate. Additionally, many HALs are completely proprietary, so licensing issues would prevent that from happening. There is also the fact that vendors are quite often focused on shipping products, so it's not clear that, even if the code was welcome to be submitted for review, many vendors would take the extra time required to deal with the feedback of that code review. So the angle of finding processes to make things easier for the vendors should be considered.

There was also a suggestion that the community create some space where code that couldn't go into AOSP be collected. This might be a possibility, but it would be good to avoid the "creating another fork to solve all the forks" sort of solution.

One idea for the build system is to try to reduce the amount of duplicative code in the device directories with something like Kconfig. This would help express configuration dependencies, reducing the number of options required to be specified, and ideally make it easier to build for multiple devices with only a change to the configuration file. Samuel Ortiz mentioned that Intel basically does this, though it doesn't have the dependency tracking. It uses a configuration file to define the device and some common infrastructure in the tree processes that file. Stultz noted that many vendors have something like this to make it easier to build multiple devices; it points to something that may need to be shared generically.

Dmitry Shmidt of Google's Android team asked how Linaro handles doing validation for devices it doesn't have access to. The answer was that it doesn't, and it's a problem. However, another point was raised that the Linux kernel deals with this all the time, since people don't have test machines for all architectures, and it's handled by delegating testing responsibility to architecture maintainers. It was noted that a perspective from the Chrome OS folks might be useful, as they've been able to delegate testing for a wider array of devices.

Rom Lemarchand from Google mentioned that he would like to see more vendors submit code to AOSP. But some attendees said that it is hard to get patches reviewed on Gerrit. A number of folks in the room agreed, saying they had run into similar problems. The Google developers said that it sounded like maybe the auto-adding of maintainers in Gerrit was broken. They promised to look into it and get it solved quickly.

While Google controls commit access to AOSP, its Gerrit installation allows anyone to review and comment on proposed changes. It was proposed that a group of non-Google folks could make a pointed effort to review patches submitted to Gerrit, which would help build up a better community sense of code taste and might even lead to growing external maintainers. Lemarchand mentioned that it would also be nice because it would allow the Google team to better understand whose reviews could be trusted in the community.

The discussion sort of dwindled at this point, so Stultz suggested moving on to the next talk.

Providing per-task quality of service

Next Juri Lelli from ARM talked (slides [PDF]) about his work on the energy-aware scheduler (EAS) and the potential for use of deadline scheduling in Android. He started with an overview of the EAS, describing how its focus is on per-entity load tracking and per-entity utilization tracking, which try to size up tasks so that they can be properly placed on the right core in an asymmetric multi-processing environment. The goal is to use as little energy as possible while still getting good performance. When the system is not over-utilized, the scheduler will try to pack tasks onto a single CPU, but once a tipping point is crossed and that one CPU is overloaded, it falls back to the conventional approach of spreading the load around.

He described how EAS ties more of the CPU-power logic like dynamic voltage and frequency scaling (DVFS) together into the scheduler, by allowing the scheduler to trigger cpufreq governors directly and make decisions about the speed of each CPU that is being scheduled. This allows for the scheduler to ramp up a processor's frequency to increase capacity if it wants to add a task to that CPU. He also talked a little bit about schedtune, which provides a single sysfs knob to boost performance on a global or per-cgroup basis.

At this point it was noted that most of the EAS discussion focused on energy, while the interactive cpufreq governor in Android is mostly focused on latency, so it was asked: how does latency come into the picture and how can it be controlled? Lelli noted that the interactive cpufreq governor tends to boost frequency quickly to provide interactive latency benefits to the user. The schedtune sysfs knob allows for similar boosting, so when an event occurs Android user space could provide some short-term boosting to improve latency response. Riley Andrews from Google noted that the interactive cpufreq governor gives this benefit without user space having to do anything. Though Lelli pointed out that the governor does it a bit blindly, so this allows a more informed and focused response that could save power.

Andrews was also curious about all the various knobs that were available via EAS. Lelli noted that the out-of-tree HMP scheduler, used by some vendors for big.LITTLE machines, had way too many knobs and was very difficult to tune. So, with EAS, more of the logic has been kept internal in the scheduler so it is easier to get it right. Andrews also wondered about the heuristics for task placement. Lelli noted that there are heuristics and the scheduler needs to make a guess and try to compute the difference in energy used so it can try to give the best tradeoff in performance and energy usage. It was suggested that for more information, folks attend the EAS microconference session that would be going on the next day.

Lelli then switched to the deadline scheduler, which he has been maintaining with others. He mentioned some of the benefits of SCHED_DEADLINE over other policies like SCHED_FIFO, like how it avoids starvation issues that SCHED_FIFO can have. It works using a resource-reservation system that guarantees that a task will get a specific amount of CPU time in a given period. The scheduler just needs to be provided the runtime, period, and deadline values; then it will indicate if it can achieve those constraints or not.

He showed graphs of the performance implications of this model for tasks like movie playback and wanted to know if folks were interested in using this for Android. His thought was that SurfaceFlinger or AudioFlinger might be able to use this policy. One question that came up was how does the deadline scheduler's reservation system handle CPU frequency changes. Lelli replied that it doesn't at the moment and that there needs to be some integration of the policies, so that the deadline scheduler can specify a minimum frequency in order to guarantee that the deadlines are met.

There was also some discussion on how it would interact with SCHED_FIFO tasks. It was clarified that SCHED_DEADLINE runs at a higher priority than SCHED_FIFO, but it can be used so that you can, for example, give a guaranteed limit of 10% of runtime to SurfaceFlinger. That means you don't have to deal with starvation issues, which had been mentioned as being a problem in making the audio pipeline run as a SCHED_FIFO task at Google I/O. Andrews said that he had looked at it for SurfaceFlinger earlier, but had some issues with the interface and the cpufreq issue was problematic as well. There were a few more questions, but it was suggested that they be brought up at the EAS microconference the next day.

Improving big.LITTLE on Android

Todd Kjos (who was standing in for Tim Murray) from Google's Android team then started reviewing the team's experience dealing with big.LITTLE devices (slides [PDF]). For the most part, big.LITTLE issues and the complex tuning required have been left to the vendors to sort out, as Google hasn't directly addressed it so far. However, that's starting to change. He showed a few examples of the complexities of different styles of asymmetric CPUs that they have seen, from more standard big.LITTLE pairings to more complicated ones, where there might be different sets of "little" CPUs running at different speeds, in addition to the "big" CPUs.

He showed some graphs of the power-performance curves for the different CPUs, which may have cross-over points where it becomes obvious it's worth jumping from the smaller CPUs to the bigger ones. However, he also showed charts where there might be a gap between the two curves, making tuning much more complicated, since to gain any performance at that gap, you have to make a much bigger jump in power consumption.

He described some of the changes in Android M to help. Android keeps track of which tasks are foreground and which tasks are background tasks, so it now uses cpusets to help pin all background tasks to the small CPU or CPUs.

Bobby Batacharia from ARM asked if all asynchronous tasks are considered background tasks. Kjos and Andrews responded that not all are, it depends on which tasks they're interacting or running with. Mark Gross then asked how much work is done in background tasks. The Android developers said not much, but it can be intermittent, though they didn't have hard numbers.

Andrews then mentioned that the team really does want to better enforce the notion of foreground and background tasks. Even when background tasks are limited by cpusets and lower priorities, some still cause scheduling interference with foreground tasks. Stultz asked if pushing foreground tasks to SCHED_RR (the round-robin realtime scheduling class) would solve this, but Andrews noted that the team was really avoiding making tasks with non-deterministic runtimes run as round-robin.

Stultz then asked how the cpusets interacted with Android's use of cgroups. Kjos clarified that they help together. Android still uses cgroups to regulate task CPU usage, but the cpusets help pin tasks to processors, so the tasks don't otherwise fan out to the big CPUs. Batacharia noted that EAS should help with that problem.

As the session wrapped up, Kjos indicated that these types of systems will be an area of greater focus for his team in the coming year.

At that point, after over six hours, the microconference came to an end, and everyone quickly left for dinner and drinks.

[Thank you to all the presenters for their discussions, Karim Yaghmour for organizing and running the conference, and Rom Lemarchand for helping get so many of the Google Android team to attend.]


Index entries for this article
KernelAndroid
GuestArticlesChan King Choy, Nathalie and John Stultz
GuestArticlesStultz, John and Nathalie Chan King Choy
ConferenceLinux Plumbers Conference/2015


to post comments

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 15, 2015 13:54 UTC (Tue) by bkuhn (subscriber, #58642) [Link] (14 responses)

I spent years working with Rob Landley on BusyBox licensing issues. I'm surprised by this strange position he's now taking that he attempted to make BusyBox's licensing consistent so there was "one GPL". Of course, there still is "one GPL", in the sense that you can chose GPLv2-or-later (or, if you need to, GPLv1-or-later) as your license so that you're compatible with all versions of the GPL.

Rob, in fact, is the person who insisted that BusyBox switch to GPLv2-only, after a decade as a GPLv2-or-later project under Bruce Perens' and Erik Andersen's leadership. (See Rob's commits in the codebase circa Sept 2006 for confirmation on this point; you'll see him changing the licensing notices to GPLv2-only at that time.)

I encouraged Rob, and even helped him, in his efforts to start Toybox. Rob is a committed Free Software developer, and he should work a project that interests him under a license he prefers, of course, and I am glad that he is. But his comments on copyleft and its enforcement unfortunately have some historical inaccuracies.

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 15, 2015 17:23 UTC (Tue) by dlang (guest, #313) [Link] (5 responses)

with busybox, the license may have said GPlv2+, but as I remember it, he found that there was a substantial portion of code that was actually v2 only, and BusyBox had the choice of either going through the headaches of eliminating all that code or accept that it could not do GPLv3, and so he switched the notice to GPLv2 only as that was the only way to comply with all the licenses of the contributed code.

As for there being "One GPL", when the kernel and Samba can't share code for CIFS, in spite of both being GPL, there is no longer "One GPL"

*-only causes the problem, but license choice is developers' prerogative

Posted Sep 15, 2015 18:59 UTC (Tue) by bkuhn (subscriber, #58642) [Link] (4 responses)

Even if some GPLv2-only code was found in BusyBox, that was no reason to mass-relicensing files that were GPLv2-or-later *to* GPLv2-only. If Landley hadn't done that mass-relicensing, the portions that were GPLv2-only would have remained small. (I don't think there was a "substantial portion" in any event, but we'd have to review the Git logs to get a clear detail on that, and it's probably not worth the effort.) Note that fortunately BusyBox still accepts GPLv2-or-later patches (I know, I have some in BusyBox post-relicensing), but making the default GPLv2-only was a mistake, just as I think it was a mistake for Linux.

As for Samba and Linux sharing code, Linux leadership has been unwilling to consider changing to GPLv2-or-later, which would be a substantial effort but is a possibility. I've offered to help many times. Folks aren't interested, but that's their prerogative as copyright holders.

Anyway, some Samba developers have offered to relicense their code under GPLv2-or-later for purposes of putting it in Linux. (Many of those who work on CIFS implementation in Linux also work on Samba). While not every Samba developer is willing to do this, many of them are. So, the argument that "Linux and Samba can't share code for CIFS" just isn't accurate. They share some code, at the discretion of the developer in question.

It seems that you're lamenting the point that developers make licensing decisions for themselves, and blaming the license they chose for their decisions. While I've disagreed with many developers' licensing choices (as I've said, I think that choosing -only with GPL has been the fundamental problem here entirely), I don't begrudge developers who want to chose their own license that they prefer. Why do you?

Meanwhile, what about all the proprietary software out there? We can't share any of that code with any Open Source or Free Software project. Surely they are the real problem here; there's certainly a lot more proprietary code than there is GPLv3-or-later code! Why wouldn't we focus on that huge impeding of sharing, rather than these small cases where code sharing can't happen due to a Free Software license incompatibility?

Finally, if there is any mistake in license drafting, it was that the GPL gave developers more control than other Free Software licenses. For example, the Mozilla Public License made "or-later" the default from its start; "MPLvX-only" was never even an option. I suppose the GPL should have given fewer options to developers and the problem could have been prevented, but the FSF, to its great credit, didn't want to demand that everyone accept every new version by default (The FSF does recommend` "-or-later", but it's not mandatory). I guess Landley's main point, then, is that he really wishes that FSF had made "-or-later" mandatory from the start. But, Landley actually exacerbated the problem by changing lots of files that said "-or-later" to say "-only" instead.

*-only causes the problem, but license choice is developers' prerogative

Posted Sep 15, 2015 22:22 UTC (Tue) by dlang (guest, #313) [Link] (3 responses)

> If Landley hadn't done that mass-relicensing,

> ...just as I think it was a mistake for Linux.

> I don't begrudge developers who want to chose their own license that they prefer. Why do you?

It seems like you are much more unhappy with people's choice of licensing than I am.

'or later' clauses in a license grant someone else the ability to change what your code is licensed as, even if it's in ways that you don't like. The wikipedia exception clause to GPLv3 is an example of a future version of a license saying that the work can be covered by a completely different license, passing control to some other organization.

It seems foolish to me to grant such unrestricted control over your code to someone else.

The problem with GPLv3 is that too many people don't view it as just a tweak of GPLv2, but rather as a very different license that imposes requirements that they don't agree with.

But back to the prior topic.

If Busybox contained GPLv2-only code, the only license that the resulting codebase could be released under was GPLv2, not GPLv2+

*-only causes the problem, but license choice is developers' prerogative

Posted Sep 16, 2015 1:50 UTC (Wed) by bkuhn (subscriber, #58642) [Link]

There's a difference between thinking a decision is a mistake (or disagreeing with the policy decision) and calling those who make such decisions "foolish". I agree we're *both* doing the former; but you have also done the latter. Specifically, you say it's "foolish" to choose -or-later versions. I've never said people who chose -only versions are foolish; only that I disagree with their decision and believe it's poor policy for Free Software projects.

Given that you say that it's foolish to grant someone else unrestricted control over your code to someone else, that means you'd also have to find other activities foolish, such as signing a CLA, choosing non-copyleft licenses (such as the ISC and 2-Clause BSD), and even work-for-hire software development, too. All of those "grant such unrestricted control over your code to someone else".

Again, I don't begrudge people who chose -only versions, even if I disagree with their decision. My primary point in this thread, which seems to have reached its conclusion, is that the problem Landley identified is one that is created primarily by choice of -only licensing under GPL. Therefore, his preference for -only versions *and* his concerns that GPL'd works can't be universal receivers of code are logically inconsistent. If one wants the latter, one must oppose the former.

As for your point about BusyBox having any GPLv2-only code, your conclusion is correct, but as stated, it has a subtle implication that isn't correct. Namely, it *is* possible to carefully take GPLv2-or-later parts of a larger GPLv2-only work and use them under GPLv2-or-later, as long as you can legtimately confirm the license. Given the small amount of code that was GPLv2-only in BusyBox before Landley mass-relicensed the work, BusyBox would have much reusuable code for other GPL'd projects today.

*-only causes the problem, but license choice is developers' prerogative

Posted Sep 19, 2015 16:16 UTC (Sat) by alfille (subscriber, #1631) [Link]

Well stated.

I am astonished that the same people who care so much about licensing details (and the risk of future corporate policy decisions stealing their code) demand essentially open-ended GPL licensing.

How do we know what GPL 4 will look like? Or who will be in control of the process.

*-only causes the problem, but license choice is developers' prerogative

Posted Sep 26, 2015 12:08 UTC (Sat) by Wol (subscriber, #4433) [Link]

> 'or later' clauses in a license grant someone else the ability to change what your code is licensed as, even if it's in ways that you don't like.

Actually, no it doesn't. The GPL does NOT grant the right to relicence code. Let's explain, with a simple example.

So you give me a program you've written, and you licence it to me "GPL v2+".

I want to distribute it. There doesn't exist a licence called "GPL v2+", so I have to choose between GPLv2 or GPLv3 as my licence to distribute.

Then downstream wants to distribute. So what if I gave it to them using v3 as MY licence - the grant was GPLv2+ AND I HAVE NO RIGHT TO CHANGE THAT. So if they wish, they can choose to distribute under v2. Actually - the GPL is very explicit about that - even though I gave them the copy, YOU gave them the licence, so the GPL is explicit that a v2+ grant sticks with code regardless of the actual version of the licence used by any individual distributor.

That's why licencing is so complicated. Partly people just don't understand the intricacies, and partly because, when you mix code under multiple licences, it gets so damn confusing. That's why the GPL was so good - it was a condition of the licence that, if you mixed other licences with it, then downstream could be certain that by complying with the GPL they were complying with any other licence too. It's THIS feature that GPLv3 breaks, and which is why v3 is so unpopular in certain quarters.

Cheers,
Wol

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 16, 2015 8:47 UTC (Wed) by landley (guest, #6789) [Link] (7 responses)

> Of course, there still is "one GPL", in the sense that you
> can chose GPLv2-or-later (or, if you need to, GPLv1-or-
> later) as your license so that you're compatible with all
> versions of the GPL.

Wrong. This is exactly the problem busybox had, and it's the problem poor QEMU faces today.

QEMU would like to take Linux kernel driver code (GPLv2 only) and turn it inside out to create device emulations. And it would like to take platform definition code from binutils or gdb (GPLv3+) and turn it into processor emulations.

And if QEMU was GPLv2 or later, it couldn't accept code from EITHER source. The GPLv2 code would remove the "or later" from the project's binaries, the GPLv3+ code would remove the GPLv2 from those binaries, and thus there would be NO license under which QEMU binaries could operate.

That's why QEMU chose GPLv2 only as their license:

http://wiki.qemu.org/License

Because they value license compability with the linux kernel over license compatability with the gnu tools, and the fact that there _is_ no such thing as "the GPL" anymore meant they couldn't pick one license that allowed them to accept code from both sources.

And yes, they explicitly discussed and made this decision on their list:

http://lists.nongnu.org/archive/html/qemu-devel/2013-07/m...

And no, I wasn't involved in that decision.

Seriously, you claim to be an expert on this and don't get something that basic about the facts on the ground? I'm starting to suspect http://www.goodreads.com/quotes/21810-it-is-difficult-to-... is at play here.

> Rob, in fact, is the person who insisted that BusyBox
> switch to GPLv2-only, after a decade as a GPLv2-or-later
> project under Bruce Perens' and Erik Andersen's
> leadership. (See Rob's commits in the codebase circa Sept
> 2006 for confirmation on this point; you'll see him
> changing the licensing notices to GPLv2-only at that
> time.)

Because we'd already merged GPLv2 only code in the tree for years before GPLv3 existed and thus become relevant? As I publicly posted to the list at the time and discussed at length with the busybox userbase back in 2006?

http://lists.busybox.net/pipermail/busybox/2006-September...

I.E. I was acknowledging that the project's license had already changed out from under us. (Seriously, were you this out of the loop at the time, or are you being revisionist?)

> I encouraged Rob, and even helped him, in his efforts to
> start Toybox.

... no you didn't? I really didn't interact with you much in the SFLC, I was mostly dealing with Dan Ravicher, or directly with Eben Moglen during the initial setup and then on the couple of occasions I visited NYC. I believe my first phone call with you was when you tried to get me to have busybox join the new Conservancy thing that was splitting off from the SFLC, and I remember being very confused about what the point was since the SFLC was handling the license enforcement. (Your first example was that the conservancy could have a bank account on busybox's behalf, and I said we had no money and weren't trying to acquire any...) To be honest I never did get the full story behind why the Conservancy split of from the SFLC. I'm told it was something political, but I didn't ask for details.

I could dig through my old emails to confirm this sort of thing if you like, but they're on USB drives at home and I'm in Japan right now...

And nobody helped me start toybox, it was a personal hobby project because _I_ didn't want to work on busybox anymore, thanks to Bruce Perens. The other developers stayed with busybox. I was helped _re_starting toybox after I'd mothballed it for a couple years, as I described in the "please correct wikipedia[citation needed]" section of the June 19 release notes at http://landley.net/toybox/#19-07-2015 which did indeed result in https://en.wikipedia.org/w/index.php?title=Toybox&dif... although I see the above article repeats the same error: the relicensing in late 2011 was why it came out of mothballs, toybox being under the same GPL as busybox is why it went _into_ mothballs.

Heck, I tried to push toybox ideas into busybox when I mothballed it, ala http://lists.busybox.net/pipermail/busybox/2010-January/0... and http://lists.busybox.net/pipermail/busybox/2010-March/071... and so on. I never wished harm to busybox, I just found Bruce Fscking Perens taking credit for my work hugely demotivating. (You taking credit for my work is merely laughable.)

> Rob is a committed Free Software developer, and he should
> work a project that interests him under a license he
> prefers, of course, and I am glad that he is. But his
> comments on copyleft and its enforcement unfortunately
> have some historical inaccuracies.

Computer history is a hobby of mine. I collect references and as close to primary sources as I can get, and I've learned to mirror them locally because the net is mutable. See http://landley.net/history/mirror for example.

So sure, you could tell me about historical inaccuracies, although I'd only care if you cited primary sources because your memory clearly disagrees with mine. But I'd prefer to spend that time writing code...

Rob

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 16, 2015 14:08 UTC (Wed) by pbonzini (subscriber, #60935) [Link] (2 responses)

> QEMU would like to take Linux kernel driver code (GPLv2 only) and turn it inside out to create device emulations.

Not really. But QEMU does have Linux ELF format code (GPLv2 only) that it used for its user-mode emulation, and it also has some code that was contributed under GPLv2-only for various historical reasons. But indeed your point still stands---QEMU has GPLv2-only code in it.

> And if QEMU was GPLv2 or later, it couldn't accept code from EITHER source. The GPLv2 code would remove the "or later" from the project's binaries, the GPLv3+ code would remove the GPLv2 from those binaries, and thus there would be NO license under which QEMU binaries could operate.
>
> That's why QEMU chose GPLv2 only as their license

Both points are wrong. QEMU's LICENSE file tells you that distribution of QEMU is possible under GPLv2 only, but that's not a decision and not even a choice. It's a statement of fact.

The only decision in the patch you cited is this: "As of July 2013, contributions under version 2 of the GNU General Public License (and no later version) are only accepted for the following files or directories: bsd-user/, linux-user/, hw/misc/vfio.c, hw/xen/xen_pt*". In other words QEMU does not allow anymore to contribute (except for some special exceptions) with GPLv2-only license, which shows how much most QEMU contributors like GPLv2-only.

If QEMU (as a whole) was GPLv2 or later, it could *choose to become GPLv3 or later* and accept binutils code. Right now we cannot even think of that without embarking in a relicensing adventure.

> they explicitly discussed and made this decision on their list:

Again: the only decision that was made is to disallow newer GPLv2-only contributions for most of QEMU. Again, everything else is just something that we inherited and decided to clarify in July 2013.

That's exactly the opposite of mass-relicensing files that were GPLv2-or-later to GPLv2-only.

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 19, 2015 0:16 UTC (Sat) by landley (guest, #6789) [Link] (1 responses)

> Not really. But QEMU does have...

Good to know. (As I said, I wasn't involved in the decision.)

Code having a lot of component licenses is normal. Even toybox is still using an old (2.6.12 or so) klibc snapshot for menuconfig, which is GPLv2 (as our license page has a footnote about). This doesn't affect the license on the binaries because that code doesn't ship (it generates a .config file from our Kconfig files, and then the rest of the build uses that config file). Rewriting that is on the todo list (among other things that klibc code won't build on bsd, won't build with libfirm... it's a real portability bottleneck), but it hasn't made it to the top of the todo list yet.

But contributions to the project generally don't come with a license statement, and are presumably implicitly licensed under the project's license. (Getting contributors to sign a copyright assignment statement turns out to be a serious drag on the community, resulting in insular closed development community.) Proving that this patch to this file didn't change the license of that file when the rest of the patch was to GPLv2 files... well maybe you have a policy statement somewhere in the project contributors are assumed to have agreed to the same way you've agreed to the terms of service linked from the bottom of every website page you've ever visited...

One license for the project is _so_ much easier...

> Both points are wrong. QEMU's LICENSE file tells you
> that distribution of QEMU is possible under GPLv2 only,
> but that's not a decision and not even a choice. It's a
> statement of fact.

You're right. What I meant is that QEMU chose not to try to find and remove/rewrite existing GPLv2-only code from the project to maintain the "or later", I.E:

> If QEMU (as a whole) was GPLv2 or later, it could *choose
> to become GPLv3 or later* and accept binutils code. Right
> now we cannot even think of that without embarking in a
> relicensing adventure.

The fact you didn't is entirely understandable, we didn't either. It's a huge amount of work, there's no obvious way to test the result, and there's no real advantage. You can't enforce any GPLv3 provisions that aren't in GPLv2 without dropping the dual license, and if you merge GPLv3 only code you become GPLv3 only so you can't do that while maintaining the dual license.

All you'd be doing is preserving the right for a theoretical future relicensing "someday", and usually what happens with mature projects is somebody comes along and writes a new one from scratch after a few decades ala mozilla->chromium or gnome->xfce or openssh->dropbear or samba->smbserver or Fabrice's own http://bellard.org/jslinux/. None of what we've done is irreplaceable.

I've switched to public domain instead of copyleft because I want to provide maximum flexibility to future users. I proved experimentally that a year of license enforcement against multiple companies (even one in France) didn't add any code to busybox.

If GPLv3 actually needed to exist, it means that any _specific_ license terms are likely to become an impediment in future as technology and expectations and languages and laws and nationalities change. It would be nice if later projects could snip out and incorporate at least some of what I've done in their inevitable reboot, and public domain code is most likely to let that happen.

> That's exactly the opposite of mass-relicensing files that
> were GPLv2-or-later to GPLv2-only.

Indeed. And I'm happy that QEMU's TCG subdirectory is BSD licensed (except according to http://lists.landley.net/pipermail/qcc-landley.net/2015-M... they allowed GPL armv8 code in there), because I got permission from Fabrice Bellard to use his original tinycc code under a BSD license, and someday I'd like to find time to glue the two of them together. (Although whether it'll still be relevant by the time I get around to it...)

One of the things I said about busybox at the time is that the old versions are still available, so if you really wanted to fork from the older versions and do your own forensic analysis, you could presumably do a GPLv3 version. Just that _I_ wasn't doing that analysis, and we already had GPLv2-only code in the tree, and maintaining purely theoretical "or later" that you couldn't safely ship a binary under without at _least_ a whole lot of research... not of interest to us. (And since "license of patch submissions" is assumed to be "license of project" for contributors who don't specify and haven't signed anything, it means that individual files would become GPLv2 only next time they were touched anyway, so...)

Policing multiple licenses in the same project is hard. The "tcg is bsd except this bit" example above shows how hard, over time it tends to leak. Extracting and reusing any of the project's code under a different license than the project itself ships under requires you do to a lot of due dilligence if you actually care about licensing. (Most people don't, until somebody sues them. Unless they have lawyers on staff who veto the idea of ever going there in the first place.)

Keep in mind the "what license is busybox really under" debate was back when we were gearing up for the license enforcement lawsuits with the SFLC. Clarifying that Erik and I had standing to sue and that we knew exactly what our license WAS seemed kind of important in context. But now? That ship has sailed...

Really, what my adventure in license enforcement taught me is that programmers trying to be lawyers is about as useful as programmers trying to be cryptographers or medical doctors or anything else requiring massive domain expertise we don't have. Only winning move is not to play.

Rob

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 21, 2015 9:23 UTC (Mon) by pbonzini (subscriber, #60935) [Link]

> well maybe you have a policy statement somewhere in the project contributors are assumed
> to have agreed to the same way you've agreed to the terms of service linked from the bottom
> of every website page you've ever visited...

Yes, it's in the patch you quoted: "As of July 2013, contributions under version 2 of the GNU General Public License (and no later version) are only accepted for the following files or directories: bsd-user/, linux-user/, hw/vfio/, hw/xen/xen_pt*".

Multiple licenses works just fine with the Linux kernel, which has a lot of BSD code (because of the manufacturers' wish to share code between Linux and Windows drivers).

> [Relicensing] a huge amount of work, there's no obvious way to test the result, and there's no real advantage

There would be an advantage for us, namely the ability to disassemble code for more recent processors. QEMU's builtin disassembler cannot show opcodes for AVX instructions, for example.

As usual, benefit and cost have to be weighed against each other. For aarch64 there is a disassembler available under a GPLv2-compatible license; the cost was that it was written in C++, and we decided that requiring a C++ compiler was a smaller cost than relicensing and using the binutils disassembler.

> One license for the project is _so_ much easier...

It is easier, but even then it may cause problems. Suppose you blindly add a GPL header on top of some imported BSD sources; the license allows you to do that, since it's not copyleft, and it's a relatively common thing to do.

A few months later, a "drive-by" contributor sends you a few important security fixes for that imported file, and disappears (doesn't reply to email). Now you cannot push them upstream because you cannot assume the contributor is okay with the BSD license. Now you have to maintain a fork of that library, or find a way to rewrite the changes.

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 16, 2015 17:36 UTC (Wed) by bkuhn (subscriber, #58642) [Link] (3 responses)

Quoting landley:

… no you didn't [encourage me to work on Toybox]

Rob, I sent an email message (Message-Id <8762ikgp6m.fsf@ebb.org> and its related thread) where I encouraged you, and we also had an in-person conversation about it in the kitchen together after you finished presenting at the HP-sponsored event in NYC, where we excitedly discussed Toybox and I encouraged you to work on it more. We've discussed it on IRC many times since then and I've been very encouraging. I'm sad that you don't remember any of my frequent kind words on the subject. Just to say them again, so you have them here as a record separate from IRC logs and your email archives: I'm very glad you're working on Toybox, I hope the project is successful, and I do believe rewrites are sometimes needed to make non-incremental leaps in technology. I think your skills and experience mean you're the best person to do the job of the Toybox project. I of course wish you'd chosen the GPL or some other copyleft license, but I fully respect your decision to chose a different Free Software license.

Lastly on this point, one thing you probably don't know — because I never told you and it's not public (until now) — is: (later, in 2012,) I encouraged Tim Bird of Sony to fund Toybox, and I think Sony ultimately did. (But you would obviously know better than I if they ever came through with that funding, and I'm sorry if they didn't.)

I really didn't interact with you much

… except that I was on every conference call, in every meeting, and on every email thread that we had about GPL enforcement for BusyBox. There are hundreds of emails that you and I exchanged from 2006–2010. In fact, I was regularly involved with all GPL enforcement that happened for BusyBox since 2006. Heck, I was subpoenaed and disposed by opposing counsel multiple times (as Conservancy's President) in BusyBox enforcement cases. I realize you don't like GPL enforcement anymore, so I suspect you'd rather I'd never been involved. But it's nevertheless definitely revisionist to write me out of the story of BusyBox GPL enforcement.

my first phone call with you was when you tried to get me to have busybox join the new Conservancy thing

Conservancy of course wasn't new at that point when we had the discussion that you described (which occurred in late 2010; the email archives show that). Conservancy is a fully separate organization founded in early 2006, and for much of my time at SFLC — including my work on GPL enforcement — I was an SFLC-funded volunteer for Conservancy. BusyBox became a Conservancy member in March 2006. BusyBox is in fact one of Conservancy's first member projects! Thus, from March 2006 until you quit the BusyBox project, I was President of Conservancy, and you were a leader of a member project of Conservancy. Rob, when you're back home and review your email archives, you'll find all this documented there.

I remember being very confused about what the point was [of Conservancy] since the SFLC was handling the license enforcement. … I never did get the full story behind why the Conservancy split of from the SFLC. I'm told it was something political, but I didn't ask for details.

While I'd be glad to tell them to you, those details don't really matter at this point. Broadly speaking, one reason that SFLC and Conservancy don't work together anymore is that SFLC wanted Conservancy to stop enforcing the GPL. I and Conservancy's Board of Directors refused. Conservancy thus continued GPL enforcement for Conservancy's member projects, including BusyBox, on its own. (Dan Ravicher continued on as Conservancy's outside litigation counsel through his personal law offices and Karen Sandler became Conservancy's Executive Director. Ravicher, Colannino, Norwood and Williamson — other SFLC attorneys who worked with Conservancy and BusyBox on GPL enforcement — also all left SFLC.)

(Seriously, were you this out of the loop at the time [when BusyBox changed to GPLv2-only], or are you being revisionist?)

Neither. I already addressed the point about keeping some GPLv2-only code in a largely GPLv2-or-later codebase in another post. The solution would have worked for BusyBox, too, as I told you at the time. That solution, while imperfect, has worked reasonably well for QEMU.

Finally, note that QEMU is now also a member project of Conservancy, like BusyBox is, so the QEMU project obviously sees value in Conservancy's views and advice about licensing, so I suspect QEMU isn't a good example to prove your point. Meanwhile, pbonzini has already given a detailed response on your substantive points regarding QEMU.

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 17, 2015 4:25 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link] (1 responses)

> SFLC wanted Conservancy to stop enforcing the GPL

Not really related to this thread but I am curious as to why. If you have already written on this subject, please refer me to this. Otherwise, a summary would be useful.

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 21, 2015 17:03 UTC (Mon) by bkuhn (subscriber, #58642) [Link]

> Not really related to this thread but I am curious as to why. If you have already written on this subject, please refer me to this. Otherwise, a summary would be useful.

As I menitoned, the details just don't matter now, it's been so long ago. For public documentation of the facts, you can read the public docket in the Conservancy v. Best Buy case, where you can see SFLC attorneys witdrawing as Conservancy's and Erik Andersen's legal counsel until only Dan Ravicher (who then left SFLC) remained as Conservancy's litigation counsel. Many of the others I mentioned left SFLC eventually too, though.

Strange and historically inconsistent comments on GPLv2-only-ness of BusyBox

Posted Sep 19, 2015 0:37 UTC (Sat) by landley (guest, #6789) [Link]

> I encouraged Tim Bird of Sony to fund Toybox, and I think
> Sony ultimately did. (But you would obviously know better
> than I if they ever came through with that funding, and
> I'm sorry if they didn't.)

Sony did not fund toybox (neither has Google, although both contributed code to it), although the perception they had led to https://lwn.net/Articles/478308/ which caused Sony to distance itself from toybox development.

>> my first phone call with you was when you tried to
>> get me to have busybox join the new Conservancy thing
>
> Conservancy of course wasn't new at that point when we
> had the discussion that you described (which occurred
> in late 2010; the email archives show that).

I don't know what "late 2010" discussion you're referring to. My end of the phone call I mentioned took place at my desk at Timesys, a company I left in 2007. I completely pulled out of license enforcement actions after the FSF used the legal machinery I'd been helping build up to sue Cisco in 2009, ala http://landley.net/notes-2009.html#15-12-2009

Rob


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