From: Ingo Molnar <mingo@elte.hu>
To: Andrew Lutomirski <luto@mit.edu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
x86@kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [GIT pull] x86 vdso updates
Date: Sat, 28 May 2011 17:35:36 +0200 [thread overview]
Message-ID: <20110528153536.GB27104@elte.hu> (raw)
In-Reply-To: <BANLkTikKAx=KXZuECAXaskhZOre-2ZHutw@mail.gmail.com>
* Andrew Lutomirski <luto@mit.edu> wrote:
> On Fri, May 27, 2011 at 7:36 AM, Andrew Lutomirski <luto@mit.edu> wrote:
> > 3. Add int 0xcc and use it from vgettimeofday. It will SIGSEGV if
> > called from a user address (so it has no risk of ever becoming ABI)
> > and it will do gettimeofday if called from the right address. (I like
> > 0xcc better than 0x81 because then I don't have to wonder whether any
> > syscall-like instructions start with 0x81.) I'm not convinced that
> > the existing syscall entries are usable, because syscall itself has a
> > different calling convention and int 0x80 is a compat syscall.
> >
>
> I started looking at what needs to be done and I wanted to get your
> opinion before I wrote a bunch of code that you'd reject. Here are
> three ideas for how the int 0xcc / int 0x81 entry could work:
>
> *** Idea 1 ***
>
> Make it a real syscall but with extra constraints. It would have the
> same calling convention as the syscall instruction, but it would turn
> into SIGKILL if the calling address isn't in the VSYSCALL page or if
> the syscall number isn't __NR_clock_gettimeofday. It would BUG() if
> called from kernel mode. There are two ways to implement this:
>
> 1. Have the interrupt entry check constraints, twiddle its stack frame
> to look like a syscall instruction, and jump to the syscall entry.
> This way there's little code duplication. (Is it safe to sysret back
> to userspace from an interrupt gate? I don't see why not, but it
> seems to violate the spirit of the thing.)
Yeah, i think it should be safe. Lets try this? It looks like the
simplest variant.
Thanks,
Ingo
next prev parent reply other threads:[~2011-05-28 15:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 18:50 Thomas Gleixner
2011-05-26 21:26 ` Andy Lutomirski
2011-05-27 6:12 ` Ingo Molnar
2011-05-27 11:36 ` Andrew Lutomirski
2011-05-27 11:59 ` richard -rw- weinberger
2011-05-27 12:10 ` Andrew Lutomirski
2011-05-27 14:59 ` richard -rw- weinberger
2011-05-27 15:05 ` Andrew Lutomirski
2011-05-29 9:51 ` richard -rw- weinberger
2011-05-29 14:57 ` Andrew Lutomirski
2011-05-29 15:10 ` richard -rw- weinberger
2011-05-29 15:28 ` Andrew Lutomirski
2011-05-29 16:40 ` richard -rw- weinberger
2011-05-27 14:54 ` Andrew Lutomirski
2011-05-28 15:35 ` Ingo Molnar [this message]
2011-05-29 1:41 ` Andrew Lutomirski
2011-05-29 14:39 ` Mikael Pettersson
2011-05-29 14:59 ` Andrew Lutomirski
2011-05-29 16:01 ` Mikael Pettersson
2011-05-29 16:35 ` Andrew Lutomirski
2011-05-29 18:06 ` Mikael Pettersson
2011-05-29 18:44 ` Andrew Lutomirski
2011-05-30 3:26 ` Andrew Lutomirski
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=20110528153536.GB27104@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@mit.edu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/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®