[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52f0c74cb1714a78bc84e158d26e7c38@intel.com>
Date: Tue, 10 Nov 2020 21:51:21 +0000
From: "Yu, Fenghua" <fenghua.yu@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"Luck, Tony" <tony.luck@...el.com>,
"Randy Dunlap" <rdunlap@...radead.org>,
"Li, Xiaoyao" <xiaoyao.li@...el.com>,
"Shankar, Ravi V" <ravi.v.shankar@...el.com>,
linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: RE: [PATCH 2/4] x86/bus_lock: Handle warn and fatal in #DB for bus
lock
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
Powered by blists - more mailing lists