[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.9999.0711150852470.2786@woody.linux-foundation.org>
Date: Thu, 15 Nov 2007 09:02:02 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ulrich Drepper <drepper@...hat.com>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 2/4] x86&x86-64 support for sys_indirect
[ Ingo, Thomas - see the whole series on linux-kernel ]
On Thu, 15 Nov 2007, Ulrich Drepper wrote:
>
> This part adds support for sys_indirect on x86 and x86-64.
The thing is, not all system calls can do this.
Some system calls are magic, and don't just take the arguments in
registers: they also care about the actual stack pointer and the whole
pt_regs struct when returning to user mode.
So this does need more infrastructure: some way of marking which system
calls cannot be executed indirectly.
The magic system calls are things like:
- sys_iopl() - this one changes the eflags value restored on iret
- execve/clone/vfork() - need direct access to pt_regs
- vm86() - does magic with the stack, cares about pt_regs
- sigreturn - magic pt_regs accesses again
and there may be others I have forgotten about.
Calling these system calls from C code will just corrupt the kernel stack,
and is a big big no-no.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists