lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 14 Dec 2022 05:51:01 +0800
From:   kernel test robot <lkp@...el.com>
To:     Donglin Peng <dolinux.peng@...il.com>, rostedt@...dmis.org
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        mhiramat@...nel.org, xiehuan09@...il.com,
        linux-kernel@...r.kernel.org, Donglin Peng <dolinux.peng@...il.com>
Subject: Re: [PATCH] tracing/probe: add a char type to print the character
 value of traced arguments

Hi Donglin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on rostedt-trace/for-next]
[cannot apply to rostedt-trace/for-next-urgent]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Donglin-Peng/tracing-probe-add-a-char-type-to-print-the-character-value-of-traced-arguments/20221213-195552
patch link:    https://lore.kernel.org/r/20221213115304.3964458-1-dolinux.peng%40gmail.com
patch subject: [PATCH] tracing/probe: add a char type to print the character value of traced arguments
config: s390-randconfig-r044-20221213
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6e4cea55f0d1104408b26ac574566a0e4de48036)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/c09eb24f0c2c27ce649aed5360dcf3299b636de6
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Donglin-Peng/tracing-probe-add-a-char-type-to-print-the-character-value-of-traced-arguments/20221213-195552
        git checkout c09eb24f0c2c27ce649aed5360dcf3299b636de6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash kernel/trace/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from kernel/trace/trace_probe.c:14:
   In file included from kernel/trace/trace_probe.h:28:
   In file included from kernel/trace/trace.h:9:
   In file included from include/linux/clocksource.h:22:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from kernel/trace/trace_probe.c:14:
   In file included from kernel/trace/trace_probe.h:28:
   In file included from kernel/trace/trace.h:9:
   In file included from include/linux/clocksource.h:22:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from kernel/trace/trace_probe.c:14:
   In file included from kernel/trace/trace_probe.h:28:
   In file included from kernel/trace/trace.h:9:
   In file included from include/linux/clocksource.h:22:
   In file included from arch/s390/include/asm/io.h:75:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
>> kernel/trace/trace_probe.c:53:1: warning: no previous prototype for function 'print_type_char' [-Wmissing-prototypes]
   DEFINE_BASIC_PRINT_TYPE_FUNC(char, u8, "%c")
   ^
   kernel/trace/trace_probe.c:34:5: note: expanded from macro 'DEFINE_BASIC_PRINT_TYPE_FUNC'
   int PRINT_TYPE_FUNC_NAME(tname)(struct trace_seq *s, void *data, void *ent)\
       ^
   kernel/trace/trace_probe.h:146:36: note: expanded from macro 'PRINT_TYPE_FUNC_NAME'
   #define PRINT_TYPE_FUNC_NAME(type)      print_type_##type
                                           ^
   <scratch space>:93:1: note: expanded from here
   print_type_char
   ^
   kernel/trace/trace_probe.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   DEFINE_BASIC_PRINT_TYPE_FUNC(char, u8, "%c")
   ^
   static 
   kernel/trace/trace_probe.c:33:58: note: expanded from macro 'DEFINE_BASIC_PRINT_TYPE_FUNC'
   #define DEFINE_BASIC_PRINT_TYPE_FUNC(tname, type, fmt)                  \
                                                                           ^
   13 warnings generated.


vim +/print_type_char +53 kernel/trace/trace_probe.c

    40	
    41	DEFINE_BASIC_PRINT_TYPE_FUNC(u8,  u8,  "%u")
    42	DEFINE_BASIC_PRINT_TYPE_FUNC(u16, u16, "%u")
    43	DEFINE_BASIC_PRINT_TYPE_FUNC(u32, u32, "%u")
    44	DEFINE_BASIC_PRINT_TYPE_FUNC(u64, u64, "%Lu")
    45	DEFINE_BASIC_PRINT_TYPE_FUNC(s8,  s8,  "%d")
    46	DEFINE_BASIC_PRINT_TYPE_FUNC(s16, s16, "%d")
    47	DEFINE_BASIC_PRINT_TYPE_FUNC(s32, s32, "%d")
    48	DEFINE_BASIC_PRINT_TYPE_FUNC(s64, s64, "%Ld")
    49	DEFINE_BASIC_PRINT_TYPE_FUNC(x8,  u8,  "0x%x")
    50	DEFINE_BASIC_PRINT_TYPE_FUNC(x16, u16, "0x%x")
    51	DEFINE_BASIC_PRINT_TYPE_FUNC(x32, u32, "0x%x")
    52	DEFINE_BASIC_PRINT_TYPE_FUNC(x64, u64, "0x%Lx")
  > 53	DEFINE_BASIC_PRINT_TYPE_FUNC(char, u8, "%c")
    54	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (149523 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ