Re: Don't save registers during system calls

H. Peter Anvin (hpa@transmeta.com)
Fri, 17 Apr 1998 12:38:32 -0700 (PDT)


> > There ya go :)
> >
> > The one thing to remember is to zero (or otherwise trash with known to
> > be zero-information data) the temp registers before returning, or
> > you'll have a peephole into the kernel.
>
> I was thinking about that and didn't consider that necessary. I don't
> think we ever have the case that somebody get's an other processe's data
> returned from the kernel or any other kind of sensitive data. But I
> haven't really researched that.

The kernel does contain data that is potentially sensitive, though.

> Actually, If I remember right only systems certified to be class B are
> required to burn data in registers.

A, B or C; I wouldn't trust it.

> Hm... garbeling all callee-saved registers is easy, one just needs to
> optimize the rest of the syscall return path to waste as many registers
> as possible. That's not zero, but hey, who cares if the user knows that
> this syscall just called do_signal or similar?

The rule is: the user shouldn't be able to figure out anything they
wouldn't have been able to find out anyway.

-hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu