All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Borislav Petkov <bp@alien8.de>, Andi Kleen <andi@firstfloor.org>,
	stable@vger.kernel.org,
	Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: Re: [PATCH v2] x86/traps: Don't force in_interrupt() to return true in IST handlers
Date: Fri, 10 Jun 2016 14:50:56 +0200	[thread overview]
Message-ID: <20160610125056.GA8005@redhat.com> (raw)
In-Reply-To: <cdc215f94d118d691d73df35275022331156fb45.1464130360.git.luto@kernel.org>

On 05/24, Andy Lutomirski wrote:
>
>  void ist_enter(struct pt_regs *regs)
>  {
>  	if (user_mode(regs)) {
> @@ -109,13 +115,7 @@ void ist_enter(struct pt_regs *regs)
>  		rcu_nmi_enter();
>  	}
>  
> -	/*
> -	 * We are atomic because we're on the IST stack; or we're on
> -	 * x86_32, in which case we still shouldn't schedule; or we're
> -	 * on x86_64 and entered from user mode, in which case we're
> -	 * still atomic unless ist_begin_non_atomic is called.
> -	 */
> -	preempt_count_add(HARDIRQ_OFFSET);
> +	preempt_disable();

off-topic question,

perhaps it makes sense to remove another preempt_disable/preempt_enable_no_resched
in do_int3() and do_debug() ?

They were added by d99e1bd175f4291ddb6e62b22bb5bdbe3976389a ("x86/entry/traps: Refactor
preemption and interrupt flag handling") and afaics for no reason.

Oleg.

      parent reply	other threads:[~2016-06-10 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 22:54 Andy Lutomirski
2016-06-08 14:28 ` [tip:x86/urgent] x86/entry/traps: " tip-bot for Andy Lutomirski
2016-06-10 12:01 ` [tip:x86/apic] " tip-bot for Andy Lutomirski
2016-06-10 12:50 ` Oleg Nesterov [this message]

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=20160610125056.GA8005@redhat.com \
    --to=oleg@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=bp@alien8.de \
    --cc=kuleshovmail@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=x86@kernel.org \
    --subject='Re: [PATCH v2] x86/traps: Don'\''t force in_interrupt() to return true in IST handlers' \
    /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

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.