mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Roland McGrath <roland@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86_64: fix delayed signals
Date: Thu, 10 Jul 2008 18:48:16 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0807101824150.2936@woody.linux-foundation.org> (raw)
In-Reply-To: <20080711005243.ADE90154218@magilla.localdomain>



On Thu, 10 Jul 2008, Roland McGrath wrote:
> 
> i386 has never behaved this way, and still doesn't.

Btw, I told you differently, you didn't believe me. So I went back just 
because I have an ego easily the size of Manhattan, and when you doubt me, 
my ego is hurt.

i386 _has_ very much behaved this way. The system call code literally used 
to do

		..
	        cmpl $0,sigpending(%ebx)
	        jne signal_return
		..

and then 'signal_return' case would handle one signal and then return to 
user space:

		..
	        call SYMBOL_NAME(do_signal)
	#ifdef CONFIG_SMP
	        GET_CURRENT(%ebx)
	#endif
	        cli
	        CHECK_SOFTIRQ
	        je restore_all
		..

ie it would call "restore_all" without re-checking signals. I wasn't 
hallucinating.

So that's really old code.

The _really_ ancient code (like a decade ago or more) used to actually 
loop in do_signal() generating multiple signal stacks in one go. Then, a 
long long time ago, that was actually removed, and we expressly only tried 
to queue one signal at a time. I do not remember why, but it was before 
2.4.0. Probably _long_ before, but it's so long ago my memory is 
unreliable.

The "queue multiple signals" code that you claim has always been there is 
in fact pretty recent. For x86-32, it was a thing introduced in commit 
c3ff8ec31c1249d268cd11390649768a12bec1b9: by _you_, just three years ago, 
in 2.6.14, in regular git times.

So the x86-64 behaviour actually matches what the x86-32 behavior was at 
the time before things split.

And I'd also like to point out another commit, namely "[PATCH] fix broken 
vm86 interrupt/signal handling" (4031ff388138b58e5cd472dccce38828bcb8c706) 
that fixed a bug with an endless loop you had introduced in that original 
x86-32 code when you fixed this exact same issue back when.

Heh. That's the kind of thing that worries me.

			Linus

  parent reply	other threads:[~2008-07-11  1:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-10 21:50 Roland McGrath
2008-07-10 22:06 ` Linus Torvalds
2008-07-10 22:42   ` Roland McGrath
2008-07-10 22:51     ` Linus Torvalds
2008-07-10 23:02       ` Linus Torvalds
2008-07-11  0:52       ` Roland McGrath
2008-07-11  1:18         ` Linus Torvalds
2008-07-11  1:27           ` Roland McGrath
2008-07-11  1:48         ` Linus Torvalds [this message]
2008-07-11  2:02           ` Linus Torvalds
2008-07-11  2:22             ` Linus Torvalds
2008-07-11  2:26               ` Linus Torvalds
2008-07-12 12:24             ` Andi Kleen
2008-07-11  5:46 ` Ingo Molnar
2008-07-11 11:13   ` Török Edwin
2008-07-11 12:24   ` Elias Oltmanns
2008-07-11 17:58   ` Linus Torvalds
2008-07-11 18:07     ` Roland McGrath
2008-07-11 18:16       ` Linus Torvalds
2008-07-11 18:17         ` Linus Torvalds
2008-07-11 18:10     ` Linus Torvalds
2008-07-11 18:31       ` Linus Torvalds
2008-07-11 22:53         ` Arjan van de Ven
2008-07-12 10:33           ` Török Edwin
2008-07-11 20:37       ` Linus Torvalds
2008-07-11 23:22         ` Linus Torvalds
2008-07-12 10:32           ` Török Edwin
2008-07-12 13:42             ` Török Edwin
2008-07-12 14:55               ` Arjan van de Ven
2008-07-12 18:00                 ` Linus Torvalds
2008-07-12 18:15                   ` Arjan van de Ven
2008-07-12 18:28                     ` Linus Torvalds
2008-07-12 17:29             ` Linus Torvalds
2008-07-12 20:26               ` Török Edwin
2008-07-12 20:47                 ` Linus Torvalds
2008-07-12 20:57                 ` Denys Vlasenko
2008-07-13 10:46                   ` Oleg Nesterov
2008-07-13 12:34                     ` Denys Vlasenko
2008-07-13 18:36                     ` Linus Torvalds
2008-07-13 18:45                       ` Peter T. Breuer
2008-07-12 12:27     ` Andi Kleen
2008-07-12 17:41       ` Linus Torvalds
2008-07-13  9:38         ` Andi Kleen
2008-07-13 17:32           ` Linus Torvalds
2008-07-13 18:59             ` Andi Kleen
2008-07-13 19:08               ` Linus Torvalds

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.1.10.0807101824150.2936@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --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®