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: <a70ee6c0-7904-8c63-e956-57f6d930db07@redhat.com>
Date:   Thu, 18 Apr 2019 10:40:04 -0400
From:   Waiman Long <longman@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>, Will Deacon <will.deacon@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        Davidlohr Bueso <dave@...olabs.net>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        huang ying <huang.ying.caritas@...il.com>
Subject: Re: [PATCH v4 15/16] locking/rwsem: Merge owner into count on x86-64

On 04/18/2019 10:28 AM, Peter Zijlstra wrote:
> On Sat, Apr 13, 2019 at 01:22:58PM -0400, Waiman Long wrote:
>> +#ifdef CONFIG_X86_64
>> +#define RWSEM_MERGE_OWNER_TO_COUNT
>> +#endif
>> +#ifdef RWSEM_MERGE_OWNER_TO_COUNT
>> +
>> +#ifdef __PHYSICAL_MASK_SHIFT
>> +#define RWSEM_PA_MASK_SHIFT	__PHYSICAL_MASK_SHIFT
>> +#else
>> +#define RWSEM_PA_MASK_SHIFT	52
>> +#endif
> I really dislike how this hardcodes x86_64.
>
> It would be much better to have a CONFIG variable that gives us the
> PA_BITS. Then all an architecture needs to do is set that right.
>
> FWIW:
>
> arch/arm64/Kconfig:config ARM64_PA_BITS_48
> arch/arm64/Kconfig:config ARM64_PA_BITS_52
>
> So ARM64 could also use this -- provided we get that overflow thing
> sorted.

That will work too. I just a bit hesitant to add new config variable.

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ