Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On the Wikipedia page for Linus Torvalds, it is stated:

The Linux kernel's reboot system call accepts their dates of birth (written in hexadecimal) as magic values.

The documentation for the Linux reboot() function shows that it needs two magic numbers, magic and magic2 to reboot.

A Google search reveals plenty of info about the magic numbers, but not specifically what their purpose is, and why the function needs to be passed these values in order to operate.

I'm really having a hard time trying to work this out. It seems to me that the magic values are just passed for the sake of it.

Any information is appreciated...

share|improve this question
up vote 5 down vote accepted

The magic numbers are so that a memory error that flips bits in the system call number which results in the reboot system call's number won't reboot the machine unless the memory error also happens to change the arguments to the magic numbers.

Although I have no evidence to provide, I think that the previous explanation is plausible if not true.

share|improve this answer
That seems to make sense, I understand better now, Thanks. – jambolina Sep 5 '13 at 17:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .