[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200313151213.GA32144@lenoir>
Date: Fri, 13 Mar 2020 16:12:14 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Steven Rostedt <rostedt@...dmis.org>,
Brian Gerst <brgerst@...il.com>,
Juergen Gross <jgross@...e.com>,
Alexandre Chartre <alexandre.chartre@...cle.com>
Subject: Re: [patch part-II V2 06/13] x86/entry/common: Mark syscall entry
points notrace and NOKPROBE
On Sun, Mar 08, 2020 at 11:24:05PM +0100, Thomas Gleixner wrote:
> The entry code has some limitations for instrumentation. Anything before
> invoking enter_from_user_mode() cannot be probed because kprobes depend on
> RCU and with NOHZ_FULL user mode can be accounted similar to idle from a
> RCU point of view. enter_from_user_mode() calls into context tracking which
> adjusts the RCU state.
>
> A similar problem exists vs. function tracing. The function entry/exit
> points can be used by BPF which again is not safe before CONTEXT_KERNEL has
> been reached.
>
> Mark the C-entry points for the various syscalls with notrace and
> NOKPROBE_SYMBOL().
>
> Note, that this still leaves the ASM invocations of trace_hardirqs_off()
> unprotected. While this is safe vs. RCU at least from the ftrace POV, these
> are trace points which can be utilized by BPF... This will be addressed in
> later patches.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Reviewed-by: Alexandre Chartre <alexandre.chartre@...cle.com>
> ---
> V2: Amend changelog
Thanks for the detailed explanations!
Reviewed-by: Frederic Weisbecker <frederic@...nel.org>
Powered by blists - more mailing lists