summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2023-05-22 00:37:20 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2023-05-22 00:37:20 +0000
commitdd0fd50424a017e81769d9a6c9b9ba7648cf0271 (patch)
tree6105197ce125d6bd97cd868118427bcbda6a31e4
parent782effe6b7240dfb2d2858e647caeac58399df6b (diff)
NENTRY() doesn't provide an endbr64, so give memmove one in
case it ever gets called through a function pointer (with retpoline disabled) ok deraadt@
-rw-r--r--sys/lib/libkern/arch/amd64/memmove.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/lib/libkern/arch/amd64/memmove.S b/sys/lib/libkern/arch/amd64/memmove.S
index e10113a3745..6c49b21dd79 100644
--- a/sys/lib/libkern/arch/amd64/memmove.S
+++ b/sys/lib/libkern/arch/amd64/memmove.S
@@ -45,6 +45,7 @@ ENTRY(bcopy)
/* fall into memmove */
NENTRY(memmove)
+ endbr64
RETGUARD_SETUP(memmove, r10)
movq %rdi,%r11 /* save dest */
movq %rdx,%rcx