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: <20250429162754.GA26677@willie-the-truck>
Date: Tue, 29 Apr 2025 17:27:55 +0100
From: Will Deacon <will@...nel.org>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-doc@...r.kernel.org, Jonathan Corbet <corbet@....net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Mark Rutland <mark.rutland@....com>, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] documentation: Add nodebugmon for arm64 platforms

On Wed, Apr 16, 2025 at 11:57:06AM +0530, Anshuman Khandual wrote:
> Add an entry for nodebugmon which has been used on arm64 platforms.
> 
> Cc: Jonathan Corbet <corbet@....net>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Will Deacon <will@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: linux-doc@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
> This patch applies on v6.15-rc2
> 
>  Documentation/admin-guide/kernel-parameters.txt | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index d9fd26b95b34..f4a313d6c0ab 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -4085,6 +4085,13 @@
>  			/sys/module/printk/parameters/console_suspend) to
>  			turn on/off it dynamically.
>  
> +	nodebugmon
> +			[HW,ARM64] Disable debug monitor
> +			Disables the debug monitor exception handling on the platform
> +			regardless whether breakpoints and watchpoints are programmed
> +			or not. This prevents debug exceptions from being enabled via
> +			MDSCR_EL1 register.

Hmm. I appreciate the effort to document this, but I'm not sure that the
text above is really going to help anybody.

Firstly, this option goes hand-in-hand with a debugfs control
("debug_enabled") and so the two would ideally be documented together.

Secondly, I think the documentation should talk about the user-visible
effects that the control has... and that's where I get stuck! This has
been there since day 1 but I'm not really sure what it's useful for. I
_do_ remember needing it to use the DS-5 debugger back in the day, but
looking at what the option does (it mostly prevents the kernel from
touching MDSCR_EL1.{MDE,KDE} which effectively disables hardware
breakpoints and watchpoints for kernel/user and single-step for kernel)
I don't see why that's relevant for halting debug. The architecture says
that EDSCR.HDE can be used by the external debugger to enter debug state
and I don't see anything to suggest that MDSCR_EL1 settings interfere
with this.

Maybe the problem was that the external debugger left a load of live
breakpoint registers around after detaching, so this was a way to
suppress those? I don't remember :/

I wonder if we can remove this?

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ