Re: [PATCH 1/7] x86/entry: Introduce __entry_text for entry code written in C

From: Thomas Gleixner
Date: Wed May 11 2022 - 16:09:27 EST


On Wed, May 11 2022 at 11:01, Nick Desaulniers wrote:
> On Wed, May 11, 2022 at 12:27 AM Lai Jiangshan <jiangshanlai@xxxxxxxxx> wrote:
>> /* Section for code which can't be instrumented at all */
>> -#define noinstr \
>> - noinline notrace __attribute((__section__(".noinstr.text"))) \
>> - __no_kcsan __no_sanitize_address __no_profile __no_sanitize_coverage
>> +#define __noinstr_section(section) \
>> + noinline notrace __section(section) __no_profile \
>> + __no_kcsan __no_sanitize_address __no_sanitize_coverage
>> +
>> +#define noinstr __noinstr_section(".noinstr.text")
>
> I haven't looked at the rest of the series, but isn't `noinstr` used
> in a bunch of places? Wont this commit break all those uses or at
> least make it break bisection?

Why so?

This is still applying all the 'no' annotations and puts the code in
the very same section as before, no?

Thanks,

tglx