Page 1 of 1
mnemonic pointers
Posted: Fri Feb 20, 2009 12:09 pm
by yemista
In the higher half kernel wiki page, they show some mnemonic pointers, such as 0xcafebabe, 0xdeadbeef, and 0xdeadc0de. I was just wondering if anyone knew of any other ones?
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 12:11 pm
by JohnnyTheDon
0xC0FFEE
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 12:17 pm
by AJ
Hi,
One I use in my project (Caracal) quite a bit: 0xCA8ACA1 - I understand this may be of limited use to anyone else
Don't forget the multibot ones, based around 0x..BADB00.. . I'm sure there must be loads of others about.
Cheers,
Adam
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 12:47 pm
by Troy Martin
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 6:59 pm
by AndrewAPrice
0xBAB1ED00
(Baby doo)
Google returns nothing - I invented this magic number!
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 7:28 pm
by steveklabnik
I was poking around Wikipedia the other day, and found out that Java uses 0xCAFEBABE for .class files...
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 9:44 pm
by Firestryke31
Socks uses 0x464F5800 (on disk) as it's executable signature. I wanted something better for validation than just a plain binary but still simple to handle, so a simple 'cmp dword [bx], 0x00584F46 / jne .cleanup' fit the bill perfectly.
That's the null-terminated ASCII string "FOX" for those who are too lazy to convert it.
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 10:28 pm
by Troy Martin
A Dr. Seuss fan, are we, Firestryke?
I use 0xBADC0FFEE0DDF00D to fill up AX:BX:CX:DX after a register dump is made and the system is halted when TBOS crashes.
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 11:03 pm
by Firestryke31
Another magic number that I have yet to use is 0x467572727946756E because I haven't yet needed a 64-bit magic number, though I did split it and use it as the sentinel values for my memory allocation structure before I stopped working on that project in favor of Socks. I like it, but when it comes to technical definitions it isn't a very good one due to being an even non-negative number without a recognizable bit pattern (unless you view the ASCII translation).
I've also come up with 0xB007 (BOOT) and 0xFB05 (FBOS, for Firebird OS) which are better magic numbers, but 16-bit because Firebird was originally meant to be for the TI-83+.
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 11:06 pm
by Troy Martin
Firestryke31 wrote:0x467572727946756E
That's just a little disturbing.
Re: mnemonic pointers
Posted: Fri Feb 20, 2009 11:10 pm
by Firestryke31
And why is that?
Re: mnemonic pointers
Posted: Sat Feb 21, 2009 10:11 am
by xyzzy
Although its a short one, an older version of my kernel used 0xEF as its system call interrupt number - stands for "Exclaim FTW!"
. I also use this for other magic numbers - for example, I use a special ELF auxilary vector type, 0xEFEF0001, to pass the address of the kernel-provided system call library to userspace apps.
Re: mnemonic pointers
Posted: Sat Feb 21, 2009 10:16 am
by Troy Martin
I used to use 0x534F4254 (little endian, so stored in a NASM dd) to signify TBOS programs in the pre-release of 0.5.0 before I decided to stick with a flat binary. I plan to crash TBOS32 with something funny in a 128-bit way
Re: mnemonic pointers
Posted: Sat Feb 21, 2009 1:02 pm
by Firestryke31
Another signature I used once or twice was 0x31415926 because while it isn't supposed to be ASCII it can still be typed using the keyboard ("1AY&").
Re: mnemonic pointers
Posted: Sat Feb 21, 2009 5:29 pm
by JamesM
0xDEADBABA is my favourite. From an ex maths teacher who liked dead baby jokes, and who would answer multiple-choice question papers with that order of answers (from A - D) to see how he scored.