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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <914ce985-f642-473e-a312-0a390ab5e78b@redhat.com>
Date: Wed, 16 Jul 2025 15:16:49 +0200
From: David Hildenbrand <david@...hat.com>
To: wang lian <lianux.mm@...il.com>, akpm@...ux-foundation.org,
 broonie@...nel.org, lorenzo.stoakes@...cle.com, sj@...nel.org,
 ziy@...dia.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: brauner@...nel.org, jannh@...gle.com, Liam.Howlett@...cle.com,
 shuah@...nel.org, vbabka@...e.cz, ludovico.zy.wu@...il.com,
 gkwang@...x-info.com, p1ucky0923@...il.com, ryncsn@...il.com,
 zijing.zhang@...ton.me
Subject: Re: [PATCH] selftests/mm: reuse FORCE_READ to replace "asm
 volatile("" : "+r" (XXX));"

On 16.07.25 14:31, wang lian wrote:
> Several mm selftests use the `asm volatile("" : "+r" (variable));`
> construct to force a read of a variable, preventing the compiler from
> optimizing away the memory access. This idiom is cryptic and duplicated
> across multiple test files.
> 
> Following a suggestion from David[1], this patch refactors this
> common pattern into a FORCE_READ() macro
> 
> [1] https://lore.kernel.org/lkml/4a3e0759-caa1-4cfa-bc3f-402593f1eee3@redhat.com/
> 
> Signed-off-by: wang lian <lianux.mm@...il.com>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ