NENTRY() doesn't provide an endbr64, so give memmove one in
authorguenther <guenther@openbsd.org>
Mon, 22 May 2023 00:37:19 +0000 (00:37 +0000)
committerguenther <guenther@openbsd.org>
Mon, 22 May 2023 00:37:19 +0000 (00:37 +0000)
case it ever gets called through a function pointer (with retpoline
disabled)

ok deraadt@

sys/lib/libkern/arch/amd64/memmove.S

index e10113a..6c49b21 100644 (file)
@@ -45,6 +45,7 @@ ENTRY(bcopy)
        /* fall into memmove */
 
 NENTRY(memmove)
+       endbr64
        RETGUARD_SETUP(memmove, r10)
        movq    %rdi,%r11       /* save dest */
        movq    %rdx,%rcx