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: <c5cd88f1-6390-4148-9595-07b3c09ab117@sirena.org.uk>
Date: Tue, 19 Nov 2024 18:06:35 +0000
From: Mark Brown <broonie@...nel.org>
To: Mark Rutland <mark.rutland@....com>
Cc: linux-arm-kernel@...ts.infradead.org, ardb@...nel.org,
	catalin.marinas@....com, jpoimboe@...nel.org,
	kaleshsingh@...gle.com, kristina.martsenko@....com,
	linux-kernel@...r.kernel.org, madvenka@...ux.microsoft.com,
	maz@...nel.org, mbenes@...e.cz, mhiramat@...nel.org,
	puranjay12@...il.com, rostedt@...dmis.org, will@...nel.org
Subject: Re: [PATCH] arm64: disable ARCH_CORRECT_STACKTRACE_ON_KRETPROBE tests

On Mon, Nov 18, 2024 at 12:02:04PM +0000, Mark Rutland wrote:

> The test assumes that when a stacktrace straddles an exception boundary,
> no necessary entries will be omitted and no extraneous entries will be
> reported, and when unwinding from a kretprobed callee, the next entry in
> the trace will be its immediate caller (whether kretprobed or not).

> Recently the arm64 stacktrace code was changed to always report the LR
> at an exception boundary, where we don't know whether the LR is live.
> In the case of the kretprobe trampoline the LR is not live at the time
> the stacktrace is performed, and so the entry in the trace for the LR is
> extraneous. This can be seen if a call to show_stack() is added to
> stacktrace_internal_return_handler():

Oh, that's a bit annoying.  :/

> +++ b/arch/arm64/Kconfig
> @@ -14,7 +14,6 @@ config ARM64
>  	select ARCH_HAS_DEBUG_WX
>  	select ARCH_BINFMT_ELF_EXTRA_PHDRS
>  	select ARCH_BINFMT_ELF_STATE
> -	select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
>  	select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
>  	select ARCH_ENABLE_MEMORY_HOTPLUG
>  	select ARCH_ENABLE_MEMORY_HOTREMOVE

This config option is only used for enabling parts of the kprobes tests
so it's not hurting anything at runtime AFAICT:

Reviewed-by: Mark Brown <broonie@...nel.org>

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ