linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andy Lutomirski <luto@kernel.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Lai Jiangshan <laijs@linux.alibaba.com>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	X86 ML <x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Alexandre Chartre <alexandre.chartre@oracle.com>,
	Andy Lutomirski <luto@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"Chang S. Bae" <chang.seok.bae@intel.com>,
	Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 1/2] x86/hw_breakpoint: Prevent data breakpoints on __per_cpu_offset
Date: Fri, 05 Feb 2021 12:45:54 +0100	[thread overview]
Message-ID: <877dnmagb1.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CALCETrXk_xp5+tZiTOGzFLk76Pc3gGsnO80UzmHf=ZoqrUgr5w@mail.gmail.com>

On Thu, Feb 04 2021 at 16:11, Andy Lutomirski wrote:
> On Thu, Feb 4, 2021 at 6:26 AM Lai Jiangshan <jiangshanlai@gmail.com> wrote:
>> When FSGSBASE is enabled, paranoid_entry() fetches the per-CPU
>> GSBASE value via __per_cpu_offset or pcpu_unit_offsets.
>>
>> When data breakpoint is set on __per_cpu_offset[cpu] (read-write
>> operation), the specific cpu will be stuck in the infinite #DB loop.
>> RCU will try to send NMI to the specific cpu, but it is not working
>> either since NMI also relies on paranoid_entry().
>
> Should we consider having a .percpu..noinstr section and having
> objtool enforce this?

I think so.

Thanks,

        tglx

  reply	other threads:[~2021-02-05 11:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 15:27 [PATCH 1/2] x86/hw_breakpoint: Prevent data breakpoints on __per_cpu_offset Lai Jiangshan
2021-02-04 15:27 ` [PATCH 2/2] x86/hw_breakpoint: Prevent data breakpoints on cpu_dr7 Lai Jiangshan
2021-02-05 19:15   ` [tip: x86/urgent] x86/debug: " tip-bot2 for Lai Jiangshan
2021-02-05  0:11 ` [PATCH 1/2] x86/hw_breakpoint: Prevent data breakpoints on __per_cpu_offset Andy Lutomirski
2021-02-05 11:45   ` Thomas Gleixner [this message]
2021-02-05 12:46     ` Peter Zijlstra
2021-02-05 19:15 ` [tip: x86/urgent] x86/debug: " tip-bot2 for Lai Jiangshan

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=877dnmagb1.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=alexandre.chartre@oracle.com \
    --cc=bp@alien8.de \
    --cc=chang.seok.bae@intel.com \
    --cc=gustavoars@kernel.org \
    --cc=hpa@zytor.com \
    --cc=jiangshanlai@gmail.com \
    --cc=laijs@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).