Recent blog entries for mathieu

3 Apr 2005 »

I _hate_ that fucking MR814v2 router.

26 Mar 2005 »

I hate dealing with my hardware. This always feels like a complete waste of time to me. Today, after a few weeks of suffering from the lack of responsiveness of my 802.11b router (a netgear MR814v2), I got bored and looked into it.

The bottomline is that it looks like this crappy router tries to be too smart for me: it performs correctly the PPPoE connection with my ISP, gets an IP address, a set of DNS servers and a gateway IP. However, when it serves DHCP OFFER replies to my LAN machines, it replaces the DNS servers' IPs with its own IP to make sure that all DNS traffic goes through it. The bad thing about this is that it seems that this DNS server running on the router is completely flakey: it replies less than once out of 10 to my DNS requests...

If you know a way to either make this stupid hardware not be a DNS server or to get a replacement device for free (preferably, another model/brand), let me know :)

23 Mar 2005 »

I finally was able to release my profiler/dwarf2 reader code. If you are interested, feel free to download and play with this GPLed software.

1 Mar 2005 »

I have what I believe is an interesting problem: I have a function which calculates something which is really costly. I would like to add a cache to it. The input is a single 64 bit integer and the output is also a single 64 bit integer. Ideally, I would allocate the cache on the stack before calling the function and it would be really small because the number of really widely used entries is really small (maybe 10 to 30).

There are many solutions to this problem (all sorts of hash tables, etc.) but I have the feeling that my interest is to make sure that the really hot entries are always in the cache so I am interested in finding a good algorithm to decide what entry gets into the cache and what entries get removed from it while minimizing the size of the cache. Obviously, there is a large design space here with lots of compromises to be made (speed, accuracy of the cache with regard to hotness and cache size) but I wonder whether there exist a clear winning technique to do this.

7 Feb 2005 »

I just cannot cope with the fact that I have to deal with ns2. This really is driving me crazy. Not only is this code absolutely horrible (large classes such cmu-trace.cc are nests of switch/if statements which should be moved in various methods over the objects upon which they act, etc.) but the one release a year does not build out of the box and cannot possibly build out of the box. This gives me the feeling no one cares enough to perform at least a single sandboxed build before releasing the code.

And I am required to write beautiful/good code in this fugly incredibly horrible framework and I can do nothing to fix the framework. Frustration is driving me nuts.

17 Jan 2005 »

Woow. It had been a long time since I had not had the opportunity of discovering such a un-friendly mailing list... (libc-alpha for those who care). The webpage which points to the 4 glibc mailing lists does not describe what they cover so the I picked one based on its name and sent two (err, no, three) emails on different things I was trying to figure out while using/building glibc. I must say that the answers I did get were rather unfriendly and unhelpful. Reading my emails again, I fail to see anything really horribly rude in them to deserve such answers (other than not posting my question on a more apropriate forum to which no one could point me). I feel empathy with the newcomers to linux development who face such "HaXXor eleeete" reactions on some mailing lists.

Weird.

6 Jan 2005 »

Accessing the processor debugging registers at first seemed easy: all I had to do was to use ptrace (PTRACE_{PEEK|POKE}USR,...) and /usr/include/sys/user.h. Well, this is true but ptrace cannot be used to peek and poke at yourself. It can be used only if you are the parent of a ptraced child process and only on the child process. So, I got back to reading the kernel source to find a way to circumvent all these security checks. How sad. Me, being a cracker just because I can't do some very reasonable things...

The funny thing is that writing in my own memory-mapped executable image seems to be as hard as accessing the debugging registers. Yes, I thought I could get away from the hard stuff by writing a good old "int3" where I wanted my breakpoints to be but the only way I seem to be allowed to do this is by using ptrace, and, as explained above, ptrace cannot be used on oneself. *sigh*. So much fun...

6 Jan 2005 »

Well, I have always been really interested in low-level system stuff and, specifically, development tools: debuggers, compilers. Recently, having a bit of free time to waste, I started hacking a small debugger. I must say that such projects are always extremely fun because they involve so many different layers of the system and require so much knowledge about arcane parts of the system.

So far, I have written a small elf32 parser which can perform symbol lookups on memory-mapped binary files. I also managed to figure out how to parse the in-memory loader link map. The thread_db library has managed to stay partly a mistery to me: it is not clear exactly what it is supposed to do and why the gdb/nptl developers decided to stick with this ugly interface.

I have yet to interface with ptrace and find a way to access the processor debugging registers. The latter seems to be a bit more complicated since these registers should be accessible only from ring 0 so, I need to figure out how to ask the kernel to do that for me. If you are a kernel developer and if you are reading this, please, tell me why on earth there is no alternative to the fugly ptrace. That thing is, well, really fugly.

23 Dec 2004 (updated 5 Jan 2005 at 16:10 UTC) »

I am really stupid or really unlucky. Although my laptop's video card is fully supported with the latest xorg (i.e., you can get it to display 24bpp graphics with the highest resolution possible on the lcd), it is really really slow and it looks like no documentation is freely available from the manufacturer (XGI) so I will probably be unable to try to fix it... Such is life.

15 Dec 2004 »

Whenever I have to work on or to fix windows machines (mostly, sysadmin for friend's computers), I get really depressed. These computers seem to have a life of their own and refuse to obey me, whatever I do.

Lately, I have been trying to bring back to life a win2k laptop which happens not to be able to browse the internet with any kind of browser (both firefox and ie) although a network connection is alive and working. Typically, I can ping whoever I want, I can http to other servers on my lan but as soon as I get out of the lan, http stops working. It looks like I get half pages and none of my attempts to figure out what is going one succeeded. I am currently going through the painstainking process of removing the win2k security patches one by one but that is a bit... hrm... an unfriendly process.

Any idea on what might be wrong on that machine or how to fit it are welcome :/

352 older entries...

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!