All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@kernel.org>
To: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Lai Jiangshan <laijs@linux.alibaba.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	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: Thu, 4 Feb 2021 16:11:54 -0800	[thread overview]
Message-ID: <CALCETrXk_xp5+tZiTOGzFLk76Pc3gGsnO80UzmHf=ZoqrUgr5w@mail.gmail.com> (raw)
In-Reply-To: <20210204152708.21308-1-jiangshanlai@gmail.com>

On Thu, Feb 4, 2021 at 6:26 AM Lai Jiangshan <jiangshanlai@gmail.com> wrote:
>
> From: Lai Jiangshan <laijs@linux.alibaba.com>
>
> 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?

  parent reply	other threads:[~2021-02-05  0:12 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 ` Andy Lutomirski [this message]
2021-02-05 11:45   ` [PATCH 1/2] x86/hw_breakpoint: Prevent data breakpoints on __per_cpu_offset Thomas Gleixner
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='CALCETrXk_xp5+tZiTOGzFLk76Pc3gGsnO80UzmHf=ZoqrUgr5w@mail.gmail.com' \
    --to=luto@kernel.org \
    --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=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=tglx@linutronix.de \
    --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 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.