Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 3 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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.