mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Borislav Petkov <bp@suse.de>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: CONFIG_RETHUNK int3 filling prevents kprobes in function body
Date: Mon, 5 Sep 2022 17:15:07 +0200	[thread overview]
Message-ID: <YxYSexFjytTCIJ0i@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <YxYRHHuTHjzgCuE8@hirez.programming.kicks-ass.net>

On Mon, Sep 05, 2022 at 05:09:16PM +0200, Peter Zijlstra wrote:
> On Sun, Sep 04, 2022 at 11:07:13PM +0900, Masami Hiramatsu wrote:
> > Hi Peter,
> > 
> > I found that the CONFIG_RETHUNK code (path_return) fills the unused bytes
> > with int3 for padding. Unfortunately, this prevents kprobes on the function
> > body after the return code (e.g. branch blocks placed behind the return.)
> 
> Prior to that CONFIG_SLS would already use "ret; int3"

FWIW, there is a compiler option pending to also stick an int3 after
every unconditional jmp.

  reply	other threads:[~2022-09-05 15:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-04 14:07 Masami Hiramatsu
2022-09-05 14:57 ` Steven Rostedt
2022-09-05 15:10   ` Peter Zijlstra
2022-09-05 15:20     ` Peter Zijlstra
2022-09-06  1:30       ` Masami Hiramatsu
2022-09-05 15:09 ` Peter Zijlstra
2022-09-05 15:15   ` Peter Zijlstra [this message]
2022-09-05 15:52   ` Peter Zijlstra
2022-09-06  1:33     ` Masami Hiramatsu
2022-09-06  8:44       ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YxYSexFjytTCIJ0i@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@suse.de \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®