Skip to content

Commit

Permalink
x86/vsyscall_emu/64: Don't use RET in vsyscall emulation
Browse files Browse the repository at this point in the history
This is userspace code and doesn't play by the normal kernel rules.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
  • Loading branch information
Peter Zijlstra authored and suryasaimadhu committed Jun 27, 2022
1 parent af2e140 commit 15583e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/x86/entry/vsyscall/vsyscall_emu_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@ __vsyscall_page:

mov $__NR_gettimeofday, %rax
syscall
RET
ret
int3

.balign 1024, 0xcc
mov $__NR_time, %rax
syscall
RET
ret
int3

.balign 1024, 0xcc
mov $__NR_getcpu, %rax
syscall
RET
ret
int3

.balign 4096, 0xcc

Expand Down

0 comments on commit 15583e5

Please sign in to comment.