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]
Message-ID: <nqm6xphzy5hptxvmeajrwaklxneivdwd6rcs5lvtrglecbnkwv@rpmclrmxzwwh>
Date: Tue, 22 Apr 2025 17:44:37 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, 
	Masami Hiramatsu <mhiramat@...nel.org>, Mark Rutland <mark.rutland@....com>, 
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton <akpm@...ux-foundation.org>, 
	Jens Remus <jremus@...ux.ibm.com>, x86@...nel.org, Peter Zijlstra <peterz@...radead.org>, 
	Ingo Molnar <mingo@...nel.org>, Indu Bhagat <indu.bhagat@...cle.com>, 
	Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, 
	Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, 
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v5 3/6] x86/asm: Fix VDSO DWARF generation with kernel
 IBT enabled

On Tue, Apr 22, 2025 at 02:34:42PM -0400, Steven Rostedt wrote:
> From: Josh Poimboeuf <jpoimboe@...nel.org>
> 
> The DWARF .cfi_startproc annotation needs to be at the very beginning of
> a function.  But with kernel IBT that doesn't happen as ENDBR is
> sneakily embedded in SYM_FUNC_START.  As a result the DWARF unwinding
> info is wrong at the beginning of all the VDSO functions.
> 
> Fix it by adding CFI_STARTPROC and CFI_ENDPROC to SYM_FUNC_START_* and
> SYM_FUNC_END respectively.  Note this only affects VDSO, as the CFI_*
> macros are empty for the kernel proper.
> 
> Fixes: c4691712b546 ("x86/linkage: Add ENDBR to SYM_FUNC_START*()")
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> [ Fixed rebased issues. May need extra review ]
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
> Changes since v4: https://lore.kernel.org/all/5c7992c111adee94e242fbca2b3e64ab8e96e595.1737511963.git.jpoimboe@kernel.org/
> 
> - Rebased to latest kernel which had changes to the ENDBR caused by:
>   582077c94052 ("x86/cfi: Clean up linkage")

The code looks good, though that bug was already fixed up by
582077c94052 ("x86/cfi: Clean up linkage").  So this is really just a
cleanup now.  The "Fixes" tag can be removed, with the commit log
something like: 

Add CFI_STARTPROC and CFI_ENDPROC annotations to the SYM_FUNC_* macros
so the VDSO asm functions don't need to add them manually.  Note this
only affects VDSO, the CFI_* macros are empty for the kernel proper.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ