My thoughts about Synergy

Posted by Diego "Flameeyes" Pettenò Thu, 28 Feb 2008 02:18:00 GMT

I was suggested more than once lately, especially after my posts with multiseat, to try out Synergy. Well, I did :)

It’s quite an interesting program, and it actually saves me from having to use two mouse at once every time. Too bad I needed a mouse anyway to get the second seat, or I would have saved quite some money, too.

There are a few problems with it, though, for instance the server crashes from time to time, stopping access from the clients.

It’s unfortunate that the project development has slowed down, as it would be quite an interesting thing. Having better support for OSX for instance would be nice, as it is, part of my keyboard does not work on the laptop because there are keys that are NOT on the laptop.

One way to achieve better integration would be, I suppose, to make it act as an input driver on OSX. Using the same protocol, but rather than having a daemon, having an input driver that “installs” its own keyboard and mouse. It would probably then allow to use as many keys as the server has.

A similar piece of software could be done under X11: an Xorg driver that handles the input as a virtual event. With such a software I could easily get rid of the keyboard and mouse that I reserved for the extra seat and leave it as a virtual device.

If only Xorg would be more easily shared between instances (less use of .data.rel for instance) it would be quite interesting to use the monitors with three separate instances; this way it would handle dpms differently on a per-monitor basis, and shut down the extra monitors when not needed; as it is unless I do it on my own, the monitor at my left is always on, as it’s handled by the same session as the central one.

Well, if anybody wants to start working on it, it would be appreciated :)

Posted in  | Tags , , , ,  | 1 comment

Dear lazyweb, I need a gnuplot expert

Posted by Diego "Flameeyes" Pettenò Wed, 27 Feb 2008 00:41:00 GMT

And I end up asking again for help to whoever is around, this time I’m looking for a gnuplot expert :)

As solar suggested, I wanted to prepare a few graphs to show the changes with visibility, with fixing COW pages, and so on. While performance analysis through benchmark would probably be a good idea too, I wanted to start with something easier, maybe less interesting, but that would help me tackling down the issues to get better visual impact. This way the more important stuff will not just look like crap and be dismissed ;)

For now I’ve modified my parser for LD_DEBUG=bindings output to generate data that could be represented visually by gnuplot. Or at least I hope I’ll be able to make it be represented visually by gnuplot.

I’d like to have some clustered and row-stacked histograms; it would divide all the objects in a particular program (shared objects) in clusters of histograms, each containing N histograms for N runs to compare (no visibility, hidden/default visibility, hidden/protected visibility), then each histogram would have its height split in three (outgoing bindings, incoming bindings, self-fulfilled bindings), to show the changes in those.

Unfortunately, what I have up to now shows the graphics just fine, but the labels for the various objects are unreadable. If you want to get the package of the data and script here

If somebody can help me to get these data graphed in a decent way… that would be very helpful :)

Posted in ,  | Tags , , , ,  | 4 comments

Donating to better causes...

Posted by Diego "Flameeyes" Pettenò Tue, 26 Feb 2008 03:17:00 GMT

Most of my long-time readers will remember what happened last summer. I was hospitalized for 42 days because of an acute pancreatitis with hemorrhagic necrosis. I risked my life during that time, not only because of the pancreatitis, but also because of pulmonary complications and HIT syndrome. The worse thing, though, was the original reason for the hospitalization: the pancreatitis.

I didn’t consume alcohol even before this event; I didn’t and don’t smoke, I didn’t consume lots of fat foods (and now I almost don’t eat fat at all). The causes of my pancreatitis are still unknown.

It’s not something I like to think of. Even though I was so much lucky to come out of the hospital alive, and not even diabetic, I’m always afraid. During those 42 days, my whole life changed, starting from my point of view. I used to save money for the future, now I don’t. I have difficulties to save money for next month, and that is not really good as I don’t have a regular job, but just temporary jobs that gives me money for a little time and then leave me dry for a while.

But saving means thinking of the future, and a future I sometimes wonder if I ever could see. I wish to see it though. I started making plans again for the future. I want to get over my fear of planes this year, someway; the usual suggestions of being drunk or smoked can’t be used anymore, but something I want to do. I want to be there next FOSDEM. I want to be there at more conferences. I want to at least try to have a talk at those.

Before you think I’m begging for money, I want to stop you. While I certainly appreciate all the people who donated to me, and who would like to continue doing so, I think that has a smaller meaning than it used to, maybe than it should, being as it is that I could use some help during the months I’m not working.

This is what I just put in my blog’s sidebar, replacing the previous “Help needed” entry:

Still thanking all the people who helped me with donations for the new disks for Enterprise and generic maintenance costs, I decided to change direction with respect to donations.

While I still accept gifts from my Amazon wishlist, I’d rather suggest, to anybody who wants to help me to instead donate to the National (USA) Pancreas Foundation.

If you want to let me know, use the in Honor donation option, and use this address: Diego Pettenò – Via Scaramuzza, 125 – 30174 Mestre, VE – Italy.

I’m asking this because after my hospitalisation I see little point in saving money for the future, and research into Pancreatic diseases is more likely to make me good.

Thanks in advance to everybody wanting to contribute.

I’m actually not sure if I can benefit directly from research of the NPF, as it’s an American organisation, but I’m optimistic in them sharing information and research with the rest of the world, Italy included. I haven’t been able to find a similar foundation in Italy, otherwise I would have pointed to that.

I actually need to find one, as when I file my tax papers next year for this one I want to donate the 5‰ to pancreas research (this is how much the Italian laws allow me to donate off my tax payment to scientific research; the silly thing is that I could donate 8‰ to religious organisations…); when I’ll do that I’ll probably add that to an alternative. My american readers will most likely prefer the 501©(3) option.

I know it sounds cheesy, but that experience really changed me, and not only in good ways. I’m now quite aware of my mortality, and that makes me fear to lose everything at once. I’m now more interested in leaving a trail, as I might not live long enough leave children.

So if you want to thank me for my (mediocre) job as a developer, this is probably the best way. Please remember that especially if something happens to me…

Posted in  | Tags , , , , ,  | 2 comments

LED lights photos

Posted by Diego "Flameeyes" Pettenò Mon, 25 Feb 2008 23:51:00 GMT

dscn0600

I didn’t blog more about them when I received them because I didn’t want to suggest to a friend of mine what I did get him for his birthday ;) I also wanted to make a long post explaining the difference in usage patterns between compact fluorescent lights and LED lights, but it’s late, and I’m actually working on quite a few other stuff at once, so for now I’ll just link this photoset where I’ve described a bit my LED lights :)

And to leave you with a link for today, I think this podcast from RTÉ looks quite interesting :) I’ve downloaded a few episodes but only listened to latest for now, I’ll have something to listen to tonight :)

Posted in  | Tags , , , ,  | no comments

Should only libraries be concerned about PIC?

Posted by Diego "Flameeyes" Pettenò Sun, 24 Feb 2008 21:14:00 GMT

Position Independent Code is a technique used to create executable code that, as the name implies, is independent from the starting address where it is loaded (the position). This means that the pointers to data and functions in the code, as well as in the default value of pointers cannot be assumed to be always the same as the ones set after the build process in the executable file (or the library).

What this means in practical terms is that, as you can’t be sure how many and which libraries a program might load at runtime, libraries are usually loaded at dynamically-assigned addresses, thus the code need not to statically use one value as base address. When a shared library is loaded with a static base address (thus not using PIC), it has to be relocated by the runtime loader, and that causes changes to the .text section, which breaks the assumption that sections should be either writable or executable, but not both at the same time.

When using PIC, instead, the access to symbols (data and functions) is maintained by a global offset table (GOT), so the code does not need to be relocated, only the GOT and the pointers stored in the data sections. As you can guess, this kind of indirect access takes more time than the direct access that non-PIC code uses, and this is why a lot of people hate the use of PIC in x86 systems (on the other hand, shared libraries not using PIC not only breaks the security assumption noted above, making it impossible to use mitigation technologies like NX – PaX in Linux, W^X in OpenBSD – it also increase the memory usage of software as all the .text sections containing code will need to be relocated and thus duplicated by the copy-on-write).

Using hidden visibility is possible to reduce the performance hit caused by GOT access, by using PC-relative addressing (relative to the position on the file), if the architecture supports them of course. It does not save much for what concerns pointers in the data sections, as they will still need relocations. This is what causes arrays of strings to be written in .data.rel.ro sections rather than .rodata sections: the former gets relocated, the latter doesn’t, so is always shared.

So this covers shared libraries, right? Copy-on-write on shared libraries are bad, shared-libraries use PIC, pointers in data section on PIC code cause copy-on-write. But does it stop with shared libraries?

One often useful security mitigation factor is random base address choice for executables: instead of loading the code always at the same address, it is randomised between different executions. This is useful because an attacker can’t just start guessing at which address the program will be loaded. But applying this technique to non-PIC code will cause relocations in the .text section, which in turn will break another security mitigation technique, so is not really a good idea.

Introducing PIE (Position Independent Executable).

PIE is not really anything new: it only means that even executables are built with PIC enabled. This means that while arrays of pointer to characters are often considered fine for executables, and are written to .rodata (if properly declared) for non-PIC code, the problem with them reappears when using PIE.

It’s not much of a concern usually because the people using PIE are usually concerned with security more than performance (after all it is slower than using non-PIC code), but I think it’s important for software correctness to actually start considering that an issue too.

Under this light, not only it is important to replace pointers to characters with characters array (and similar), but hiding the symbols for executables become even more important to reduce the hit caused by PIC.

I’m actually tempted to waste some performance in my next box and start using PIE all over just to find this kind of problems more easily… yeah I’m masochist.

Posted in ,  | Tags , , , , , ,  | 8 comments

About my previous post

Posted by Diego "Flameeyes" Pettenò Sun, 24 Feb 2008 02:08:00 GMT

Before you think my blog got cracked, or I am raving mad, my last post was related to a game of Taboo played with a friend of mine (MKI).

The word he had to guess was “Password” (the word was in English; most of the English word we got, it was quite funny when he got to make me guess “Bug” as we’re both computer scientists), so my hint was “To access private data; your user has one”. He was NOT able to guess it -_-; As I said, he is a computer scientist!

Posted in  | Tags , , , ,  | 3 comments

Ce l'ha il tuo utente

Posted by Diego "Flameeyes" Pettenò Sun, 24 Feb 2008 01:09:00 GMT

password

password

password dannatamente password. MKI è password la parola!!!!

Posted in  | Tags , ,  | no comments

Dual seat need development

Posted by Diego "Flameeyes" Pettenò Sat, 23 Feb 2008 13:00:00 GMT

So yesterday I started fiddling with bringing up a dual seat system. It’s not really bad as it is, it’s actually quite interesting to have it working. I’ve also been suggested to try Synergy, which could solve also the need for two keyboards, bringing a similar effect than xinerama even if ran with more than one X instances, and I probably will try it out in the next weeks.

I’ve been thinking a lot about dual seat lately. With today’s CPU power, with multicore systems, and high memory, most users are going to waste CPU power. Beside the users of Vista that need a last-model system just to make the desktop appear, graphic artists, developers and gamers use their CPU power. Most home and office users have a false need for more powerful boxes: browsing the web, writing letters, downloading photos from a camera are all tasks that require very little CPU power and not so much memory.

Think for instance of a family with two kids, both of which want their own computer: why not setting up a single computer with two seats? Then both kids can do what they want with the computer (or almost) with just one more monitor, keyboard and mouse, which is a limited cost compared to a whole new computer. Now of course doing this with Windows is quite… impossible, I suppose, so the kids will have to use Linux, but that’s not the point anyway, right?

Another place where this could certainly be useful is schools. I didn’t know it, but reading the Wikipedia article on Multi-seat, this is actually being used in Paraná. This is quite an interesting fact, especially for people like me who are concerned with the waste of money in the educational system, like I wrote (in Italian) yesterday .

Education is not free, there is a cost tied to that, but education is what can improve society. Better education helps people on the long run, if it’s proper. In Italy for instance I have a lot of reserves over the working state of universities, especially after seeing the mess I actually tried to get into myself.

Computers can improve the quality of education, but they don’t come free; even when they seem to come free as they are provided by a manufacturer, they have a cost behind them. Free Software can cut the cost on software (license-wise), but it can’t cut the cost of hardware up to a certain point (you can avoid the requirement for newer systems that Vista puts on everybody), alone. Multiseat can cut this cost as you can easily have four students working with a single computer. Even in a computer science class like I had in my high school, the power of the computers could easily divided in four without any problem with the users.

Unfortunately multiseat is not yet easy to handle in modern Linux systems. While it’s certainly possible, and thanks to modern hardware like multi-head videocards and USB keyboards and mouse there is no need for strange hardware anymore, the software support for multiseat seems to me quite lacking.

The only way I could get it to work on my system was to use evdev for the keyboards. But latest release of evdev didn’t like me to tell it to use a Device, nor it liked the use of Phys. I had to take the latest GIT version, and that worked, but still required me not to change the order of connection of the keyboards and mice. Also it’s quite an incomplete support what we have now, for instance I can’t get F13 to F19 to work on evdev without using xmodmap.

Input hotplug is a pretty nice need for modern desktops, but it will be pointless or even broken for multi-seat arrangements. I’m afraid of what might happen when Xorg will relay on that.

But even without going into Xorg itself, there is need for better support for multiseat in software, by for instance understanding that even if there is usually just one instance of a software per-user, there might be more than one user on the system logged in at once, and so it makes sense to be able to share as many pages as possible by using properly .rodata and similar.

I think it would be nice if there was a more focused look into this kind of possibilities in the Free Software communities. For instance it would be nice to provide better tools to developers to even test multiseat without having to create one in true hardware. Sun: you bought InnoTek and are now taking care of VirtualBox. Give us a properly-working virtualised environment with two or more video cards, so that developers can actually test their code on multiseat, that might be good for your karma too :)

I think I’m already working toward this goal myself, even if I didn’t understand that before. My work toward reducing Copy-on-Write pages will make better use of memory in multiseat environments, and I’ll continue with it for a long time.

I’ve seen there are similar work in progress for improving support to multiple video cards. It’s also a piece of the puzzle. Making better use of disk space is also an important task. Even if the cost of disk space is falling down, employing it in the right way will reduce the cost on education, too.

Don’t ask me how I started being so concerned with education, probably it depends on the fact I see a lot of bad things happening that could be solved even just with a bit more knowledge of how processes work…

Posted in  | Tags , , ,  | 5 comments

L'Italia dei piccoli sprechi

Posted by Diego "Flameeyes" Pettenò Fri, 22 Feb 2008 17:19:00 GMT

Sorry for another post in Italian; it’s not really anything important, but this time I’ll see to summarise it in a different post in English too.

Di sicuro tutti i miei compatrioti italiani conoscono bene quanto l’Italia riesca a sprecare soldi, nel grande e nel piccolo. Né destra né sinistra paiono intenzionate a risolvere i grandi sprechi, ma contro i piccoli sprechi si può almeno tentare di alzare un po’ di polvere, sperando che qualcuno si decida a spolverare.

La scorsa settimana, per esempio, ho ricevuto una lettera, il cui mittente era la mia vecchia scuola superiore, l’Istituto Tecnico Industriale Statale C. Zuccante di Mestre (Venezia). Interessante, quando l’ho vista speravo fosse qualche informazione su concorsi o similari, che un lavoro là poteva anche interessarmi.

Caro ex- studente dell’I.T.I.S. «Zuccante»,
abbiamo recuperato il tuo nominativo nell’archivio della scuola.

Okay, non è una proposta di lavoro, è sicuramente una lettera automatica. I sospetti sono confermati dal “Ref 1503/1811” in alto a destra dell’indirizzo destinatario, che fa tanto elaborazione dati.

Come forse saprai dal 2002 sono stati autorizzati nel nostro istituto due corsi serali per giovani adulti, uno per l’indirizzo Informatico e un altro per quello Elettronica-Telecomunicazioni.

Lo sapevo perché nel 2002 ero ancora a scuola…

[…] Nel caso tu non abbia conseguito alcun diploma di scuola media superiore questa può essere l’occasione per riprendere gli studi interrotti e portare a maturazione la carriera scolastica,

E qui mi cade la mascella. Io mi sono diplomato, nel 2004, con 97/100 di valutazione all’esame di stato. In questo istituto. A parte il cominciare a domandarmi se questo diploma non abbia la stessa validità di una copertina di Command&Conquer, vorrei capire chi si è occupato d questa spedizione.

Non ci sono dubbi che si tratta di un mailmerge partendo dargli archivi della scuola, come fanno notare loro stessi. E com’è che non han verificato se la gente di cui stavano tirando fuori i nominativi si fosse diplomata, prima?

Non mi pare di chiedere troppo, visto che si trata di un ITIS a indirizzo informatico. Sicuramente non sono stati i professori o i tecnici dell’istituto a preparare il mailmerge, ma.. almeno controllare quello che venisse fatto?

Non si tratta di un errore isolato come un ottimista potrebe pensare, ho confermato che altri tre miei compagni di classe (con cui sono ancora in contatto) hanno ricevuto la lettera, quindi è stata spedita ad occhi chiusi. Non so quante lettere siano state spedite, ma supporrei si possano aggirare intorno alle 300/400. Fogli, più stampa, più buste, più spedizione. Okay, non si tratta di cifre enormi, ma si tratta di spese inutili, e di sprechi ambientali anche (la carta per i fogli e per le buste). E tutto questo si poteva risparmiare con cinque minuti in più a pensare a cosa fare.

Sto sinceramente pensando di scrivere al preside (o meglio, al Dirigente Scolastico, come riporta la “firma” della lettera), per informarlo di questo spreco, solo che si tratterebbe di un ulteriore spreco inviarlo via lettera, e ricordo che questo preside non sia molto preparato ad usare la posta elettronica…

Posted in  | Tags , , , , ,  | 2 comments

LIT conversion

Posted by Diego "Flameeyes" Pettenò Fri, 22 Feb 2008 15:58:00 GMT

From time to time, I end up having to convert .lit files (Microsoft Reader) into a different format, not to read them on my Sony Reader, but simply to display them on screen. The actual reason for this is that my mother finds stuff she likes in .lit format, and of course as I couldn’t find any decent GUI, in Italian, to convert them directly on OSX, I have to deal with them.

The package I use to do this conversion is app-text/convertlit (luckily Usata didn’t use the “clit” name that the zip file with the sources use).

What is the problem then? Well the problem is that the package has quite some problems. Upstream does not seem to be very alive, and the major of the work was done by the openclit library that I couldn’t find anywhere anymore.

The code could certainly use some cleanup: it uses libtommath, nothing bad in that, but it’s the only package in my whole system using it, and feels like a bit of a waste, considering it’s used for DRM’d lit files, which I never have to deal with. Having it optionally use gmp (which I think is quite more common on modern systems, considering gcc depends on it in 4.3 series) would be intriguing.

Also, it currently implements DES decryption and SHA1 checksumming… again, it’s wasteful to re-implement what is already available in common libraries.

If anybody has free time to work on this it would probably be a nice project to help people going away from proprietary software. I’m around if you need some help with autotools…

Posted in ,  | Tags , , , , ,  | no comments

Older posts: 1 2 3 4