public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@suse.de>,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [RFC][PATCH] i386: Per node IDT
Date: Mon, 11 Jul 2005 18:44:29 +0400	[thread overview]
Message-ID: <42D285CD.CF9389F8@tv-sign.ru> (raw)
In-Reply-To: Pine.LNX.4.61.0507110747480.16055@montezuma.fsmlabs.com

Hello Zwane,

Zwane Mwaikambo wrote:
>
> > On Mon, 11 Jul 2005, Oleg Nesterov wrote:
> >
> > Could you explain this change? I think it breaks do_signal/handle_signal,
> > they check orig_eax >= 0 to handle -ERESTARTSYS:
> >
> > 	/* Are we from a system call? */
> > 	if (regs->orig_eax >= 0) {
> > 		/* If so, check system call restarting.. */
> > 		switch (regs->eax) {
> > 		        case -ERESTART_RESTARTBLOCK:
> > 			case -ERESTARTNOHAND:
>
> The change is so that we can send IRQs higher than 256 to do_IRQ. That 
> looks like it tries to check if we came in via system_call since we'd save 
> the system call number as orig_eax. Now that i think about it, doesn't 
> that path always get taken when we interrupt userspace and have pending 
> signals on return from interrupt?

As far as I can see, we always have orig_eax < 0 on interrupt, because

irq_entries_start:
	pushl $vector-256	<-----  orig_eax
	jmp common_interrupt

and NR_IRQS < 256. So if we have pending signals on return from interrupt,
do_signal() will not corrupt userspace registers when regs->eax == -ERESTART...
accidentally.

Probably it makes sense to change it to
	pushl $vector - 0xFFFF - 1

and in do_IRQ()
	int irq = regs->orig_eax & 0xFFFF

if you need to send IRQs higher than 256 to do_IRQ.

Oleg.

  reply	other threads:[~2005-07-11 14:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11 12:28 [RFC][PATCH] i386: Per node IDT Oleg Nesterov
2005-07-11 14:03 ` Zwane Mwaikambo
2005-07-11 14:44   ` Oleg Nesterov [this message]
2005-07-11 15:05     ` Zwane Mwaikambo
2005-07-11 15:19     ` Oleg Nesterov
2005-08-07  1:13       ` Zwane Mwaikambo
2005-08-07 10:47         ` Oleg Nesterov
     [not found] <Pine.LNX.4.61.0507101617240.16055@montezuma.fsmlabs.com.suse.lists.linux.kernel>
2005-07-11  1:59 ` Andi Kleen
2005-07-11  4:02   ` Arjan van de Ven
2005-07-11  4:08     ` Andi Kleen
2005-07-11 14:09     ` Zwane Mwaikambo
2005-07-11 14:05       ` Arjan van de Ven
2005-07-11 15:17       ` Kenji Kaneshige
2005-07-11 13:34   ` Zwane Mwaikambo
2005-07-11 15:03     ` Brian Gerst
2005-07-11 15:21       ` Zwane Mwaikambo
2005-07-11 16:39         ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2005-07-10 22:41 Zwane Mwaikambo

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=42D285CD.CF9389F8@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=ak@suse.de \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@arm.linux.org.uk \
    /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