diff options
author | 2018-07-03 23:22:48 +0000 | |
---|---|---|
committer | 2018-07-03 23:22:48 +0000 | |
commit | 1d66f0a004efa322e2047d0371a4cfe69dca0a66 (patch) | |
tree | 0721a18719a6bd71b839607a66e6ecea036ff60d /sys/lib/libkern/arch/amd64/bcmp.S | |
parent | Add retguard macros for kernel asm. (diff) | |
download | wireguard-openbsd-1d66f0a004efa322e2047d0371a4cfe69dca0a66.tar.xz wireguard-openbsd-1d66f0a004efa322e2047d0371a4cfe69dca0a66.zip |
Add retguard macros for libkern
ok deraadt
Diffstat (limited to 'sys/lib/libkern/arch/amd64/bcmp.S')
-rw-r--r-- | sys/lib/libkern/arch/amd64/bcmp.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/lib/libkern/arch/amd64/bcmp.S b/sys/lib/libkern/arch/amd64/bcmp.S index 4cb1b3d6894..96754ed68a4 100644 --- a/sys/lib/libkern/arch/amd64/bcmp.S +++ b/sys/lib/libkern/arch/amd64/bcmp.S @@ -1,6 +1,7 @@ #include <machine/asm.h> ENTRY(bcmp) + RETGUARD_SETUP(bcmp, r11) xorl %eax,%eax /* clear return value */ movq %rdx,%rcx /* compare by words */ @@ -16,4 +17,5 @@ ENTRY(bcmp) je L2 L1: incl %eax -L2: ret +L2: RETGUARD_CHECK(bcmp, r11) + ret |