[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cd11111a-321e-3b29-3d7b-8844189f791e@linuxfoundation.org>
Date: Tue, 26 Sep 2023 19:26:34 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Justin Stitt <justinstitt@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Boqun Feng <boqun.feng@...il.com>,
Shuah Khan <shuah@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
llvm@...ts.linux.dev, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] selftests/rseq: fix kselftest Clang build warnings
On 9/26/23 14:39, Shuah Khan wrote:
> On 9/26/23 13:02, Mathieu Desnoyers wrote:
>> On 9/26/23 08:20, Justin Stitt wrote:
>>> Ping.
>>>
>>> Looking to get this patch and [1] slated for 6.7 which fixes some
>>> kselftest builds on older kernels.
>>>
>>> On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt <justinstitt@...gle.com> wrote:
>>>>
>>>> When building with Clang, I am getting many warnings from the selftests/rseq tree.
>>>>
>>>> Here's one such example from rseq tree:
>>>> | param_test.c:1234:10: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
>>>> | 1234 | while (!atomic_load(&args->percpu_list_ptr)) {}
>>>> | | ^ ~~~~~~~~~~~~~~~~~~~~~~
>>>> | /usr/local/google/home/justinstitt/repos/tc-build/build/llvm/final/lib/clang/18/include/stdatomic.h:140:29: note: expanded from macro 'atomic_load'
>>>> | 140 | #define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST)
>>>> | | ^ ~~~~~~
>>>>
>>>> Use compiler builtins `__atomic_load_n()` and `__atomic_store_n()` with
>>>> accompanying __ATOMIC_ACQUIRE and __ATOMIC_RELEASE, respectively. This
>>>> will fix the warnings because the compiler builtins do not expect their
>>>> arguments to have _Atomic type. This should also make TSAN happier.
>>>>
>>>> Link: https://github.com/ClangBuiltLinux/linux/issues/1698
>>>> Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/61
>>>> Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
>>>> Signed-off-by: Justin Stitt <justinstitt@...gle.com>
>>
>> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
>>
>> Peter, should this go through tip ?
>>
>> Shuah, should to go through selftests ?
>>
>
> I can take this through selftests and apply it - hoping there
> are no conflicts with what's in Peter's tree.
>
Applied to linux-kselftest next for Linux 6.7-rc1
thanks,
-- Shuah
Powered by blists - more mailing lists