lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230209232305.672dd0249e0db41552b28763@kernel.org>
Date:   Thu, 9 Feb 2023 23:23:05 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Shuah Khan <shuah@...nel.org>,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] tracing/selftests: Ignore __pfx_ symbols in kprobe test

On Wed, 8 Feb 2023 19:05:08 +0100
Peter Zijlstra <peterz@...radead.org> wrote:

> On Tue, Feb 07, 2023 at 01:54:02PM -0500, Steven Rostedt wrote:
> > On Tue, 7 Feb 2023 13:51:47 -0500
> > Steven Rostedt <rostedt@...dmis.org> wrote:
> > 
> > > From: "Steven Rostedt (Google)" <rostedt@...dmis.org>
> > > 
> > > The kprobe probepoint.tc test started failing because of the added __pfx_
> > > symbols that were added because of -fpatchable-function-entry=X,Y causing
> > > unwinders to see them as part of the previous functions. But kprobes can
> > > not be added on top of them. The selftest looks for tracefs_create_dir and
> > > picks it and the previous and following functions to add at their address.
> > > This caused it to include __pfx_tracefs_create_dir which is invalid to
> > > attach a kprobe to and caused the test to fail.
> > > 
> > > Fixes: 9f2899fe36a62 ("objtool: Add option to generate prefix symbols")
> > > Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> > 
> > This is assuming that kprobes can not be added on top of these. But another
> > solution could be to have kprobes just pick the function the __pfx_ is for.
> > Would that be a better solution?
> 
> Simply refusing them is simplest. I don't see a compelling reason to
> make this complicated.

Yeah, and __pfx_ symbols has some "range", that means it is hard to translate
the probe address if user specify __pfx_*+offset.

BTW, currently kprobe event rejects this __pfx_ symbols because it is notrace
symbols, thus we can trace it if CONFIG_KPROBE_EVENTS_ON_NOTRACE=y.
But I guess it should not probe that place always because it should never
executed right?

Thank you,


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ