All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
	X86 ML <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Borislav Petkov <bp@alien8.de>, Oleg Nesterov <oleg@redhat.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Brian Gerst <brgerst@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86/entry: Improve system call entry comments
Date: Tue, 8 Mar 2016 10:59:10 -0800	[thread overview]
Message-ID: <56DF20FE.4040607@zytor.com> (raw)
In-Reply-To: <CALCETrVzEE+wseTW+pcd7BF+G5qGG1SP6mwU77Eg64VAfmiCww@mail.gmail.com>

On 03/08/16 10:50, Andy Lutomirski wrote:
> On Tue, Mar 8, 2016 at 10:47 AM, H. Peter Anvin <hpa@zytor.com> wrote:
>> On 03/08/16 10:45, Andy Lutomirski wrote:
>>>
>>> s/modern/most, perhaps?
>>>
>>> I'm hoping that some day Bionic goes away and gets replaced by musl.
>>>
>>> Of course, musl doesn't always use fast syscalls because it needs a
>>> vdso facility that doesn't currently exist.  I'll deal with that
>>> eventually.
>>>
>>
>> You don't actually need actual DSO support to support fast system calls
>> on i386.  Even klibc uses them now, and the additional code to support
>> it is trivial.
> 
> That's not the issue.  The issue is that musl does something
> crazy^Wclever to support POSIX pthread cancellation, and it involves
> being able to tell whether a signal's ucontext points to a syscall
> and, if so, what the return address is.  This is straightforward with
> an inlined int $0x80, but doing it reliably with the current vdso
> design would requiring parsing the DWARF data, and I can't really
> blame musl for not wanting to do that.
> 
> There was a thread awhile back about adding a new vdso helper to do
> this.  I think I even had some code for it.  If I find time, I'll try
> to send patches for 4.7.
> 

As far as I know, when we get a signal the EIP always points to int
$0x80 as we don't support system call restart (being a rare case) for
the fast system calls.

	-hpa

  reply	other threads:[~2016-03-08 19:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06 17:39 [PATCH] x86/entry: Improve system call entry comments Andy Lutomirski
2016-03-07  8:22 ` Ingo Molnar
2016-03-07 16:34   ` H. Peter Anvin
2016-03-08 10:30     ` Ingo Molnar
2016-03-08 18:40       ` H. Peter Anvin
2016-03-08 18:45         ` Andy Lutomirski
2016-03-08 18:47           ` H. Peter Anvin
2016-03-08 18:50             ` Andy Lutomirski
2016-03-08 18:59               ` H. Peter Anvin [this message]
2016-03-08 19:11                 ` Andy Lutomirski
2016-03-07 17:01   ` Andy Lutomirski
2016-03-08 10:27     ` Ingo Molnar
2016-03-08 18:29       ` Andy 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=56DF20FE.4040607@zytor.com \
    --to=hpa@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.