lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117122455.GG3121406@hirez.programming.kicks-ass.net>
Date:   Tue, 17 Nov 2020 13:24:55 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Fenghua Yu <fenghua.yu@...el.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
        Tony Luck <tony.luck@...el.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Xiaoyao Li <xiaoyao.li@...el.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH v2 2/4] x86/bus_lock: Handle warn and fatal in #DB for
 bus lock

On Wed, Nov 11, 2020 at 07:20:46PM +0000, Fenghua Yu wrote:
> #DB for bus lock is enabled by bus lock detection bit 2 in DEBUGCTL MSR
> while #AC for split lock is enabled by split lock detection bit 29 in
> TEST_CTRL MSR.
> 
> Delivery of #DB for bus lock in userspace clears DR6[11]. To avoid
> confusion in identifying #DB, #DB handler sets the bit to 1 before
> returning to the interrupted task.
> 
> Use the existing kernel command line option "split_lock_detect=" to handle
> #DB for bus lock:
> 
> 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.
> 
> Default option is "warn".
> 
> Hardware only generates #DB for bus lock detect when CPL>0 to avoid
> nested #DB from multiple bus locks while the first #DB is being handled.
> So no need to handle #DB for bus lock detected in the kernel.
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
> Reviewed-by: Tony Luck <tony.luck@...el.com>

Sane enough I suppose,

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

The one thing I found still missing is a better description of the
things tickling SLD vs BLD. IIRC BLD detects a wider range of issues.
Therefore it _might_ make sense to allow SLD && BLD when fatal, instead
of only SLD.

Still, that's nitpicking.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ