mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fix objtool: missing int3 after ret warning
Resolve straight-line speculation warnings reported by objtool for x86_64 assembly on Linux when CONFIG_SLS is set. See the following LWN article for the complete details. https://lwn.net/Articles/877845/ Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #13528 Closes #13575
This commit is contained in:
@@ -35,6 +35,12 @@ x:
|
||||
.size x, [.-x]
|
||||
|
||||
|
||||
#if defined(__linux__) && defined(CONFIG_SLS)
|
||||
#define RET ret; int3
|
||||
#else
|
||||
#define RET ret
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Setjmp and longjmp implement non-local gotos using state vectors
|
||||
* type label_t.
|
||||
@@ -52,7 +58,7 @@ x:
|
||||
movq 0(%rsp), %rdx /* return address */
|
||||
movq %rdx, 56(%rdi) /* rip */
|
||||
xorl %eax, %eax /* return 0 */
|
||||
ret
|
||||
RET
|
||||
SET_SIZE(setjmp)
|
||||
|
||||
ENTRY(longjmp)
|
||||
@@ -67,7 +73,7 @@ x:
|
||||
movq %rdx, 0(%rsp)
|
||||
xorl %eax, %eax
|
||||
incl %eax /* return 1 */
|
||||
ret
|
||||
RET
|
||||
SET_SIZE(longjmp)
|
||||
|
||||
#ifdef __ELF__
|
||||
|
||||
Reference in New Issue
Block a user