lkml.org 
[lkml]   [2022]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V6 04/11] compiler_types.h: Add __noinstr_section() for noinstr
On Mon, Oct 24, 2022 at 8:14 PM Mark Rutland <mark.rutland@arm.com> wrote:
>
> On Mon, Oct 24, 2022 at 02:06:04PM +0200, Peter Zijlstra wrote:
> > On Mon, Oct 24, 2022 at 12:56:03PM +0100, Mark Rutland wrote:
> >
> > > How about we split this like:
> > >
> > > | /*
> > > | * Prevent the compiler from instrumenting this code in any way
> > > | * This does not prevent instrumentation via KPROBES, which must be
> > > | * prevented through other means if necessary.
> >
> > Perhaps point to NOINSTR_TEXT in vmlinux.lds.h
>
> Makes sense, will do.
Do I need to update the comment with NOINSTR_TEXT? eg:

* Prevent the compiler from instrumenting this code in any way
* This does not prevent instrumentation via KPROBES, which must be
* prevented through other means if necessary. See NOINSTR_TEXT
* in vmlinux.lds.h.

>
> >
> > > | */
> > > | #define __no_compiler_instrument \
> > > | noinline notrace noinline notrace __no_kcsan \
> > > | __no_sanitize_address __no_sanitize_coverage
> > > |
> > > | /*
> > > | * Section for code which can't be instrumented at all.
> > > | * Any code in this section cannot be instrumented with KPROBES.
> > > | */
> > > | #define noinstr __no_compiler_instrument section(".noinstr.text")
> > >
> > > ... then we don't need __noinstr_section(), and IMO the split is
> > > clearer.
> >
> > Yeah, perhaps, no strong feelings. Note I have this in the sched-idle
> > series as well (which I still need to rebase and repost :/).
>
> Ah; I'll sit on this for now then, and once that's all in I can send a
> cleanup/rework patch. Sorry for the noise!
We still keep __noinstr_section(), right?

>
> Thanks,
> Mark.
--
Best Regards
Guo Ren

\
 
 \ /
  Last update: 2022-10-25 04:52    [W:0.279 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site