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] [day] [month] [year] [list]
Date:   Thu, 19 Aug 2021 11:36:18 +0800
From:   Xiaoyao Li <xiaoyao.li@...el.com>
To:     Fenghua Yu <fenghua.yu@...el.com>
Cc:     linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Tony Luck <tony.luck@...el.com>, x86@...nel.org
Subject: Re: [tip: x86/splitlock] Documentation/x86: Add buslock.rst

On 8/18/2021 11:36 PM, Fenghua Yu wrote:
> On Wed, Aug 18, 2021 at 09:59:49AM +0800, Xiaoyao Li wrote:
>> On 5/18/2021 10:44 PM, tip-bot2 for Fenghua Yu wrote:
>> I'm wonder if using only one "split_lock_detect" parameter for those two
>> features is good/correct.
>>
>> In fact, split lock is just one type of bus lock. There are two types bus
>> lock:
>> 1) split lock, lock on WB memory across multiple cache lines;
>> 2) lock on non-WB memory;
>>
>> As current design, if both features are available, it only enables #AC for
>> split lock either for "warn" or "fatal". Thus we cannot capture any bus lock
>> due to 2) lock on non-WB memory.
>>
>> Why not provide separate parameter for them? e.g., split_lock_detect and
>> bus_lock_detect. Then they can be configured and enabled independently.
> 
> #AC for split lock is a model specific feature and only available on limited
> (and legacy) platforms. #DB for bus lock is an architectural feature and will
> replace #AC for split lock in future platforms. The platforms that support
> both of them are very rare (maybe only one AFAIK). 

I suppose you mean only SPR supports both.

> Adding two parameters makes
> code and usage complex while only one platform may get benefit in reality.

First, it's about correctness not easiness. Administrator wants to kill 
any user application that causes bus lock so setting 
"split_lock_detect=fatal". But it's possible that all non-WB bus lock 
escapes if the platform supports both feature.

(Yes, the parameter is called "split_lock_detect". It's no surprising 
that it can only detects split lock.)

Second, I don't think using two separate parameters makes code and usage 
complex. e.g.,

   - "split_lock_detect" for split lock feature, it can be
     [off|fatal|warn]
   - "bus_lock_detect" for bus lock feature, it can be
     [off|fatal|warn|ratelimit]

   Of course, kernel can print a message like "split/bus lock detection
   is not supported by silicon" when feature is not available.

Both features can work independently, and every combination can work wit 
h no issue.

Users are suggested to use "bus_lock_detect" to detect all bus lock and 
leave "split_lock_detect" to whatever. Of course they can only use 
"split_lock_detect" while leaving "bus_lock_detect" to off, if they are 
only interested in split lock.

> Thanks.
> 
> -Fenghua
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ