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] [day] [month] [year] [list]
Date:   Tue, 1 Oct 2019 10:14:30 +0100
From:   Will Deacon <will@...nel.org>
To:     wangxu <wangxu72@...wei.com>
Cc:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        namhyung@...nel.org, gregkh@...uxfoundation.org,
        tglx@...utronix.de, rfontana@...hat.com, allison@...utok.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sample/hw_breakpoint: avoid sample hw_breakpoint
 recursion for arm/arm64

On Mon, Sep 23, 2019 at 04:09:35PM +0800, wangxu wrote:
> From: Wang Xu <wangxu72@...wei.com>
> 
> For x86/ppc, hw_breakpoint is triggered after the instruction is
> executed.
> 
> For arm/arm64, which is triggered before the instruction executed.
> Arm/arm64 skips the instruction by using single step. But it only
> supports default overflow_handler.
> 
> This patch provides a chance to avoid sample hw_breakpoint recursion
> for arm/arm64 by adding 'struct perf_event_attr.bp_step'.

Issues like this come up every so often [1], [2], [3] but I'm still of the
opinion that we should rip out the perf interface to hw_breakpoint on arm64
and implement something better directly for ptrace, which is what GDB cares
about. The current "let's convert to perf and back again" is a wreck, mainly
because we've not been able to abstract the debug trap behaviour across
different architectures. GDB just wants to poke registers, and this all
gets in the way of that.

Will

[1] https://lkml.org/lkml/2018/11/15/205
[2] https://lore.kernel.org/lkml/20160323181348.GA2149@arm.com/
[3] https://lkml.org/lkml/2016/3/21/504

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ