:(

Not found.

Summer Outreach Projects, pt. 2

We’ve just announced the accepted WSOP projects! They are:

Student Project
Cecilia Gonzalez Alvarez Evolution component optimisations
Clare So Editing MathML Expressions in GtkMathView
Fernanda Foertter gJournaler, a PDF library tool
Maria Soler Climent Decentralised synchronization of Tomboy notes
Monia Ghobadi Integrating GNU screen with gnome-terminal
Umran Kamar An Evince plugin for Mozilla

We were having a lot of fun until we got to the point where we had around 100 applications and had to pick six of them, and then it started being just hard. But we’re there now. My commiserations if you applied and weren’t accepted: we had far more than six outstanding applications.

We’re going to start up a gnome-love style mentoring program to try to encourage anyone interested to stick with us. Watch this space!

Summer Outreach Projects, pt.1

It’s WSOP day — we’ll be announcing the list of accepted projects in the next few hours. We’re thrilled that Google is donating funds to double the number of available projects from three to six, due to the project getting a huge response from interested women. Thanks, Google!

(Wah, I just got home after watching England go out of the World Cup. They played really well with ten men, though, go team.)

Women’s Summer Outreach Program

While reviewing GNOME’s Summer of Code applications I noticed that none of the 181 applications we’d received appeared to be from women. This upset me, and I teamed up with my ex-officemate Hanna Wallach to write a proposal to the GNOME Foundation’s board, suggesting that we use the money given to the foundation by Google (for taking part in SoC) to fund a few project slots specifically for women.

To our delighted surprise, the board said yes, and today GNOME’s launching the Women’s Summer Outreach Program, which will run from July 1st – September 1st and offer two-month long projects to three female students. For this to be a success, we need as much help from the community as we can get. Namely:

  • Spread the word! If you know any female students with programming experience, please consider sending them an e-mail with a link to the project. Even if they decide not to take part, they might at least be interested to see what we’re doing.

  • We’ve created a list of potential projects on the wiki, based on the MentoredProjects list started by murrayc, and it’d be a great help if any GNOME developers could consider adding something to the list. Please give the entries enough context to have them understandable by someone who isn’t necessarily experienced with the GNOME stack.

  • If you’re involved with a CS department we have a poster for your noticeboard. If your department has an e-mail list for student job opportunities that we could use, please let us know.

We have a tight timeframe to get started — 2.5 weeks until the submissions deadline — due to starting out late, but I’m confident we can make a real difference to the community with this project. If you’re interested in helping out, please stop by #wsop on irc.gnome.org.

Update: The project’s been linked to from gnome.org, along with Mairin Duffy’s awesome artwork.

Barcamp wrap-up

Barcamp‘s over now, and was well worthwhile. I’ve missed the kind of environment where you can wander up to people, say “So, what are you working on?” and get an enthusiastic insight into an area you might not know anything about — Barcamp’s everyone-should-participate mentality was just right for that.

The Touchstream turned out to be a big conversation starter, and I had fun chatting about alternative keyboards and UIs with smart and friendly people like j and Steve. I gave my first Dasher demos since leaving Cambridge, which felt good; reminding me how worthwhile a project it is, and that it deserves more of my time than I’ve given it.

My talk at Barcamp was 20 Perl modules in 30 minutes. After the talk we chatted about possible reasons for Perl being suspiciously absent from the rest of the talks, with people finally seeming to lean towards Ruby/Python/PHP instead. I’ve been hanging on to Perl partly because I’m paid to write it, and partly because of the mind-blowing awesomeness of the CPAN. When Ruby gets a module collection with anywhere near as much coverage, I’ll be there.

The reddit guys came up with a hilarious talk on Web 2.0, and are going to upload the video of it to this page sometime soon.

Also: I was thrilled that someone came up after my talk and said he uses a Mac and wondered where I got the software to do cube flipping between two workspaces — I was swapping between one workspace containing my presentation and one with an emacs session showing example code and running it. The reason I was thrilled is that I wasn’t using a Mac, but we must be doing something right if my setup can be mistaken for one! I used Linux with magicpoint for the presentation and compiz on aiglx for the crazy cool cube flipping.

Live from Barcamp

I’ll be blogging from Bar Camp Boston for the next day or so. So far I’ve heard Schuyler and friends talk about open-source Geo stuff — they’re working on a BSD licensed maps API called OpenLayers that sits at the layer above services like Google Maps and provides a consistent API to them; so, you can target your mapping app at OpenLayers and then back on to any data source that they have a plugin for. Interesting things:

I also saw Dan Kunkle give a talk on solving the Rubik’s Cube; with 4.3 * 10^19 states, we couldn’t even store a bit per state, but he’s using some clever strategies to reduce the space into the double terabytes. He also solved the cube — “okay, now I don’t need to look any more.. thirty seconds of fast flipping while he looks away and continues talking.. done” — for us. I bet solving Rubik’s Cubes would improve my Go game.

They just brought out tens of pizza boxes, so sounds like time to eat. More later, with photos, which there’s a Flickr group for.

Summer of Code

Google just told the applicants for this year’s Summer of Code whether they were accepted! I’ve put up GNOME’s list of accepted projects. Many congratulations to everyone we accepted as part of GNOME, and commiserations to students we had to turn down — we’d love to keep working with you outside of the formal SoC.

GNOME had 181 submissions in total, and it was a pleasure to read all of them. We got that down to a shortlist of 40, and then had to try to go from there to our accepted list of 20 via votes, meetings, and long e-mail threads.

Since the list’s going to be new to everyone outside SoC, I thought I’d enthuse about a couple of the projects that I’m going to be tracking excitedly over the summer. (With apologies if I end up misrepresenting anyone’s project!)

Generic user-to-user connection interface for collaborative applications using telepathy

Telepathy is a freedesktop.org project working on a unified interface to different types of communication (IM, VoIP, etc), and this proposal from Mads Chr. Olesen aims to make direct connections with your Telepathy contacts possible over an IM layer. For example, if I want to work on a document with a friend using the collaborative editor Gobby, we need a server to host the session. What if we’re both behind different NAT networks, as most people are? Well, then, we can’t. Same for VNC. The proposal uses the Jabber stream extensions to tunnel application data, meaning that contacts can be treated as “first-class objects” for establishing connections.

(If you’re using a different IM protocol and it also supports arbitrary streams, that’s fine too; the whole point of the project would be that application developers and users don’t need to know exactly how the data is getting tunnelled unless they care.)

The reason I like this proposal so much is that it reminds me of the way this interview with Nat talks about how good programmers add a dose of empathy to their code. Why should the user have to care how they connect with one of their contacts, or what NAT is, or what IP address each of them has? This is totally user-centric programming.

Improving Emblems in GNOME

This is a proposal by James Barrett. The title doesn’t tell the whole story — as well as emblems, think tags. Everywhere. James is going to integrate nautilus and leaftag, and gives some excellent use cases: using a “backup” tag to have those files/folders backed up automatically, viewing “virtual folders” of each tag in nautilus, being able to quickly bring up all your photos with a particular friend in after tagging them. Emblems are going to be the visual representation of a tag, and will be integrated with nautilus/the panel/the file chooser.

People are getting comfortable with the idea of tags from experiences with Flickr and YouTube, and I think a well-designed use of tags for their files as well is going to be a killer feature. This is exactly where we can innovate far past Windows and OS X, and I’m pleased to say I got the same feeling from many of the proposals.

Bluetooth Manager

Matthew Garrett works on the kernel, GTK2 apps and everything inbetween, and he’s going to spend the summer tidying up Bluetooth; making sure that you can pair with keyboards, headsets and phones inside GNOME and have things Just Work, and ideally by having HAL do the heavy lifting so that you don’t need root to do so. Our bluetooth tools are in need of an overhaul, and this is valuable work.

Improving nautilus login performance & ease of profiling

Phillip Ezolt is a published expert in profiling and optimisation, and wants to help us out both with profiling nautilus and providing hooks to aid profiling in the future. Phillip’s in grad school working on visualisation at the moment, and knowing how to usefully represent profile data graphically is a problem we’ve only recently started trying to solve. He’s interested in getting involved with Linux/GNOME in the long-term, and I’m looking forward to everything we have to teach and learn from him; it seems like hardcore profiling skills are something only a few of us have. I liked this proposal so much that I offered to mentor it.

Thanks to Google for their sponsorship and the insane amount of work it must take to coordinate all this, to Behdad and Vincent for heading up GNOME’s involvement, and welcome to all our new SoCers!

Systemtap for fun and profit

Kjartan Maraas pointed me at this Fedora bug yesterday — it points out that /proc/$pid/maps has been broken in Rawhide for a month. The patch that made linux/fs/proc/task_mmu.c (which is where map requests are handled) diverge from mainline is this one. I can’t read more about its motivation since the Bugzilla ID is security blocked.

So, where to start? mm_for_maps() is a new function that does a bunch of checks on the relationship between task and current before deciding whether to allow the request; I threw some printk()s in to find out which were failing, and found that we take the !__ptrace_may_attach(task)) path to the out label in the code below:

if (task->mm != mm)
    goto out;
if (task->mm != current->mm && !__ptrace_may_attach(task))
    goto out;

From there, it got hazy. __ptrace_may_attach() returns whatever security_ptrace() does. This takes us into pluggable LSMs land — any LSM that gave a struct security_operations with a pointer to a ptrace function will have a shot at returning an error that would be sent back to security_ptrace() to stop our request from completing.

But how do I tell which LSM is complaining, or even which LSMs are loaded? After all, they’re registered at runtime. Enter systemtap, as wisely suggested to me by Bill Nottingham (whom I now surely owe beer to). Systemtap is similar to the Solaris dtrace; it’ll let you instrument and track kernel functions and system calls for a running kernel. It was installed on my Rawhide machine by default, which is always a nice touch.

So, how to see which ptrace functions were registered? Enter my first systemtap probe:

unity:cjb~ % cat list-ptrace.stp
probe kernel.function("*ptrace*") {
    printf("%sn", probefunc())
}
unity:cjb~ % sudo stap list-ptrace.stp

At this point, our stp script is converted into C code and compiled into a kernel module, before being loaded into the running kernel. After running a cat /proc/<pid>/maps in another terminal, we see:

__ptrace_may_attach
cap_ptrace

.. which suggests that cap_ptrace was called by __ptrace_may_attach, and that’s where our __ptrace_may_attach might be being turned down. To be sure that we got to cap_ptrace via __ptrace_may_attach, we can ask for a backtrace:

unity:cjb~ % cat cap-backtrace.stp
probe kernel.function("cap_ptrace") {
    printf("%s -> %sn", probefunc(), print_backtrace())
}
unity:cjb~ % sudo stap cap-backtrace.stp
cap_ptrace ->
trace for 6345 (cat)
 0xc04c2286 : cap_ptrace+0x7/0x49 []
 0xc042a600 : __ptrace_may_attach+0xac/0xae []
 0xc049350c : mm_for_maps+0x83/0xd8 []
 0xc0492892 : m_start+0x28/0x11d []
 0xc04800d9 : seq_read+0xdb/0x268 []
 0xc0446288 : audit_syscall_entry+0x104/0x12b []
 0xc047fffe : seq_read+0x0/0x268 []
 0xc04648e2 : vfs_read+0x9f/0x13e []
 0xc0464d2e : sys_read+0x3c/0x63 []
 0xc0403d07 : syscall_call+0x7/0xb []

We’re pretty sure that cap_ptrace was responsible. Hunting through its source, we see that it has a path to return -EPERM, which would do it. So, we recompile the kernel in order to have cap_ptrace tell us what return value it’s going to use, right? Well, no. Straight back to systemtap:

unity:cjb~ % cat return-codes.stp
probe kernel.function("*ptrace*").return {
    printf("%s -> ", probefunc())
    log(returnstr(1));
}

The .return after the function pattern tells systemtap to trigger when the function is returning, and returnstr(1) asks for the return value as a decimal. There’s also print_regs(), if you prefer to see what’s in EAX directly. Over to the other terminal to cat a maps file again, and:

unity:cjb~ % sudo stap return-codes.stp
cap_ptrace -> 0
__ptrace_may_attach -> 0

That’s odd. cap_ptrace is returning 0, which we can see in its code is meant to mean success, and __ptrace_may_attach is receiving it back unharmed. Cue an “ah-hah!” moment as we realise that the conditional:

if (task->mm != current->mm && !__ptrace_may_attach(task))
    goto out;

.. has the wrong polarity; each of the functions that __ptrace_may_attach backs onto return zero for “success” (permission to attach), but the logic above is “if we’re not trying to get the map of the current process, and __ptrace_may_attach isn’t non-zero, we should fail”. The exclamation mark needs to disappear.

And so we’re done. My uses of systemtap weren’t nearly as complex as those in the tutorial, but I’m happy that I saved myself the kernel compiles. I’d somehow managed to miss any hype around systemtap; if you’re another systemtap user, please consider blogging your code!

All about the bling.

I noticed that the AIGLX movies on the Fedora wiki showed a neat wobbly minimize animation, and decided to find out where the code was. It was disabled in metacity CVS — here’s a patch
to enable this animation as the default, with the explosion animation still available if you start metacity with USE_EXPLOSION=1. Enjoy!

No more oops.

GIT is immensely impressive. Sadly, Dominik Brodowski is even more impressive, and has a fix for the bug I was having fun bisecting sitting in his PCMCIA tree; note to self to next time mail the relevant maintainer and ask if they know anything about the bug you’re going to try and fix.

Here’s the git bisect visualisation letting me know which merge was responsible, which is where I decided to check out brodo’s tree. (Of course, I could also have continued the bisection down to the individual patch.)

Rawhide bug update.

Busy day. I’m pleased and impressed that 2/3 of the bugs I mentioned yesterday are fixed:

  • S3 sleep works again after applying this patch from Hugh Dickins. I don’t get video or ethernet when I come back, but that’s taken care of by unloading my ethernet driver beforehand, and by killing/restarting X on resume. I should see if using vbetool differently (restorestate, perhaps) helps with that.

  • A CVS commit to lvm claims to fix the problem I had, and the new package is in the buildqueue.

  • Nothing new on my pccardctl eject oops. I’m going to try and git bisect this over the weekend — it’s a nice candidate for bisection, since it was working as recently as 2.6.16 and it’s not clear whether this is a locking problem (the PCMCIA code moved from semaphores to mutexes, but the patch looks sensible) or a netdev problem.