LWN.net Logo

Recently posted comments

Timely!

Posted May 25, 2013 21:18 UTC (Sat) by fandingo (subscriber, #67019)
In reply to: Timely! by dlang
Parent article: DeadDrop and Strongbox

s/New York Times/Associated Press/


Numerous security issues in X Window System clients

Posted May 25, 2013 19:13 UTC (Sat) by rqosa (subscriber, #24136)
In reply to: Numerous security issues in X Window System clients by Cyberax
Parent article: Numerous security issues in X Window System clients

> Private X server would be working within the context of a single application, so bugs and crashes in it won't affect other applications.

Actually, private X servers are what I was referring to here:

> > a setuid wrapper that spawns both the client and a server instance for the client to connect to

(Basically, my point was that if it's possible to run an arbitrary amount of X-on-Wayland servers with arbitrary privileges on each server instance, then it's possible to prevent all X client-to-server and server-to-client privilege escalation scenarios.)


Anyone remember Qtopia?

Posted May 25, 2013 18:25 UTC (Sat) by khim (subscriber, #9252)
In reply to: Anyone remember Qtopia? by rsidd
Parent article: Introducing Boot to Qt

A phone that boots in 5 seconds would have a market.

Phone? Why you need anything like this on a phone? If you mean smartphone then this ship already sailed. FirefoxOS or Tizen have [small] chance: they are supported by carriers, end-user phones will finally arrive soon, but this thing... it's just too late.

If it shows a noticeable improvement in performance of apps, so much the better.

Not if there are just a small handfull of apps (see Windows Phone which still have this problem even if they spent literally billions trying to mitigate that problem).

Much depends on the pricing: if the phone itself costs $20-$30 (actually, a decent Android phone costs at least $100 even if it comes from the cheap Chinese makers) then an additional $5 may be worth it, an additional $20 won't.

When I've said $20-$30 I meant price of the underlying SOC, not about price of the whole phone. The phone itself will be priced at around $50-$100 today and the difference of $5 which can be had by switching from Android to "Boot to Qt" is already hard to justify. It'll be priced even cheaper tomorrow, difference in price will be even smaller (price of the LCD does not depend on the size of RAM, you know) and it'll make even less sense.

It's OS/2 story all over again: when OS/2 was introduced in 1992 it and most it's competitors (things like DESQview/X or NeXTSTEP) really needed whopping 8MiB to be usable while Windows 3.1 worked just fine with 4MiB - that was big dealâ„¢ and Windows won big time. IBM spent a lot of efforts and in 1994-1995 OS/2 Warp was flying on 8MiB and was even usable on 4MiB while Windows95 was barely usable on 8MiB and really needed 12-16MiB for comfortable use. Windows won big time again because it was prettier, had more software and systems with 12-16MiB of RAM were mainstream at the time.

The same here: five or six years ago Qtopia had quite real and tangible advantage over Android - you could save big on hardware. But today this advantage is much, much smaller and disadvantages (lack of the applications and "content", lack of big name, etc) are worse. 5 second boot time is not something you can sell except maybe to handful of geeks. If Qtopia failed back then when advantages were big and disadvantages small then why do you think "Boot to Qt" will win today when the situation is reversed?


Numerous security issues in X Window System clients

Posted May 25, 2013 18:11 UTC (Sat) by viro (subscriber, #7872)
In reply to: Numerous security issues in X Window System clients by kevinm
Parent article: Numerous security issues in X Window System clients

... and there you go, injecting reality into a perfectly good outraged handwaving.

In the meanwhile, the "fixes" in question are nearly pointless and seriously broken. Nearly pointless because compromised _server_ doesn't need to bugger the memory of client with overflows; usually it can do it either with ptrace (when on the same box) or via ssh + ptrace (when the client runs on remote box). Seriously broken - hell knows why, presumably it didn't get reviewed (embargo?).

Thursday fun: after grabbing these packages on a debian box, xine started to coredump on startup. After digging through the stack trace, it turned out that something had been calling XextAddDisplay with NULL dpy, with obvious fun results. Trace went through libxext and libxvmc, both included into updated, so the next step had been to compare source before and after. Diff looked like a pile of moderately pointless hardening, which might've caused that (if some test had been too eager and recovery from the misdetected error sufficiently bogus). However, it contained some bits outside of error paths, and those were worth looking at first. Like that one:

strncpy(*name,tmpBuf,rep.nameLen);
+ name[rep.nameLen - 1] = '\0';

Cargo-cult programming? Innocent braino that simply hadn't been caught before it hit the tree? Hell knows, in either case it's obviously bogus (name is char ** according to the older line, which makes the '\0' in the added one an obfuscated NULL) and very likely to cause the symptoms observed - by the look of that code, name is going to be an address of local variable in caller's stack frame, so it's quite plausible that dpy sat in a stack word nearby and got zeroed out by that assignment. Or the one added next to it (s/name/busID/). While we are at it, error cleanup changes right next to that place in diff were obviously not reviewed either -

XFree(*name);
*name = NULL;
XFree(*busID);
*name = NULL;

spells "cut'n'paste lossage". OK, fixed both, rebuilt libxvmc, xine's working again. Next question - was that Debian-specific fuckup or was it in mainline? git clone, git log -p and it turns out to be the latter... Next step was to catch somebody connected to upstream (airlied hadn't ducked in time) and point to the idiocy in question. Total time spent: two hours...

For what it's worth, the interesting (and potentially very nasty) story here is that this demonstrates a damn good way to insert a hole into some tree - pile up a lot of obvious stuff ("hardening" of that sort, etc.) and bury the backdoor in pages upon pages of that. Then claim a bunch of CVEs and feed the fixes to projects in question, demanding an embargo to reduce the amount of people who'll be reviewing that pile.

I do not believe that this is what happened here (IOW, that this fuckup had been malicious), but it's only a matter of time before somebody pulls that off for real; it's a very tempting attack vector. Review is blunted by combination of sheer boredom (lot of trivial stuff to look through), presumed good intent of the patchset (security improvements, no less), possibility to distribute the hole between several libraries and reduction of the available reviewers by embargo. Deniability is also pretty high, even if attacker gets caught afterwards...


Functional languages

Posted May 25, 2013 15:53 UTC (Sat) by rwmj (subscriber, #5474)
In reply to: An "enum" for Python 3 by flewellyn
Parent article: An "enum" for Python 3

Actually, enums are a hack for people that have never heard of constructed types and patterns. For example in OCaml:

type color = Black | White | Color of r * g * b
and r = float and g = float and b = float

let string_of_color = function
| Black -> "black"
| White -> "white"
| Color (1.0, 0.0, 0.0) -> "red"
| Color (r, g, b) when r = g && g = b -> "grey"
| Color (r, g, b) -> sprintf "(%g, %g, %g)" r g b


Learn to love it

Posted May 25, 2013 15:50 UTC (Sat) by man_ls (subscriber, #15091)
In reply to: How Google plans to rule the computing world through Chrome (GigaOM) by smokeing
Parent article: How Google plans to rule the computing world through Chrome (GigaOM)

Ok, it wasn't JavaScript, but my argument still stands.
Does it? So you got a lousy job working in something else, but the fault still lies with JavaScript?

Someone blur my face while saying this, please: learn to love JavaScript. I resisted for many years while everyone around me started using it in anger, and now I enjoy it more than it should be healthy. Hey, I have even enjoyed developing a web application in PHP, it's not so bad. Or maybe I am not so picky.

I have not learned Erlang (yet) so I don't have an opinion about it, but I know that JavaScript is so much more expressive than Java or C. It can get ugly as hell, but then you can write ugly code in any language.


Name

Posted May 25, 2013 15:50 UTC (Sat) by rsidd (subscriber, #2582)
In reply to: Name by zonker
Parent article: Introducing Boot to Qt

Certainly better than "Bootie to Cutie".


Anyone remember Qtopia?

Posted May 25, 2013 15:49 UTC (Sat) by rsidd (subscriber, #2582)
In reply to: Anyone remember Qtopia? by khim
Parent article: Introducing Boot to Qt

The long boot time of Android is still frustrating to many, me included. A phone that boots in 5 seconds would have a market. If it shows a noticeable improvement in performance of apps, so much the better. Much depends on the pricing: if the phone itself costs $20-$30 (actually, a decent Android phone costs at least $100 even if it comes from the cheap Chinese makers) then an additional $5 may be worth it, an additional $20 won't. If you can get a $20 phone that, for another $5, performs as well as a $100 Android phone, even better.

The big issue is, as always, apps. If you want to run Android apps, the phone must have the appropriate specs (and price). If you don't want Android apps, maybe boot-to-Qt lowers the specs, but users may complain, unless the Qt app universe expands rapidly.


OT: ChromeOS without Google account?

Posted May 25, 2013 15:42 UTC (Sat) by derat (subscriber, #59036)
In reply to: OT: ChromeOS without Google account? by debacle
Parent article: How Google plans to rule the computing world through Chrome (GigaOM)

Chrome OS can be used in "guest mode", but the user profile will be discarded as soon as the user logs out (resulting in cookies, settings, and so forth being lost). Supporting non-Google authentication- and sync-providers is not a non-goal for the project, but it hasn't happened yet (see e.g. ancient unloved bug http://crbug.com/182167).


Require revelation!

Posted May 25, 2013 11:29 UTC (Sat) by Max.Hyre (subscriber, #1054)
In reply to: Require revelation! by dlang
Parent article: Google releases a draft VP8 patent cross-license

Thank you, sir. Precisely what I had in mind, just much more coherent. :-)


Quotes of the week

Posted May 25, 2013 11:13 UTC (Sat) by man_ls (subscriber, #15091)
In reply to: Quotes of the week by dark
Parent article: Quotes of the week

Amen. Both in the client and in the server.


How Google plans to rule the computing world through Chrome (GigaOM)

Posted May 25, 2013 10:42 UTC (Sat) by Lennie (subscriber, #49641)
In reply to: How Google plans to rule the computing world through Chrome (GigaOM) by robert_s
Parent article: How Google plans to rule the computing world through Chrome (GigaOM)

Well, in your case I think you might be disappointed.

Because as you know webtechnologies in general are already everywhere.

If you look at some of the trends, everything is starting to look like an API these days.

When someone wants to automate the deployment of new virtual machines in the 'cloud'. They use an API.

A developer might have written a smartphone native application and want it to talk to a server. They use an API.

Pretty much all these APIs are actually webservices. Thus they end up using HTTP and maybe XML. And these days they end up using JSON instead. JSON is Javascript Object Notation. A webtechnology, a subset of Javascript.

And because no other popular language has only non-blocking libraries it even makes it easy for people to build non-blocking server applications with Javascript by using nodejs. Many have been successful by doing this also.

Would it make you feel better if you won't have to see the Javascript code ? ;-)

There are ways to translate, I should say compile, from other languages to Javascript these days.

New languages are also created that way, even Microsoft has an implementation called TypeScript.

It can even be a way to boost Javascript performance:

http://kripken.github.io/mloc_emscripten_talk/gindex.html

Pay particular close attention to slide 17 where you have the green bar for Firefox+asm.js:

http://kripken.github.io/mloc_emscripten_talk/gindex.html...

In that case Javascript is only 2 times slower than native. It has been the fastest popular scripting language after Lua for a couple of years now if I'm not mistaken. And Lua was built specifically to allow embedding in C and C++ applications and thus use datastructures that better fit that usecase. So eventually the biggest overhead that is left would be translating between loosely typed data and strongly typed data.

Ever since WebGL Javascript supports arrays of strongly typed data. That is also what emscripten, asm.js use. That is where that latest performance boost originated.

So if you go by Moore's law that makes compiled Javascript 18 months behind on native performance wise right now. But for many applications performance isn't what matters, so 2 times as more than fast enough.

Yes, even on mobile. The software running on the CPU is the least taxing on your battery. The screen and WiFi/3G/4G are much, much worse. So even in that environment it is good enough.

And the performance of Javascript it's still improving.

I wouldn't be surprised when people start compiling Python to Javascript they will find that the Javascript runtime is much faster at running Python than what they are used to from the normal Python runtime.

I'm not as sad about webtechnologies winning, I know it has many limitations.

Webtechnologies are created in similar fashion as protocols, by standards bodies. Making standards takes time and you'll usually end up with the least common denominator and some option parts. Or things missing, where the implementer has to decide what to do. Sometimes make a standard less useful. Pretty much every standard has parts we love and hate.

If you want to blame someone, blame Netscape and Microsoft for Javascript.

Netscape forced Brendan Eich to create a new language in 10 (!) days (and he obviously used some nights too).

After which Microsoft forced Netscape to keep all the bad things in Javascript when it was being standardized in ECMA as ECMAScript.

Then Microsoft got over 90% of the webbrowser marketshare and stopped changing IE. Thus all the bad parts in the language remain and there is a lot of legacy code. Which makes it slow to change the language, but it is still moving.

I guess some people think compiling is the solution to that problem.

If people are really serious about it and if we see widespread use of that, then luckily there is source map support, which allows you to do debugging without having to look at the compiled code.

I wouldn't be surprised to see more use of it, especially if the result can run faster than the normal Javascript. And people want to use the languages of their choice.

But at least the web and it's technologies are a cross-platform solution, a platform on top of other platforms.

Many times it means it is less messy to write cross-platform applications based on webtechnologies than to write native cross-platform applications.

Native and cross-platform even sound a bit like an oxymoron. ;-)

The current economic model as is used in the western world and probably many other models will always push for commoditization.

And commoditization in IT/software means: standards, protocols and open source software.

That is where a platform based on standards thrives really well. So I think the web as a platform could be a natural winner in the platform wars.

We've seen what happens when proprietary platforms win the platform race. It isn't pretty, we are still living with the aftermath of some of these platforms.

If Linux and the Free Software/Open Source software alone can't win the platform race, then please, let it be a cross-platform web which can also run on FOSS and not just some proprietary platform.

So I know what you mean, but I'm less disappointed.


An unexpected perf feature

Posted May 25, 2013 10:36 UTC (Sat) by mpr22 (subscriber, #60784)
In reply to: An unexpected perf feature by ras
Parent article: An unexpected perf feature

192k of data (point DS, ES, SS to different segments).


An "enum" for Python 3

Posted May 25, 2013 10:34 UTC (Sat) by renox (subscriber, #23785)
In reply to: An "enum" for Python 3 by flewellyn
Parent article: An "enum" for Python 3

>Seriously. Enums are a hack for languages that don't have symbol types. Why not do things RIGHT?

Except that very quickly you'll find you need to serialize your symbol and with serialization to an integer, you'll have reinvented Enums..


Numerous security issues in X Window System clients

Posted May 25, 2013 9:12 UTC (Sat) by Cyberax (✭ supporter ✭, #52523)
In reply to: Numerous security issues in X Window System clients by dlang
Parent article: Numerous security issues in X Window System clients

The entity responsible for hardware control - the kernel.


Numerous security issues in X Window System clients

Posted May 25, 2013 9:11 UTC (Sat) by dlang (✭ supporter ✭, #313)
In reply to: Numerous security issues in X Window System clients by Cyberax
Parent article: Numerous security issues in X Window System clients

with dozens of X servers running, what actually controls access to the hardware?


Empty symlinks and full POSIX compliance

Posted May 25, 2013 9:00 UTC (Sat) by tpo (subscriber, #25713)
In reply to: Empty symlinks and full POSIX compliance by viro
Parent article: Empty symlinks and full POSIX compliance

> 3) to all kinds of kooks with agenda^W^W^Wactivists: get a life,
> would you? There are places for all kinds of perversions,
> including advocacy; if you feel like buggering ducks,
> wanking at the photo of Nixon/Brezhnev kiss,
> promoting *BSD/systemd/whatnot - it's your business,
> just keep the discussion in alt.sex.* or appropriate pr0n sites.

Take a short break from the kernel business to fix that mirror of yours.
*t


EFF: Vermont Is Mad as Hell at Patent Trolls

Posted May 25, 2013 8:54 UTC (Sat) by shentino (subscriber, #76459)
Parent article: EFF: Vermont Is Mad as Hell at Patent Trolls

Federal preemption in 3...2...1...


Numerous security issues in X Window System clients

Posted May 25, 2013 8:35 UTC (Sat) by Cyberax (✭ supporter ✭, #52523)
In reply to: Numerous security issues in X Window System clients by rqosa
Parent article: Numerous security issues in X Window System clients

1) Less code - less potential for bugs.
2) Private X server would be working within the context of a single application, so bugs and crashes in it won't affect other applications.
3) Each application can be further restricted by various sandboxing technologies.


Anyone remember Qtopia?

Posted May 25, 2013 8:06 UTC (Sat) by khim (subscriber, #9252)
In reply to: Anyone remember Qtopia? by csamuel
Parent article: Introducing Boot to Qt

Then what's the point? Qt is probably less resource-hungry then Android, but since you are basically cede control of your destiny to Digia... who'll want to use it? And why?

I can see niche for something like this in year 2005 when 1-2GiB of RAM (needed to power Android) was a big deal, but today... when hardware with decent support for full-blown Android in the range of $20-$30 or less... are these potential $3-$5 savings actually worth the hassle?

I think we'll see some adoption, of course, but I don't think this thing will fare any better then Qtopia: it's essentially the same thing and it'll fail for the same reason. Android is either free (if you don't play by Google's rules) or has a negative price (if you play by Google's rules and thus cede control to a large degree) while this thing always have a positive price and you have to cede control, too. Who will want that?


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