Search Results: "daniel"

13 February 2006

Kenshi Muto: HCL: bit thought

My pleasure, liw :-) And I'm very glad to see Roland and Daniel are inspired from my HCL and are trying to make more brilliant things. My hcl system is stored in my personal SVN. Anybody can see and take components from http://kmuto.jp/svn/hcl/trunk. Although I've extra time to develop at this time, I'd like to improve codes in the future, at least around updating existent data.

Daniel Baumann: Re: Device driver check CD

Roland, you are stealing my thunder! *grr* Approximately three weeks ago, I decided to start the "Debian Live" initiative in my semester break - first unofficial, then trying to bring it into Debian and become an official subproject. One of the most important reason for me is having excately such a "device driver check CD"... However, today is the first day of my break and I will start working on it with the beginning of the next week.

11 February 2006

Daniel Baumann: Eiffel packaging considered painful

Our Chair of Software Engineering at the ETH Zurich is addicted to the Eiffel programming language. Thus, a PhD student is working on an Eiffel Multimedia Framework, named EiffelMedia, and I'm doing the Debian packaging. After working the second year with Eiffel stuff now, I can say that packaging Eiffel programs (not the language itself) is a major PITA, with respect to the following two aspects: Eiffel is different Eiffel is non-free

There are not one... not two... but three incompatible Eiffel compilers arround. Oh yeah... Except from some fundamental programs like Gobo Eiffel or the Eiffel Wrapper Generator (they support both all three compilers), nearly all programs are written according to the current Eiffel specifcation. So there is no real alternative to the proprietary EiffelStudio. Beeing binary-only is a major drawback too: EiffelStudio on Linux/powerpc is dynamically compiled against glibc-2.3.5, but Sarge has glibc-2.3.4. So one needs a backport of glibc, which taints the system in an unneccessary and stupid way. Please: Eiffel Software, if you are reading this, open the sources of EiffelStudio now and turn it into free software, for the greater good of us all. Make additional ports to other architectures possible and allow us, the packagers and upstreams of Eiffel programs, to drop the cumbersome support for other ancient Eiffel compilers. Let's focus us to one, single implementation and improve it.

9 February 2006

Daniel Stone: [tech/x] here we go

Let the shiny begin.

4 February 2006

Daniel Burrows: Good Lord, What Have I Done?

Yesterday, while reading a few posts about Gnome's file dialog, I was struck by an idea. I pulled up one of my favorite GNOME rants and pushed it just that little bit farther into the realm of utter absuridty. After adding scare quotes around each use of "keyboard", creating an impression that people who are literate are an inferior "special interest group", suggesting that "keyboard" users' needs are fundamentally incompatible with the rest of the worlds', and suggesting that Gnome users should entirely eschew the use of the keyboard, I figured the whole thing was so obviously silly that most people would know not to take it seriously.


However, since I have experience on the Internet and know that a lot of people have malfunctioning silliness detectors, I went one step further and added a disclaimer at the front indicating that it was a tongue-in-cheek exercise in absurdism and should not be taken seriously. In retrospect, it was a mistake to do this in a clever way rather than writing it out in explicit black-and-white. For instance, this probably explains the fact that when I woke up this morning, I discovered that people were discussing my post in complete seriousness.

I would like to state my opinion on the matter, which is that anyone writing long and angry posts on this subject on Saturday needs to go outside, take ten deep breaths, and proceed to enjoy the weekend without worrying about whether their file dialog box contains a text entry widget or not.

Daniel Stone: [tech] i am too elite to understand your design process

Usually I try not to get involved in the mind-numbingly pointless desktop wars, but Benjamin produces one of the most flawed arguments I can remember having seen.

Fair enough that you want to use the keyboard. I'm much quicker on the keyboard than on the mouse, and presumably so are you. After a long time using computers, and CLIs in particular, this is no surprise.

Most people are not this way. I can assure you that my mother is not this way, and prefers the comfort of the mouse whne navigating around. I don't see what your assertion that 'stating that a typical Gnome user does not want keyboard is simply false' is grounded in. Have you done studies? Do you know the exact breakdown of geeks vs normal people using GNOME? Remember that it's not just for the cool kids who can write their own code anymore -- I know plenty of 'normal' people using Linux now, typically with a GNOME-based desktop.

But, it's 'but don't say it is for users sake' that really throws me. Why do you think they do it? For fun? To see how many people bitch on blogs about it when they do it? Because they hate people and this is the best practical way to take out their anger on the world? They've done studies on their userbase (e.g. the Sun usability study), and they're doing what they believe is best. This is true of every desktop: they simply do what they believe will produce the best desktop for their userbase. Sometimes this results in decisions which people think are bad. Fine then, so be it. This is what's happened here, as opposed to your suggestion of a deep-seated hate for all their users, individually and collectively, or something.

Your claim to be a normal user is simply false. I can't claim the same thing. A good rule of thumb is that if you're capable of writing the application you're using, then you're not a normal user. In some cases, this means you're not its target userbase (not always: this holds more true for, say, Evolution, than mutt).

If you have truly constructive suggestions (not using the words 'crap' and 'simply false'), then provide feedback to the developers through the appropriate channels. If you don't think GNOME is for you, try some of the many excellent other desktops (KDE, XFce, GNUstep, whatever else is around). If you like GNOME otherwise and would like to make a concrete improvement, then submit patches.

Daniel Burrows's point was simple: you are probably not GNOME's target audience (this is not specific to benj; if you are reading my blog, then odds are you aren't GNOME's target audience). So, assertions that they've got it all wrong and they should listen to you on matters of interface design aren't really going to be helpful, because you just aren't the primary target market.

PS: Just because you write it in Latin, doesn't make someone else's argument a logical fallacy.
PPS: If you're still having trouble wrestling with this entry, imagine instead someone bitching about Debian being crap because they don't include the proprietary Flash plugin, a bunch of closed-source games, VMware, etc. That's not what Debian's about. Make sense now?

Benjamin Drieu: You are too elite to use my crap

Daniel, I'm afraid you are guilty of Argumentum ad populum. I would really like to see those millions of Gnome users confused by this small white square called a GtkTextEntry that every gnome zealot invokes when asked why keyboard support disappeared from a lot of Gnome features. What is funny is that the very Gnome Human Interface Guidelines ask not to [...] Limit Your User Base and that is exactly what the Gnome developers do. Stating that a typical Gnome user does not want keyboard is simply false. My own experience let me think a substantial part of Gnome users want both (and the Ctrl-L thingy does not count as keyboard support, it is just crap). I would perfectly understand Gnome developers prefer it this way, after all it is their choice. But don't say it is for users sake. And be prepared to loose many users with unique needs.

Daniel Burrows: Silly "keyboard" users

$CHEEK <- $TONGUE


As a followup to the latest Gnome file dialog bashings:

I find it ironic that users with very unique needs complain about Firefox (or Gnome) not being written for them. You should consider that a large majority of users do not need the features you so desperately want in the GUI, and instead of complaining that the Gnome dialog doesn't use the "keyboard", you should consider that perhaps you are not a typical Gnome user. The people who wrote Gnome like it the way it is and they could never satisfy your needs and their own at the same time.

If you are "keyboard" users, use a Web browser written for the "keyboard" by "keyboard" users. Don't complain about Gnome Web browsers being designed for Gnome. Thanks.

1 February 2006

David Nusinow: It's Alive!

Well, I've done it. The XSF svn repo now contains a full set of packages for the Xorg modular tree that enable it to run an X server in a chroot from a clean install. Note that the packages are still very sloppy because I've been mainly beating them in to shape enough to simply run the server. But that part's now done, and I can happily get that grey hatched background to show up from inside my chroot. The next step will be to finish packaging everything, so that we have a full set of packages to install, run, test, and clean up to the standards of quality we expect from Debian. Note that I don't recommend anyone but developers even take a look at these things yet, since I've been very lax in getting them in to good shape. I had a good base to work from (more on that in a moment) but I took some liberties and cut some corners in order to get to this point. Once we have a full set of packages, I'll throw them in to experimental for people to play with, but right now they're not going to be much fun for anyone.

I couldn't have gotten this far this fast without the help of Daniel Stone, so a big thanks goes out to him. Not only has he been great about showing me just which packages to steal from and where, but every time I ran in to some obscure bug he had already been there and quickly pointed me to the way out, often with a package update ready to go. The packages he made are wonderfully simple and easy to understand, which let me get moving on them right away, and they'll form a wonderful basis for the future of Debian's X distribution.

On a further note, I've asked the release team to let us upload 6.9 to unstable when it's released, which should be next week. So far there's been no objection, and a bunch of people have chipped in so far to help out with the xlibs-dev transition. Thanks to everyone who's been helping out so far with getting 6.9 in. 6.9 will set the stage for the modular packages, by giving everyone the most up to date drivers for the next few months and taking the pressure off of me to deliver the modular packages right away :-) My goal is to ship the modular packages with etch, and I'm going to keep working to do that, but 6.9 should keep people happy until those are ready for unstable.

David Nusinow: Modular Server Debs!

I've been relatively quiet lately because I've been plodding along, working on modular packages for Xorg. For those who don't know, the next release of Xorg will actually be two releases of the same code. One release, 6.9, will be based on the old monolithic build system. This system requires me to build every single part of Xorg whenever I want to update any one part. This means that whenever I push out an Xorg fix, no matter which component it's in, you have to download all the other components even if they are 100% identical to the previous version already on your hard drive. We've all lived with this for a long time, and while it's not pleasant, we all seem to get by. The packaging apparatus for this system is mature, stable, and well understood, if complex. That's why I've been able to get the 6.9 release candidate packages out to experimental fairly quickly after they are released.

The other release happening is for 7.0, which is obviously a major version number bump. The actual code you run for 6.9 and 7.0 is 100% identical, but the build system has been totally rewritten around the venerable autotools (you know... configure /make/make install). Each piece has been split out from the others so that you can build any one component without building all the others. This means that if we want to ship a driver update, you don't have to download all of the fonts and other things that weren't touched. That also means that you won't have to install the drivers for cards you don't own if you don't want them. Furthermore, it lowers the barrier for things like hacking on X significantly.

The problem with the modular tree is that the packages for it are brand new. Ubuntu shipped modularized versions of the libraries, and I've already stolen those, fixed them up for Debian, and built them locally (they're sitting in our svn repo, but running them won't get you anything at this point.) The server and driver packages are brand new, and I've been taking the packages from Ubuntu's development branch and working on them for Debian. Today was a milestone day because in addition to the libs, with Daniel Stone's constant help I've finally managed to build packages for the modular X server itself. Now I can't run it yet (I haven't packaged the drivers and a few other bits) but the fact that I managed to produce what will be a functional server package is a huge step, and constitutes the cornerstone of the whole thing.

Once we can create packages that can actually run on at least the machines of the XSF, we can start looking at getting the packages in to the archive. Since these aren't well tested like the monolithic packages, we'll have to do a lot of polishing to get them to the same level of quality. My goal is to get that done for etch though, and I think we can do it. Exciting things are happening, and I'm hoping that the modular packages will encourage more people to hack on X, leading to even more exciting things. Build that momentum.

David Nusinow: X.Org: Oops

Last time I blogged about the libglu situation, which I explained was necessary because of the C++ ABI transition in changing over from gcc3 to gcc4. libglu is the one library written in C++ in all of the X.Org source tree, so it was the only one that had to be broken.

It turns out we were wrong about that. libglu is indeed written in C++, but Marcelo Magallon pointed out that it only exports a C ABI, and as such it doesn't need to be transitioned. I have admittedly little experience with shlibs myself, so I didn't know such a thing was even possible, and no one else caught it either. The next version of X.Org, which will be uploaded as soon as I can get it built, will have this fixed, and nvidia-glx, and everything that depended on xlibmesa3-glu will hopefully install just fine once that goes in. Sorry about that everyone.

In addition, this upload should have correct MANIFEST files for all arches, which will hopefully allow it to build successfully on all of them. This will allow X.Org to transition in to etch after a week and a half. This will also unstick gnome 2.10's transition in to etch, which is now tied up with X.Org. Daniel Stone helped pull those MANIFEST updates together, which has been a huge help, so you should send him your hugs 'n kisses. There is an issue with libvgahw which a lot of people have reported, which causes problems when you switch to a virtual text console and then back in to X, which should be fixed in this upload as well (you can thank David Mart nez Moreno for tracking that one down before I could even blink). Finally, xterm bold fonts have been looking like garbage, but Eugene Konev came up with a patch to fix that, which I'm working on rolling in right now.

So if all goes according to plan (that's your cue to laugh mercilessly at me) the next upload will move in to testing just fine, leaving us with room to make larger improvements in the X.Org packaging, as well as working towards getting the (currently unreleased) next version of X.Org in to Debian.

David Nusinow: X.Org Has Been Uploaded

I wish I could say that the subject says it all, but that's not quite true.

First off: it's true that X.Org has been uploaded to unstable. Steve Langasek talked with the gcc maintainers and they decided that X.Org wouldn't block gcc4, so I got the approval to upload. Steve, as ever, is awesome.

Then Daniel Stone noticed that the packages are missing updated MANIFEST files for many of the ports. These files were put in place in the X build system long ago so as to manage to complexity of new upstream revisions. Because there's just so much stuff in the X source tree, there had to be an automated way to deal with making sure everything was present and accounted for. The end result of this is that if a MANIFEST that we have doesn't match up with the one generated while building the package, the build will fail. So what's going to happen is that with this upload, some architectures will get the X.Org packages, and others will not due to build failures. I uploaded i386 packages, so that will definitely go through right away, and ppc, sparc, amd64, and I believe mips should all go through as well.

The reason we went with this plan is that when the builds fail, the build logs will give us a diff for the MANIFEST for each arch. So what I can do is use those to fix the MANIFEST files tomorrow, rebuild as fast as my laptop can manage, and upload the -2 revision which has correct MANIFEST files. Steve, Daniel, and Ryan Murray all directed me in deciding on this plan, and I owe them a ton for all their help.

Already we've hit a build error in s390 that we're working through, but hopefully we can get all the ports in line ASAP so that this can transition to etch. But here it is. After a long wait and lots of work by lots of people, X.Org is finally entering Debian.

I think I need a glass of scotch.

30 January 2006

Antti-Juhani Kaijanaho: Counting lines

Insipired by Daniel Burrows’ tests, I decided to do mine. The object is to come up with a Haskell program that performs the job of wc -l as efficiently as possible. My test material is a randomly generated file with all lines less than 80 characters long. Summary: my final idiomatic version is twice as slow as wc -l, and my final nonidiomatic version is as fast as wc -l, or at least within the margin of error. First, the baseline:
$ time wc -l testfile
7798137 testfile
real    0m12.127s
user    0m0.765s
sys     0m0.399s
Then the most idiomatic program. Honestly, I expect it to suck performance-wise:
main = getContents >>= print . length . lines
And it does:
$ time ./wcl1.hs < testfile
7798137
real    1m14.993s
user    0m54.182s
sys     0m0.573s
But only by a factor of six. My first hypothesis is that garbage collection is the culprit. And, indeed:
$ time ./wcl1.hs +RTS -sstderr -RTS < testfile
./wcl1.hs +RTS -sstderr
7798137
25,236,174,340 bytes allocated in the heap
5,070,193,924 bytes copied during GC
117,484 bytes maximum residency (3750 sample(s))
96274 collections in generation 0 ( 26.36s)
3750 collections in generation 1 (  0.74s)
2 Mb total memory in use
INIT  time    0.00s  (  0.00s elapsed)
MUT   time   27.17s  ( 42.72s elapsed)
GC    time   27.10s  ( 33.72s elapsed)
EXIT  time    0.00s  (  0.00s elapsed)
Total time   54.27s  ( 76.44s elapsed)
%GC time      49.9%  (44.1% elapsed)
Alloc rate    928,824,966 bytes per MUT second
Productivity  50.1% of total user, 35.5% of total elapsed
real    1m16.616s
user    0m54.278s
sys     0m0.700s
As you can see, GC takes half of the processing time. Unfortunately, minimizing GC time does not have as big an effect as I hoped:
$ time ./wcl1.hs +RTS -H100M  -RTS  < testfile
7798137
real    1m1.354s
user    0m44.371s
sys     0m1.171s
Here, I’m effectively telling it to use a 100-megabyte heap. A separate GC profiling run tells me that GC time has dropped from 50 % to 1 %. The memory problem seems to be a red herring. What we’re doing here is creating four separately allocated memory cells for each character in the input. Of course, the cells are generated lazily, that is, a cell pair is allocated when the lines function demands another character; it then creates another cell pair to denote the same character in a list of lines. As soon as each line has been counted, the four cells become garbage. This sounds like a lot of work! But apparently it isn’t; I tried a few variations that did away with the stream of input altogether, not much unlike what Daniel did in his tests. Surprisingly, the performance worsened a lot. The lesson: functional programming language implementations, unlike typical imperative ones, are built on the assumption that you’ll be doing a lot of allocation. What I suspect is taking a lot of the time is arithmetic. Haskell’s Int is boxed, and lazy by default, adding a lot of overhead. I hand-fused length and line, yielding a tail-recursive countLines function, and I added the command-line switch -funbox-strict-fields, which enables a few significant optimizations of the laziness of Int. The results were nice:
ajk@kukkamaljakko:~/scratch$ cat wcl4.hs
module Main (main) where
main :: IO ()
main = getContents >>= print . countLines 0
countLines :: Int -> String -> Int
countLines n ('n':r) = countLines (n + 1) r
countLines n (_:r) = countLines n r
countLines n [] = n
ajk@kukkamaljakko:~/scratch$ ghc -O -Wall -funbox-strict-fields --make wcl4.hs -o wcl4
Chasing modules from: wcl4.hs
Compiling Main             ( wcl4.hs, wcl4.o )
Linking ...
ajk@kukkamaljakko:~/scratch$ time ./wcl4 < testfile
7798137
real    0m37.961s
user    0m29.853s
sys     0m0.495s
ajk@kukkamaljakko:~/scratch$ time ./wcl4 +RTS -H100M < testfile
7798137
real    0m25.153s
user    0m13.497s
sys     0m0.803s
ajk@kukkamaljakko:~/scratch$
With a large heap, the program is only twice as slow as the baseline. This is pretty good, considering that the code is still idiomatically functional. The following rather ugly, imperative program does away with the lazy stream and carefully avoids any laziness without doing any too dirty tricks:
ajk@kukkamaljakko:~/scratch$ cat wcl7.hs
module Main (main) where
import Data.Word
import Data.Array.IO
import IO (stdin)
count :: Int -> (Int, Int) -> IOUArray Int Word8 -> IO Int
count 0 _ _   False = undefined -- force ac evaluation
count ac (l,u) _   l > u = return ac
count ac (l,u) ar
    = do a < - readArray ar l
         let ac' = case a of 10 -> ac + 1
                             _  -> ac
         count ac’ (l+1, u) ar
maxn :: Int
maxn = 4096
main :: IO ()
main = do
  arr < - newArray (0,maxn) 0
  let loop :: Int -> IO Int
      loop acc = do n < - hGetArray stdin arr maxn
                    if n == 0
                       then return acc
                       else do acc' <- count acc (0,n) arr
                               loop acc'
  res <- loop 0
  print res
ajk@kukkamaljakko:~/scratch$ ghc -O  -Wall -funbox-strict-fields --make wcl7.hs -o wcl7
Chasing modules from: wcl7.hs
Compiling Main             ( wcl7.hs, wcl7.o )
Linking ...
ajk@kukkamaljakko:~/scratch$ time ./wcl7 < testfile
7798137
real    0m13.431s
user    0m10.342s
sys     0m0.467s
Of course, this program is not Haskell 98, but the nonstandard things it uses are fairly common. As can be seen, this version’s performance is, considering the margin of error, equal to the baseline. The compiler used in this test is The Glorious Glasgow Haskell Compilation System, version 6.4.1, as packaged in Debian sid.

Daniel Burrows: How much speed are you willing to give up for pretty code?

After experimenting a bit with Haskell and using it for some toy projects, I decided to see if there was any chance it could be used for a non-toy task; i.e., one where it might one day be necessary to actually have fast code. As a proxy for this, I decided to try a very simple task: counting the number of lines in a file. As input, I generated a file with a million lines of random data and an average of 40 bytes per line; all the Haskell programs were compiled with the current GHC in Debian unstable and with optimizations enabled.

The baseline is, of course, our friend "wc":

real    0m0.084s
user 0m0.043s
sys 0m0.040s


(this and all other timing data was taken after "cat /tmp/testwc.txt > /dev/null" to ensure that the file was cached) Now, it's probably too much to hope that a Haskell program will run as fast as a C program does, since the C program can run in a tight loop. But it seems reasonable that it should be possible for Haskell to be competitive with the trivial Python implementation of this program -- after all, Python is interpreted and Haskell is compiled.

import sys
n = 0
for line in sys.stdin:
n += 1
print n


Running this simple Python program under "time" produces the following statistics, a bit less than 10 times slower than the C version:

real    0m0.698s
user 0m0.643s
sys 0m0.050s


The trivial Haskell program to count the lines of its input is:

main = do c <- getContents ; print $ length $ lines c


Note that this is basically identical to the Python program, but expressed in a functional style. Pretty, but how does it stack up?

real    0m6.744s
user 0m6.426s
sys 0m0.213s


OW! Ten times slower than the Python code, and a good 80 times faster than "wc"! The gap can be lowered to "only" 50 times with the following program --

do c <- getContents; print $ length $ elemIndices '\n' c


-- but surely it's possible to do better. I'd expect that the expense here is in the use of lazy streams for IO; eliminating them gives us the following code:

wc :: Handle -> IO Int
wc h = do a <- mallocArray bufSize :: IO (Ptr Word8)
loop a 0
where loop a n = do amt <- hGetBuf h a bufSize
elts <- peekArray amt a
(if amt == 0
then return n
else loop a $! n + nlCount elts)


At this point, we're basically using Haskell as a (bad) imperative language. This function allocates a buffer, repeatedly reads into it, and counts the number of newlines in the buffer (I dropped some auxillary code to keep the post short). The $! is important; without it, even though this routine is tail-recursive, Haskell will still allocate an unbounded amount of memory to store the return value. (because, of course, it's terribly important to remember that you're actually returning "1+2+3", not "6")

So, how does this unreadable, hand-optimized version of the code perform?

real    0m1.980s
user 0m1.757s
sys 0m0.094s


That's right -- I've eliminated most uses of higher-level functional techniques, and the Haskell version is still two times slower than an ultra-high-level interpreted language, while also being uglier and harder to read! Ouch. It appears the old performance albatross of functional languages is not quite dead yet.

25 January 2006

Uwe Hermann: How to Survive a Robot Uprising

Daniel H. Wilson, Ph.D. from the Robotics Institute of Carnegie Mellon University, has written a book about HOW TO SURVIVE A ROBOT UPRISING. Bruce Schneier asked for more suggestions, and he received. Plenty. (via Bruce Schneier)

22 January 2006

Miguel Gea: Ubuntu e-mail

A few months ago, I opened an ITP to ocrad package, then I tried to find an sponsor and seems to be not possible to find one. I uploaded it to nm.d.o and forgot it. Now, i've received this mail from Ubuntu:

Hello Miguel,

I'm working on the community team that is bringing extra packages into
Ubuntu's Universe component so they are more easily found by Ubuntu
users. We've selected this package that you maintain:

- ocrad

So this will be part of the Ubuntu 5.04 release on April 8th. We may
add more packages after Hoary, for the next release in October,
codenamed Breezy Badger.

We'd like to work with you to make sure that the latest version of your
packages is always in Ubuntu. Feel free to mail me whenever you have new
versions of the packages for testing or commentary. If you'd like to be
able to upload directly to Ubuntu then we can arrange that. We organise
ourselves as an open community project - some details are at
http://wiki.ubuntu.com/MOTU if you'd like to join the ubuntu universe.

Have a nice day,
Daniel Holbach


It seems as Ubuntu is working to add software faster than Debian. I'm thinking my answer.

19 January 2006

David Pashley: Mozilla causing XSS in Livejournal

As mentioned in my last entry, Livejournal have changed their url scheme to get around a problem in mozilla. The trouble is down to the -moz-binding CSS property. I'll repost a copy of the short lived posting to the lj_dev community earlier.
Discussing the URL Change As we recently announced in [info]news, we have changed the canonical URL of most journal, community, and syndicated content. While we did offer subdomains to Paid users in the past, this is now the canonical URL that we will link and redirect to for all journals. However, all communities are located at http://community.livejournal.com/username and syndicated accounts at http://syndicated.livejournal.com/username. Due to the way certain proxy servers are configured, and the fact that the HTTP RFC prohibits it, the canonical URL for journals with a username starting with an underscore will be http://users.livejournal.com/username. We are however offering a free rename if you fall into this group. So now the technical side of all of this and why it was a required change; bear with me as its 3am my time and I'm sitting in John F. Kennedy Airport after a five hour flight. Late last week we become aware that it was possible to use the "-moz-binding" CSS attribute within Mozilla and Mozilla Firefox to execute arbitrary offsite JavaScript. As this attribute is designed to allow attaching an XBL transform and JavaScript to any node within the DOM, it is quite easy to use in a malicious fashion. We immediately altered our cleaner to strip this attribute from entries and comments, though also realized that wasn't even half the battle. As we allow custom CSS in many of our styles, as well as the ability to link to an external stylesheet in a variety of fashions, it was quite possible to take advantage of this exploit and hijack the session cookie of any user who views your journal. As we, along with many other sites, used one cookie to authenticate a user, this cookie was quite powerful if stolen. If the user had not chosen to bind their cookie to their IP address, a malicious user could steal it, login as that user, deface the account and SPAM with it, as well as modify that user's style to include the exploit thus causing this problem to spread much like a virus. Borrowing the idea from another development team within Six Apart, we decided we needed to break our cookies into three categories. One cookie would be our application management cookie, this cookie would only be accessible on www.livejournal.com where we will not display untrusted content. A second cookie will be accessible on all subdomains of livejournal.com, though it only will say if you are logged in or not; it is solely for optimization. We then will issue one cookie for each journal you visit. This cookie will be only accessible on username.livejournal.com or community.livejournal.com/username as it is limited to a single journal. This cookie will only grant you the permission to read protected entries and post in the particular journal. This means that if the journal owner steals your cookie, they will be able to do nothing more than view their journal and comment upon it as if they are you. In the end you will have n+2 cookies, with n being the number of journals you visit. Due to the fact that we cannot clean every external CSS stylesheet linked to every time we generate a journal page, this change is required. While it does not fully protect us from some new cross site scripting vulnerability that can be exploited via entries or comments, they are much easier to block, patch, and recover from quickly. With Mozilla deciding to allow the execution of arbitrary JavaScript via CSS, there is no other viable solution than the one we have undertaken. We developed a plan to phase all of this in over the next week, URL change first and then followed by the cookie change, though this morning we were made aware that this was being actively exploited. As such we took our week time line and shortened it to about twelve hours. While URLs have been changed at this time, our cookie handling change has not yet happened. This should however be expected to take place within the next day or two as well as various other cleanups and fixing bugs we've already encountered. Please feel free to let us know if you have any questions and open a support request if you find a bug or encounter a problem. Sorry all of this came with just about zero warning, but in the end we could not wait longer to fix this problem.
Thanks to Daniel Silverstone for providing me with a cache copy of the text.

17 January 2006

Daniel Stone: [travel] daniel's handy traveling hints

Here's another handy hint: if you're lugging a complete computer on a plane, including sizeable tower case, don't bother checking whether it fits in your suitcase until just before you leave. Of course it'll fit.

In unrelated news, my lovely silver case now has a massive broken dent in it.

Daniel Stone: [tech] zomg vorbis

Thomas, I'm a skanky leftie, though as time goes on and all the iPod rivals slowly eliminate themselves due to disintegrating or being crap (if you like it, that's great, I can see that it has nice points, but they're just not for me), it starts to look like a less good choice. Although the iPod does have that god-awful clickwheel these days. Ugh.

And Ross, I'm also a food leftie. It's the only way to fly. Supermarket tomatoes are just crap when you've had proper huge, deep red, hydroponically grown organic tomatoes from the market, sold to you by the people that helped grow them.

10 January 2006

Daniel Stone: [tech] tripleverbify

J5,
Nice entry, but this sentence no verb, let alone three.

Recommend 'securify, flexify, manageify'.

Next.

Previous.