public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	open list <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>,
	cj.chengjian@huawei.com,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Borislav Petkov <bp@alien8.de>, Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michel Lespinasse <walken@google.com>,
	lkft-triage@lists.linaro.org,
	Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: Perf: WARNING: arch/x86/entry/common.c:624 idtentry_exit_cond_rcu+0x92/0xc0
Date: Fri, 12 Jun 2020 12:34:18 +0200	[thread overview]
Message-ID: <87d064d13p.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <8DD3180E-0E69-4FD6-92C3-311AAB3F688F@amacapital.net>

Andy Lutomirski <luto@amacapital.net> writes:
>> On Jun 12, 2020, at 2:01 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>> There is no IST on 32bit, never was. We do software stack switching for
>> device interrupts, but that's a different story.
>> 
>
> DEFINE_IDTENTRY does the idtentry_enter_cond_rcu() dance, which isn’t
> intended to be safe from NMI context.  It should probably map to
> DEFINE_IDTENTRY_RAW() instead.  The specific issue is that NMI ends up
> there, and at least DEFINE_IDTENTRY_NMI should be raw.

Yes, you are right. That's clearly broken. 

> I haven’t tried this at all, nor have I dug through all the users of
> these macros to check what they expect.  Perhaps we should not have
> the _IST one defined at all on 32 bit and rename it to
> DEFINE_IDTENTRY_IST_RAW on 64 bit to make it more clear what’s going
> on when reading the C code.

Let me go over it with a fine comb.

> Or maybe I’m too sleepy and I’m nuts. But I don’t think I am.

/me politely refrains from commenting

  reply	other threads:[~2020-06-12 10:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 18:56 Perf: WARNING: arch/x86/entry/common.c:624 idtentry_exit_cond_rcu+0x92/0xc0 Naresh Kamboju
2020-06-11 19:10 ` Andy Lutomirski
2020-06-11 19:25   ` Peter Zijlstra
2020-06-11 23:22     ` Andy Lutomirski
2020-06-12  3:30       ` Andy Lutomirski
2020-06-12  9:01         ` Thomas Gleixner
2020-06-12  9:18           ` Andy Lutomirski
2020-06-12 10:34             ` Thomas Gleixner [this message]
2020-07-02 14:27               ` Naresh Kamboju
2020-07-02 15:02                 ` Peter Zijlstra
2020-07-02 17:15                   ` Naresh Kamboju
2020-07-02 18:21                   ` Andy Lutomirski
2020-06-12 19:50 ` [tip: x86/entry] x86/entry: Make NMI use IDTENTRY_RAW tip-bot2 for Thomas Gleixner

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=87d064d13p.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=acme@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=cj.chengjian@huawei.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=minchan@kernel.org \
    --cc=mingo@redhat.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=peterz@infradead.org \
    --cc=walken@google.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox