]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
uprobes/x86: Make asm style consistent
authorPeter Zijlstra <peterz@infradead.org>
Thu, 21 Aug 2025 11:48:48 +0000 (13:48 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 21 Aug 2025 18:09:22 +0000 (20:09 +0200)
The asm syntax in uretprobe_trampoline and uprobe_trampoline differs
in the use of operand size suffixes. Make them consistent and remove
all size suffixes.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250821123657.163417243@infradead.org
arch/x86/kernel/uprobes.c

index ab6547bf2fa5d6c297453c65e5a1935c1aff94c7..643027e35c46141b2c22530ed205d220e652419c 100644 (file)
@@ -321,21 +321,21 @@ asm (
        ".pushsection .rodata\n"
        ".global uretprobe_trampoline_entry\n"
        "uretprobe_trampoline_entry:\n"
-       "pushq %rax\n"
-       "pushq %rcx\n"
-       "pushq %r11\n"
-       "movq $" __stringify(__NR_uretprobe) ", %rax\n"
+       "push %rax\n"
+       "push %rcx\n"
+       "push %r11\n"
+       "mov $" __stringify(__NR_uretprobe) ", %rax\n"
        "syscall\n"
        ".global uretprobe_syscall_check\n"
        "uretprobe_syscall_check:\n"
-       "popq %r11\n"
-       "popq %rcx\n"
+       "pop %r11\n"
+       "pop %rcx\n"
        /*
         * The uretprobe syscall replaces stored %rax value with final
         * return address, so we don't restore %rax in here and just
         * call ret.
         */
-       "retq\n"
+       "ret\n"
        ".global uretprobe_trampoline_end\n"
        "uretprobe_trampoline_end:\n"
        ".popsection\n"
@@ -885,7 +885,7 @@ asm (
        "push %rcx\n"
        "push %r11\n"
        "push %rax\n"
-       "movq $" __stringify(__NR_uprobe) ", %rax\n"
+       "mov $" __stringify(__NR_uprobe) ", %rax\n"
        "syscall\n"
        "pop %rax\n"
        "pop %r11\n"