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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 2 Mar 2021 09:41:31 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Andy Lutomirski <luto@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Oleg Nesterov <oleg@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
        "David S . Miller" <davem@...emloft.net>, X86 ML <x86@...nel.org>,
        Andrew Cooper <andrew.cooper3@...rix.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC PATCH 1/1] x86/kprobes: Use int3 instead of debug trap for
 single-step

On Mon, Mar 01, 2021 at 11:08:15PM +0900, Masami Hiramatsu wrote:
> Use int3 instead of debug trap exception for single-stepping the
> probed instructions. Some instructions which change the ip
> registers or modify IF flags are emulated because those are not
> able to be single-stepped by int3 or may allow the interrupt
> while single-stepping.
> 
> This actually changes the kprobes behavior.
> 
> - kprobes can not probe following instructions; int3, iret,
>   far jmp/call which get absolute address as immediate,
>   indirect far jmp/call, indirect near jmp/call with addressing
>   by memory (register-based indirect jmp/call are OK), and
>   vmcall/vmlaunch/vmresume/vmxoff.
> 
> - If the kprobe post_handler doesn't set before registering,
>   it may not be called in some case even if you set it afterwards.
>   (IOW, kprobe booster is enabled at registration, user can not
>    change it)
> 
> But both are rare issue, unsupported instructions will not be
> used in the kernel (or rarely used), and post_handlers are
> rarely used (I don't see it except for the test code).
> 
> Suggested-by: Andy Lutomirski <luto@...nel.org>
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>

Very nice!

Aside of a few nits:

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ