Patch "arm64/syscall: Include asm/ptrace.h in syscall_wrapper header." has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    arm64/syscall: Include asm/ptrace.h in syscall_wrapper header.

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm64-syscall-include-asm-ptrace.h-in-syscall_wrappe.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c84b489217a242588034c961a164fa02f34f4057
Author: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
Date:   Mon Oct 31 14:57:28 2022 -0700

    arm64/syscall: Include asm/ptrace.h in syscall_wrapper header.
    
    [ Upstream commit acfc35cfcee5df419391671ef1a631f43feee4e3 ]
    
    Add the same change for ARM64 as done in the commit 9440c4294160
    ("x86/syscall: Include asm/ptrace.h in syscall_wrapper header") to
    make sure all syscalls see 'struct pt_regs' definition and resulted
    BTF for '__arm64_sys_*(struct pt_regs *regs)' functions point to
    actual struct.
    
    Without this patch, the BPF verifier refuses to load a tracing prog
    which accesses pt_regs.
    
      bpf(BPF_PROG_LOAD, {prog_type=0x1a, ...}, 128) = -1 EACCES
    
    With this patch, we can see the correct error, which saves us time
    in debugging the prog.
    
      bpf(BPF_PROG_LOAD, {prog_type=0x1a, ...}, 128) = 4
      bpf(BPF_RAW_TRACEPOINT_OPEN, {raw_tracepoint={name=NULL, prog_fd=4}}, 128) = -1 ENOTSUPP
    
    Signed-off-by: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
    Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221031215728.50389-1-kuniyu@xxxxxxxxxx
    Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm64/include/asm/syscall_wrapper.h b/arch/arm64/include/asm/syscall_wrapper.h
index 06d880b3526c..43a20888bf19 100644
--- a/arch/arm64/include/asm/syscall_wrapper.h
+++ b/arch/arm64/include/asm/syscall_wrapper.h
@@ -8,7 +8,7 @@
 #ifndef __ASM_SYSCALL_WRAPPER_H
 #define __ASM_SYSCALL_WRAPPER_H
 
-struct pt_regs;
+#include <asm/ptrace.h>
 
 #define SC_ARM64_REGS_TO_ARGS(x, ...)				\
 	__MAP(x,__SC_ARGS					\



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux