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: <86c8ba70-2a2f-4c5b-8e74-20e3823e2db3@app.fastmail.com>
Date:   Mon, 06 Feb 2023 14:20:06 +0100
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Peter Zijlstra" <peterz@...radead.org>
Cc:     "Linus Torvalds" <torvalds@...ux-foundation.org>,
        "Jonathan Corbet" <corbet@....net>,
        "Will Deacon" <will@...nel.org>,
        "Boqun Feng" <boqun.feng@...il.com>,
        "Mark Rutland" <mark.rutland@....com>,
        "Catalin Marinas" <catalin.marinas@....com>, dennis@...nel.org,
        "Tejun Heo" <tj@...nel.org>, "Christoph Lameter" <cl@...ux.com>,
        "Heiko Carstens" <hca@...ux.ibm.com>, gor@...ux.ibm.com,
        "Alexander Gordeev" <agordeev@...ux.ibm.com>,
        borntraeger@...ux.ibm.com, "Sven Schnelle" <svens@...ux.ibm.com>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        "Ingo Molnar" <mingo@...hat.com>, "Borislav Petkov" <bp@...en8.de>,
        "Dave Hansen" <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>, "Joerg Roedel" <joro@...tes.org>,
        suravee.suthikulpanit@....com,
        "Robin Murphy" <robin.murphy@....com>, dwmw2@...radead.org,
        "Baolu Lu" <baolu.lu@...ux.intel.com>,
        "Herbert Xu" <herbert@...dor.apana.org.au>,
        "David S . Miller" <davem@...emloft.net>,
        "Pekka Enberg" <penberg@...nel.org>,
        "David Rientjes" <rientjes@...gle.com>,
        "Joonsoo Kim" <iamjoonsoo.kim@....com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Vlastimil Babka" <vbabka@...e.cz>,
        "Roman Gushchin" <roman.gushchin@...ux.dev>,
        "Hyeonggon Yoo" <42.hyeyoo@...il.com>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-s390@...r.kernel.org, iommu@...ts.linux.dev,
        Linux-Arch <linux-arch@...r.kernel.org>,
        linux-crypto@...r.kernel.org
Subject: Re: [PATCH v2 05/10] percpu: Wire up cmpxchg128

On Mon, Feb 6, 2023, at 13:48, Peter Zijlstra wrote:
> On Mon, Feb 06, 2023 at 01:14:28PM +0100, Peter Zijlstra wrote:
>> On Mon, Feb 06, 2023 at 12:24:00PM +0100, Peter Zijlstra wrote:
>> Basically, using 64bit percpu ops on 32bit is already somewhat dangerous
>> -- wiring up native cmpxchg64 support in that case seemed an
>> improvement.
>> 
>> Anyway... let me get on with doing explicit
>> {raw,this}_cpu_cmpxchg{64,128}() thingies.
>
> I only converted x86 and didn't do the automagic downgrade...
>
> Opinions?

I think that's much better, it keeps the interface symmetric
between cmpxchg and this_cpu_cmp_cmpxchg, and makes it harder
to run into the subtle corner case on old x86 CPUs.

For the M486/M586/MK8/MPSC/MATOM/MCORE2 configs, I would
probably want to go with a compile-time check and have most
distro kernels build with at least M586TSC for 32-bit or
an upgraded CONFIG_GENERIC_CPU for x86_64 that assumes cmpxchg16b
(nehalem, second-geneneration k8, silverthorne, ...) in
order to turn system_has_cmpxchg* into a constant value on
all architectures. That can be a separate discussion though
and shouldn't block your series as you just keep the current
state.

> -#ifdef system_has_freelist_aba
> +#ifdef syste_has_freelist_aba

Typo

    Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ