mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-21 18:26:47 +03:00
icp: fix all !ENDBR objtool warnings in x86 Asm code
Currently, only Blake3 x86 Asm code has signs of being ENDBR-aware. At least, under certain conditions it includes some header file and uses some custom macro from there. Linux has its own NOENDBR since several releases ago. It's defined in the same <asm/linkage.h>, so currently <sys/asm_linkage.h> already is provided with it. Let's unify those two into one %ENDBR macro. At first, check if it's present already. If so -- use Linux kernel version. Otherwise, try to go that second way and use %_CET_ENDBR from <cet.h> if available. If no, fall back to just empty definition. This fixes a couple more 'relocations to !ENDBR' across the module. And now that we always have the latest/actual ENDBR definition, use it at the entrance of the few corresponding functions that objtool still complains about. This matches the way how it's used in the upstream x86 core Asm code. Reviewed-by: Attila Fülöp <attila@fueloep.org> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Lobakin <alobakin@pm.me> Closes #14035
This commit is contained in:
committed by
Brian Behlendorf
parent
61cca6fa05
commit
73b8f700b6
@@ -34,6 +34,24 @@
|
||||
#include <linux/linkage.h>
|
||||
#endif
|
||||
|
||||
#ifndef ENDBR
|
||||
#if defined(__ELF__) && defined(__CET__) && defined(__has_include)
|
||||
/* CSTYLED */
|
||||
#if __has_include(<cet.h>)
|
||||
|
||||
#include <cet.h>
|
||||
|
||||
#ifdef _CET_ENDBR
|
||||
#define ENDBR _CET_ENDBR
|
||||
#endif /* _CET_ENDBR */
|
||||
|
||||
#endif /* <cet.h> */
|
||||
#endif /* __ELF__ && __CET__ && __has_include */
|
||||
#endif /* !ENDBR */
|
||||
|
||||
#ifndef ENDBR
|
||||
#define ENDBR
|
||||
#endif
|
||||
#ifndef RET
|
||||
#define RET ret
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user