From: "Yu, Fenghua" <fenghua.yu@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
"Luck, Tony" <tony.luck@intel.com>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Li, Xiaoyao" <xiaoyao.li@intel.com>,
"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>, x86 <x86@kernel.org>
Subject: RE: [PATCH 2/4] x86/bus_lock: Handle warn and fatal in #DB for bus lock
Date: Tue, 10 Nov 2020 21:51:21 +0000 [thread overview]
Message-ID: <52f0c74cb1714a78bc84e158d26e7c38@intel.com> (raw)
In-Reply-To: <20201109082958.GZ2594@hirez.programming.kicks-ass.net>
Hi, Peter,
> On Sun, Nov 08, 2020 at 04:29:16AM +0000, Fenghua Yu wrote:
> > split_lock_detect=
> > #AC for split lock #DB for bus lock
> >
> > off Do nothing Do nothing
> >
> > warn Kernel OOPs Warn once per task and
> > Warn once per task and and continues to run.
> > disable future checking When both features are
> > supported, warn in #DB
> >
> > fatal Kernel OOPs Send SIGBUS to user
> > Send SIGBUS to user
> > When both features are
> > supported, fatal in #AC.
>
> > +void handle_bus_lock(struct pt_regs *regs) {
> > + if (!bld)
> > + return;
> > +
> > + pr_warn_ratelimited("#DB: %s/%d took a bus_lock trap at address:
> 0x%lx\n",
> > + current->comm, current->pid, regs->ip); }
>
> So the Changelog above, and the state_show() below, seem to suggest there
> should be SIGBUS code in #DB, but I'm having trouble spotting it.
You are right. The SIGBUS is missing here. Somehow my tests didn't capture the issue.
I will add:
+ force_sig_fault(SIGBUS, BUS_ADRALN, NULL);
to send SIGBUS in fatal case for #DB bus lock.
Thank you very much for your review!
-Fenghua
next prev parent reply other threads:[~2020-11-10 21:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-08 4:29 [PATCH 0/4] x86/bus_lock: Enable bus lock detection Fenghua Yu
2020-11-08 4:29 ` [PATCH 1/4] x86/cpufeatures: Enumerate #DB for " Fenghua Yu
2020-11-08 4:29 ` [PATCH 2/4] x86/bus_lock: Handle warn and fatal in #DB for bus lock Fenghua Yu
2020-11-09 8:29 ` Peter Zijlstra
2020-11-10 21:51 ` Yu, Fenghua [this message]
2020-11-08 4:29 ` [PATCH 3/4] x86/bus_lock: Set rate limit " Fenghua Yu
2020-11-08 4:29 ` [PATCH 4/4] Documentation/admin-guide: Change doc for split_lock_detect parameter Fenghua Yu
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=52f0c74cb1714a78bc84e158d26e7c38@intel.com \
--to=fenghua.yu@intel.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=ravi.v.shankar@intel.com \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.com \
/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