All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zack@codesourcery.com>
To: Jamie Lokier <lk@tantalophile.demon.co.uk>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: [PATCH] Set TIF_IRET in more places
Date: Tue, 07 Jan 2003 11:27:32 -0800	[thread overview]
Message-ID: <87of6s3gm3.fsf@egil.codesourcery.com> (raw)
In-Reply-To: <20030107111905.GA949@bjl1.asuk.net> (Jamie Lokier's message of "Tue, 7 Jan 2003 11:19:05 +0000")

Jamie Lokier <lk@tantalophile.demon.co.uk> writes:

> Zack Weinberg wrote:
>> Consider SA_RESTORER - there isn't a guarantee that user space will
>> use the same code as the kernel's trampoline.  glibc happens to, but
>> only because GDB has a hardwired idea of what a signal trampoline
>> looks like.  Of course, you could simply document that sigreturn() is
>> another of the system calls that must be made through int 0x80.
>
> Glibc must use the same code as the kernel's trampoline because of
> MD_FALLBACK_FRAME_STATE_FOR() in GCC's exception handling...  (or
> libgcc.so must change).
>
> It explicitly checks for the opcode sequences 0x58b877000000cd80 and
> 0xb8ad000000cd80 in order to unwind exception frames around a
> handled signal.  Ugly, isn't it?

We're open to better ideas ...

>> Tangentially, I've seen people claim that the trampoline ought to be
>> able to avoid entering the kernel, although I'm not convinced (how
>> does the signal mask get reset, otherwise?)
>
> Welcome to a wonderful if rather unsightly optimisation:
[...]

I would want to be very sure that this was actually a performance win
before implementing it, and since it requires data tables in user
space I don't see how it could possibly be done in the vsyscall page.

zw

  parent reply	other threads:[~2003-01-07 19:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-06 21:34 [PATCH] Set TIF_IRET in more places Zack Weinberg
2003-01-07 11:19 ` Jamie Lokier
2003-01-07 17:42   ` Linus Torvalds
2003-01-07 19:27   ` Zack Weinberg [this message]
2003-01-08  1:21     ` Richard Henderson
2003-01-08  2:33       ` Linus Torvalds
2003-01-08  3:32         ` Daniel Jacobowitz
2003-01-08 16:29       ` Jamie Lokier
2003-01-09  6:49         ` Zack Weinberg
  -- strict thread matches above, loose matches on Subject: below --
2003-01-06 14:46 Luca Barbieri
2003-01-06 16:04 ` Linus Torvalds
2003-01-06 18:17   ` Luca Barbieri
2003-01-06 18:42     ` Ulrich Drepper
2003-01-06 18:49     ` Linus Torvalds
2003-01-06 20:26       ` Luca Barbieri

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=87of6s3gm3.fsf@egil.codesourcery.com \
    --to=zack@codesourcery.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@tantalophile.demon.co.uk \
    --cc=torvalds@transmeta.com \
    /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.