From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 2/4] x86&x86-64 support for sys_indirect
Date: Thu, 15 Nov 2007 09:02:02 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.0.9999.0711150852470.2786@woody.linux-foundation.org> (raw)
In-Reply-To: <200711151641.lAFGfMow024336@devserv.devel.redhat.com>
[ 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
prev parent reply other threads:[~2007-11-15 17:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 16:41 Ulrich Drepper
2007-11-15 17:02 ` Linus Torvalds [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.0.9999.0711150852470.2786@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®