Why set ORIG_EAX(%esp) to -1 in arch/i386/kernel/entry.S:error_code?
There doesn't seem much point; nothing seems to use it on the trap-handling paths. Is it a historical left-over?
J
Quoted 3 lines · Jeremy Fitzhardinge
There doesn't seem much point; nothing seems to use it on the trap-handling paths. Is it a historical left-over?
No. It's important that ORIG_EAX be set to some value that is _not_ a valid system call number, so that the system call restart logic (see the signal handling code) doesn't trigger.
Linus
Quoted 2 lines · Linus Torvalds
No. It's important that
ORIG_EAXbe set to some value that is _not_ a valid system call number, so that the system call restart logic (see the signal handling code) doesn't trigger.
Ah, yes, I see. I'll add a comment in my i386-pda patch to entry.S.
J