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] [day] [month] [year] [list]
Message-ID: <YxcIWIK4MTd1EohH@hirez.programming.kicks-ass.net>
Date:   Tue, 6 Sep 2022 10:44:08 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Borislav Petkov <bp@...e.de>, Josh Poimboeuf <jpoimboe@...nel.org>,
        linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: CONFIG_RETHUNK int3 filling prevents kprobes in function body

On Tue, Sep 06, 2022 at 10:33:29AM +0900, Masami Hiramatsu wrote:
> On Mon, 5 Sep 2022 17:52:29 +0200
> Peter Zijlstra <peterz@...radead.org> wrote:
> 
> > On Mon, Sep 05, 2022 at 05:09:16PM +0200, Peter Zijlstra wrote:
> > 
> > > > This is because kprobes decodes function body to ensure the probed address
> > > > is an instruction boundary, and if it finds the 0xcc (int3), it stops
> > > > decoding and reject probing because the int3 is usually used for a
> > > > software breakpoint and is replacing some other instruction. Without
> > > > recovering the instruction, it can not continue decoding safely.
> > > 
> > > I can't follow this logic. Decoding the single byte int3 instruction is
> > > trivial. If you want a sanity check, follow the branches you found while
> > > decoding the instruction starting at +0.
> > 
> > Specifically, kprobe is the only one scribbling random [*] instructions
> > with int3 in kernel text, so if kprobes doesn't know about the int3, it
> > must be padding.
> 
> No, kgdb is also handles int3 for its breakpoint. Of course we can
> ignore it or ask kgdb to expose the API to decode it.

I'm thinking kgdb has worse issues anyway. Much of it seems to be
wishful thinking.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ