lkml.org 
[lkml]   [2023]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/4] x86/percpu: Use C for percpu read/write accessors
Date


> On Oct 9, 2023, at 3:42 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> !! External Email
>
> On Mon, Oct 9, 2023 at 2:21 PM Nadav Amit <namit@vmware.com> wrote:
>>
>>
>>
>>> On Oct 9, 2023, at 3:00 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>>>
>>> !! External Email
>>>
>>> On Mon, Oct 9, 2023 at 1:51 PM Ingo Molnar <mingo@kernel.org> wrote:
>>>>
>>>> BTW., while this OK for testing, this is too heavy handed for release
>>>> purposes, so please only disable the KASAN instrumentation for the affected
>>>> percpu accessors.
>>>>
>>>> See the various __no_sanitize* attributes available.
>>>
>>> These attributes are for function declarations. The percpu casts can
>>> not be implemented with separate static inline functions. Also,
>>> __no_sanitize_address is mutually exclusive with __always_inline.
>>
>> Right, but for GCC you may be able to do something like:
>>
>> #pragma GCC diagnostic push
>> #pragma GCC diagnostic ignored "-fsanitize=address"
>>
>> // Your code here...
>> #pragma GCC diagnostic pop
>>
>> Not sure if there is something equivalent in CLANG, and it should be done with
>> the kernel’s _Pragma.
>
> Unfortunately, this is only for diagnostics and expects "-W..." to
> suppress warnings. Here we want to disable kernel sanitizer just for
> the enclosing access and I'm sure it won't work with diagnostics
> pragmas. I don't think that "-fsanitize=..." is included in target or
> optimization options allowed in Pragma.

Ugh. Sorry for the noise. You seem to be right.
\
 
 \ /
  Last update: 2023-10-09 14:53    [W:0.127 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site