[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9cfb5b1b-f565-4129-a3e3-fd16a38997da@redhat.com>
Date: Tue, 5 Aug 2025 23:05:49 +0200
From: David Hildenbrand <david@...hat.com>
To: Zi Yan <ziy@...dia.com>, wang lian <lianux.mm@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org
Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Wei Yang <richard.weiyang@...il.com>, Christian Brauner
<brauner@...nel.org>, Jann Horn <jannh@...gle.com>,
Kairui Song <ryncsn@...il.com>, Liam Howlett <liam.howlett@...cle.com>,
Mark Brown <broonie@...nel.org>, SeongJae Park <sj@...nel.org>,
Shuah Khan <shuah@...nel.org>, Vlastimil Babka <vbabka@...e.cz>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH] selftests/mm: fix FORCE_READ to read input value
correctly.
On 05.08.25 19:51, Zi Yan wrote:
> FORCE_READ() converts input value x to its pointer type then reads from
> address x. This is wrong. If x is a non-pointer, it would be caught it
> easily. But all FORCE_READ() callers are trying to read from a pointer and
> FORCE_READ() basically reads a pointer to a pointer instead of the original
> typed pointer. Almost no access violation was found, except the one from
> split_huge_page_test.
>
> Fix it by implementing a simplified READ_ONCE() instead.
>
> Fixes: 3f6bfd4789a0 ("selftests/mm: reuse FORCE_READ to replace "asm volatile("" : "+r" (XXX));"")
> Signed-off-by: Zi Yan <ziy@...dia.com>
> ---
Ouch, thank!
Acked-by: David Hildenbrand <david@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists