Archive for the 'Uncategorized' Category
Is cairo indeed that slow?

I found the following comparison:

http://www.xaraxtreme.org/about-performance.html

This makes having doubts about the performance of cairo on babelview…

Ubuntu fast boot

Really amazed about the fast boot speed of the new Ubuntu release, under 10 seconds on older 2.6 Ghz Pentium. I assume that some heavy work was done to start boot scripts in parallel…

short life linux, please

Standards in IT are like the promises in the bible, that your next life will be in heaven. Most people believe that they exist, as they do not go beyond some basic system call names like write/open, etc., and they continue to believe in life in heaven. I am already sick with all these preaches about standards that always failed. In case of linux things are even worst. As most of other unices are dying out, linux is practically the main reference point. Linux took it however in an even worst direction. They say they would keep compatibility blah blah. The same time is lot of chaos, but the more the chaos is growing the less chance is given for new ideas.

What is my problem at the moment. Well, I wanted to use already for longer in different situations the power of MMU to do different tricks. Finally I had to draw the conclusion that it is impossible on Linux. It is simply impossible, as Linux obscures part of the pattern. Today I was thinking to write a very little program to test different random memory layouts inside a linux process in different contexts, based on different sequences of mmap and brk calls. The idea was to “scan” the memory by trying to write to it. You set up a signal handler to sigsegv, and then if you try to write to an inexistent page, then the MMU will trigger an interrupt, the kernel will try to recover the page from swap, if it is the case, and then calls a signal handler. What went wrong in my experiment? After the signal handler did it’s job, the kernel is restoring the stack and the state of the registers, and will continue the process where it was stopped before the “bad” instruction was executed. The problem is that the instruction pointer does not advance so again the same sick instruction is called.
So, what is missing? Well, simply a piece of glue that the kernel should call after it has restored the state of the stack and registers, so that the “victim” process can safely jump over the “bad” instruction and handle it in some way.

Well, my little experiment is impossible, unless I will try to unwind the stack, find the position of the wrong instruction, and help it to run, run.. :)

Well, how is this related this to my frustration? Simply, if something like “post signal handler” would would be proposed to the key linux kernel developers it would be rejected as many many (other :) ) brilliant ideas I saw being lost… As the motto is industry ueber alles! In a better world, system calls would be able to cope with some primitive userspace closures, etc. etc. Well… nonsense to waste time to develop the idea

Radare, you are cool, but sometimes fallback to hexdump

Discovered already months ago radare, same learning curve as with vim… for sure would not recommend to the 90% of the people working in It, but only for the 10%. If you hate vi, you will hate radare, if you love vi, you will even love more radare.

Did you ever think to print only text from a binary….

hexdump -v -e ‘80/1 “%_p” “\n”‘ /bin/ls.

or to see text in the physical memory (need admin rights, take care!)

hexdump -v -e ‘80/1 “%_p” “\n”‘ /dev/mem

the /dev/kmem argument… really made me laughing

read here: http://lwn.net/Articles/147901. It is about /dev/kmem . Something that was on my linux systems for ages… And I wanted to have a look inside it… and the big disappointment came… And the I found the article.. And found all that bunch of incompetents, who argue about writing any piece of software is crazy as rootkits and other mall-wares might exploit it. …

The C virtual machine

Yes, indeed when I was first thinking about sthg. like that few years ago and mentioned to a friend, he told me I am mad. And this obsession now came back…

What does a C virtual machine need? It needs a C code translator, and a sandbox environment where to run the translated code securely.

And how can you have a secure (for the host) sandbox environment? There are two solutions:

* any ptrace based solution (like umview)
* or the mysterious system call prctl system call

And it seems that the “I want to do everything” company is already hungry to promote there “my browser is everywhere”, but having it running fast and reliable with all kind of foreign plugins.

I love this idea, and I wish java will die out one day. Sun’s days are over, oracle will kill it anyway :)

see also:
* http://lwn.net/Articles/332990/
* http://lwn.net/Articles/332974
* http://code.google.com/p/seccompsandbox/wiki/overview
* http://www.kernel.org/doc/man-pages/online/pages/man2/prctl.2.html
* http://www.stanford.edu/~talg/papers/traps/abstract.html
* http://code.google.com/p/chromium/wiki/LinuxSandboxing
* http://nativeclient.googlecode.com/svn/trunk/src/native_client/documentation/npapi.html
* http://en.wikipedia.org/wiki/AppArmor
* http://en.wikipedia.org/wiki/Security-Enhanced_Linux

git fun

Found two interesting projects related to git:

http://github.com/apenwarr/git-subtree (git subtree)

http://apenwarr.ca/log/?m=201001#04 (backup with git)

I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting

supercat the super tool

I think nobody doubts that watching a colorized text file helps finding information a lot. I was using vim for that purpose, but often opening huge files is not very productive. I am using sometimes http://supercat.nosredna.net/, however I am always dissapointed that I do not file syntax config files for all output types. For example, often I examine the ouput of strace, but I never had time to write a config file for it nor I found any on internet, so … wait to load it in vim…

voip on windows mobile

this is for now an incomplete post. By looking for net VOIP software for windows XP, I found new ones for windows mobile. I am listing them so that I do not loose the links