• Thomas Richter's avatar
    perf test: Fix test trace+probe_vfs_getname.sh on s390 · 2bbc8353
    Thomas Richter authored
    This test places a kprobe to function getname_flags() in the kernel
    which has the following prototype:
    
      struct filename *getname_flags(const char __user *filename, int flags, int *empty)
    
    The 'filename' argument points to a filename located in user space memory.
    
    Looking at commit 88903c46 ("tracing/probe: Add ustring type for
    user-space string") the kprobe should indicate that user space memory is
    accessed.
    
    Output before:
    
       [root@m35lp76 perf]# ./perf test 66 67
       66: Use vfs_getname probe to get syscall args filenames   : FAILED!
       67: Check open filename arg using perf trace + vfs_getname: FAILED!
       [root@m35lp76 perf]#
    
    Output after:
    
       [root@m35lp76 perf]# ./perf test 66 67
       66: Use vfs_getname probe to get syscall args filenames   : Ok
       67: Check open filename arg using perf trace + vfs_getname: Ok
       [root@m35lp76 perf]#
    
    Comments from Masami Hiramatsu:
    
    This bug doesn't happen on x86 or other archs on which user address
    space...
    2bbc8353
probe_vfs_getname.sh 808 Bytes