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-next>] [day] [month] [year] [list]
Date:   Thu, 16 Dec 2021 02:09:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jirislaby:devel 8/33] include/linux/compiler.h:61:23: warning:
 'xmit_buf' is deprecated

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head:   d61595c5423534810c1a3c0d4a88dd2fd81d750c
commit: 8825023d7d2eb9e5dc298ad1996a0c753b2c4580 [8/33] tty: add kfifo to tty_port
config: s390-randconfig-r044-20211215 (https://download.01.org/0day-ci/archive/20211216/202112160239.cdlehqr0-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commit/?id=8825023d7d2eb9e5dc298ad1996a0c753b2c4580
        git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
        git fetch --no-tags jirislaby devel
        git checkout 8825023d7d2eb9e5dc298ad1996a0c753b2c4580
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=s390 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

   drivers/tty/tty_port.c: In function 'tty_port_alloc_xmit_buf':
   drivers/tty/tty_port.c:228:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     228 |         if (port->xmit_buf == NULL)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:228:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     228 |         if (port->xmit_buf == NULL)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   In file included from include/linux/build_bug.h:5,
                    from include/linux/container_of.h:5,
                    from include/linux/list.h:5,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/tty.h:5,
                    from drivers/tty/tty_port.c:8:
>> include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
      61 |         static struct ftrace_branch_data                \
         |                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                                     ^~~~~~~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
      56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   drivers/tty/tty_port.c:228:9: note: in expansion of macro 'if'
     228 |         if (port->xmit_buf == NULL)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:229:17: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     229 |                 port->xmit_buf = (unsigned char *)get_zeroed_page(GFP_KERNEL);
         |                 ^~~~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:231:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     231 |         if (port->xmit_buf == NULL)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:231:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     231 |         if (port->xmit_buf == NULL)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   In file included from include/linux/build_bug.h:5,
                    from include/linux/container_of.h:5,
                    from include/linux/list.h:5,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/tty.h:5,
                    from drivers/tty/tty_port.c:8:
>> include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
      61 |         static struct ftrace_branch_data                \
         |                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                                     ^~~~~~~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
      56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   drivers/tty/tty_port.c:231:9: note: in expansion of macro 'if'
     231 |         if (port->xmit_buf == NULL)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c: In function 'tty_port_free_xmit_buf':
   drivers/tty/tty_port.c:240:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     240 |         if (port->xmit_buf != NULL) {
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:240:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     240 |         if (port->xmit_buf != NULL) {
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   In file included from include/linux/build_bug.h:5,
                    from include/linux/container_of.h:5,
                    from include/linux/list.h:5,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/tty.h:5,
                    from drivers/tty/tty_port.c:8:
>> include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
      61 |         static struct ftrace_branch_data                \
         |                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                                     ^~~~~~~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
      56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   drivers/tty/tty_port.c:240:9: note: in expansion of macro 'if'
     240 |         if (port->xmit_buf != NULL) {
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:241:17: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     241 |                 free_page((unsigned long)port->xmit_buf);
         |                 ^~~~~~~~~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:242:17: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     242 |                 port->xmit_buf = NULL;
         |                 ^~~~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c: In function 'tty_port_destructor':
   drivers/tty/tty_port.c:270:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     270 |         if (port->xmit_buf)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:270:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     270 |         if (port->xmit_buf)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   In file included from include/linux/build_bug.h:5,
                    from include/linux/container_of.h:5,
                    from include/linux/list.h:5,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/tty.h:5,
                    from drivers/tty/tty_port.c:8:
>> include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
      61 |         static struct ftrace_branch_data                \
         |                       ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                                     ^~~~~~~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
      56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   drivers/tty/tty_port.c:270:9: note: in expansion of macro 'if'
     270 |         if (port->xmit_buf)
         |         ^~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~
   drivers/tty/tty_port.c:271:17: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
     271 |                 free_page((unsigned long)port->xmit_buf);
         |                 ^~~~~~~~~
   In file included from include/linux/tty.h:12,
                    from drivers/tty/tty_port.c:8:
   include/linux/tty_port.h:115:34: note: declared here
     115 |                 unsigned char   *xmit_buf __attribute__((deprecated));
         |                                  ^~~~~~~~


vim +/xmit_buf +61 include/linux/compiler.h

a15fd609ad53a6 Linus Torvalds 2019-03-20  59  
a15fd609ad53a6 Linus Torvalds 2019-03-20  60  #define __trace_if_value(cond) ({			\
2bcd521a684cc9 Steven Rostedt 2008-11-21 @61  	static struct ftrace_branch_data		\
e04462fb82f8dd Miguel Ojeda   2018-09-03  62  		__aligned(4)				\
33def8498fdde1 Joe Perches    2020-10-21  63  		__section("_ftrace_branch")		\
a15fd609ad53a6 Linus Torvalds 2019-03-20  64  		__if_trace = {				\
2bcd521a684cc9 Steven Rostedt 2008-11-21  65  			.func = __func__,		\
2bcd521a684cc9 Steven Rostedt 2008-11-21  66  			.file = __FILE__,		\
2bcd521a684cc9 Steven Rostedt 2008-11-21  67  			.line = __LINE__,		\
2bcd521a684cc9 Steven Rostedt 2008-11-21  68  		};					\
a15fd609ad53a6 Linus Torvalds 2019-03-20  69  	(cond) ?					\
a15fd609ad53a6 Linus Torvalds 2019-03-20  70  		(__if_trace.miss_hit[1]++,1) :		\
a15fd609ad53a6 Linus Torvalds 2019-03-20  71  		(__if_trace.miss_hit[0]++,0);		\
a15fd609ad53a6 Linus Torvalds 2019-03-20  72  })
a15fd609ad53a6 Linus Torvalds 2019-03-20  73  

:::::: The code at line 61 was first introduced by commit
:::::: 2bcd521a684cc94befbe2ce7d5b613c841b0d304 trace: profile all if conditionals

:::::: TO: Steven Rostedt <srostedt@...hat.com>
:::::: CC: Ingo Molnar <mingo@...e.hu>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ