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]
Message-Id: <175880516935.3262599.14788507714084459007.b4-ty@kernel.org>
Date: Thu, 25 Sep 2025 16:32:02 +0100
From: Will Deacon <will@...nel.org>
To: rostedt@...dmis.org,
	mhiramat@...nel.org,
	mark.rutland@....com,
	catalin.marinas@....com,
	revest@...omium.org,
	olsajiri@...il.com,
	andrii@...nel.org,
	ast@...nel.org,
	Feng Yang <yangfeng59949@....com>
Cc: kernel-team@...roid.com,
	Will Deacon <will@...nel.org>,
	linux-kernel@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	bpf@...r.kernel.org
Subject: Re: [PATCH] tracing: Fix the bug where bpf_get_stackid returns -EFAULT on the ARM64

On Thu, 25 Sep 2025 10:08:22 +0800, Feng Yang wrote:
> When using bpf_program__attach_kprobe_multi_opts on ARM64 to hook a BPF program
> that contains the bpf_get_stackid function, the BPF program fails
> to obtain the stack trace and returns -EFAULT.
> 
> This is because ftrace_partial_regs omits the configuration of the pstate register,
> leaving pstate at the default value of 0. When get_perf_callchain executes,
> it uses user_mode(regs) to determine whether it is in kernel mode.
> This leads to a misjudgment that the code is in user mode,
> so perf_callchain_kernel is not executed and the function returns directly.
> As a result, trace->nr becomes 0, and finally -EFAULT is returned.
> 
> [...]

Applied to arm64 (for-next/core), thanks!

[1/1] tracing: Fix the bug where bpf_get_stackid returns -EFAULT on the ARM64
      https://git.kernel.org/arm64/c/fd2f74f8f3d3

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ