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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 25 Jun 2020 03:07:11 +0800
From:   kernel test robot <lkp@...el.com>
To:     Nicolas Boichat <drinkcat@...omium.org>,
        linux-kernel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        Kees Cook <keescook@...omium.org>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        Peter Zijlstra <peterz@...radead.org>,
        Vinod Koul <vkoul@...nel.org>
Subject: Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

Hi Nicolas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on tip/perf/core kees/for-next/pstore linus/master v5.8-rc2 next-20200624]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nicolas-Boichat/kernel-trace-Add-TRACING_ALLOW_PRINTK-config-option/20200624-164815
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5e857ce6eae7ca21b2055cca4885545e29228fe2
config: sparc64-randconfig-r022-20200624 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64 

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 >>):

   In file included from include/linux/bits.h:23,
                    from include/linux/bitops.h:5,
                    from include/linux/kernel.h:12,
                    from include/asm-generic/bug.h:19,
                    from arch/sparc/include/asm/bug.h:25,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/usb/cdns3/gadget.c:59:
   drivers/usb/cdns3/gadget.c: In function 'cdns3_start_all_request':
   include/linux/build_bug.h:78:41: error: static assertion failed: "trace_printk called, please enable CONFIG_TRACING_ALLOW_PRINTK."
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
   include/linux/kernel.h:725:2: note: in expansion of macro '__static_assert'
     725 |  __static_assert(    \
         |  ^~~~~~~~~~~~~~~
>> drivers/usb/cdns3/gadget.c:424:4: note: in expansion of macro 'trace_printk'
     424 |    trace_printk("Blocking external request\n");
         |    ^~~~~~~~~~~~

vim +/trace_printk +424 drivers/usb/cdns3/gadget.c

7733f6c32e36ff Pawel Laszczak 2019-08-26  395  
7733f6c32e36ff Pawel Laszczak 2019-08-26  396  /**
7733f6c32e36ff Pawel Laszczak 2019-08-26  397   * cdns3_start_all_request - add to ring all request not started
7733f6c32e36ff Pawel Laszczak 2019-08-26  398   * @priv_dev: Extended gadget object
7733f6c32e36ff Pawel Laszczak 2019-08-26  399   * @priv_ep: The endpoint for whom request will be started.
7733f6c32e36ff Pawel Laszczak 2019-08-26  400   *
7733f6c32e36ff Pawel Laszczak 2019-08-26  401   * Returns return ENOMEM if transfer ring i not enough TRBs to start
7733f6c32e36ff Pawel Laszczak 2019-08-26  402   *         all requests.
7733f6c32e36ff Pawel Laszczak 2019-08-26  403   */
7733f6c32e36ff Pawel Laszczak 2019-08-26  404  static int cdns3_start_all_request(struct cdns3_device *priv_dev,
7733f6c32e36ff Pawel Laszczak 2019-08-26  405  				   struct cdns3_endpoint *priv_ep)
7733f6c32e36ff Pawel Laszczak 2019-08-26  406  {
7733f6c32e36ff Pawel Laszczak 2019-08-26  407  	struct usb_request *request;
7733f6c32e36ff Pawel Laszczak 2019-08-26  408  	int ret = 0;
54c4c69f0baa43 Jayshri Pawar  2019-12-13  409  	u8 pending_empty = list_empty(&priv_ep->pending_req_list);
54c4c69f0baa43 Jayshri Pawar  2019-12-13  410  
54c4c69f0baa43 Jayshri Pawar  2019-12-13  411  	/*
54c4c69f0baa43 Jayshri Pawar  2019-12-13  412  	 * If the last pending transfer is INTERNAL
54c4c69f0baa43 Jayshri Pawar  2019-12-13  413  	 * OR streams are enabled for this endpoint
54c4c69f0baa43 Jayshri Pawar  2019-12-13  414  	 * do NOT start new transfer till the last one is pending
54c4c69f0baa43 Jayshri Pawar  2019-12-13  415  	 */
54c4c69f0baa43 Jayshri Pawar  2019-12-13  416  	if (!pending_empty) {
54c4c69f0baa43 Jayshri Pawar  2019-12-13  417  		struct cdns3_request *priv_req;
54c4c69f0baa43 Jayshri Pawar  2019-12-13  418  
54c4c69f0baa43 Jayshri Pawar  2019-12-13  419  		request = cdns3_next_request(&priv_ep->pending_req_list);
54c4c69f0baa43 Jayshri Pawar  2019-12-13  420  		priv_req = to_cdns3_request(request);
54c4c69f0baa43 Jayshri Pawar  2019-12-13  421  		if ((priv_req->flags & REQUEST_INTERNAL) ||
54c4c69f0baa43 Jayshri Pawar  2019-12-13  422  		    (priv_ep->flags & EP_TDLCHK_EN) ||
54c4c69f0baa43 Jayshri Pawar  2019-12-13  423  			priv_ep->use_streams) {
54c4c69f0baa43 Jayshri Pawar  2019-12-13 @424  			trace_printk("Blocking external request\n");
54c4c69f0baa43 Jayshri Pawar  2019-12-13  425  			return ret;
54c4c69f0baa43 Jayshri Pawar  2019-12-13  426  		}
54c4c69f0baa43 Jayshri Pawar  2019-12-13  427  	}
7733f6c32e36ff Pawel Laszczak 2019-08-26  428  
7733f6c32e36ff Pawel Laszczak 2019-08-26  429  	while (!list_empty(&priv_ep->deferred_req_list)) {
7733f6c32e36ff Pawel Laszczak 2019-08-26  430  		request = cdns3_next_request(&priv_ep->deferred_req_list);
7733f6c32e36ff Pawel Laszczak 2019-08-26  431  
54c4c69f0baa43 Jayshri Pawar  2019-12-13  432  		if (!priv_ep->use_streams) {
7733f6c32e36ff Pawel Laszczak 2019-08-26  433  			ret = cdns3_ep_run_transfer(priv_ep, request);
54c4c69f0baa43 Jayshri Pawar  2019-12-13  434  		} else {
54c4c69f0baa43 Jayshri Pawar  2019-12-13  435  			priv_ep->stream_sg_idx = 0;
54c4c69f0baa43 Jayshri Pawar  2019-12-13  436  			ret = cdns3_ep_run_stream_transfer(priv_ep, request);
54c4c69f0baa43 Jayshri Pawar  2019-12-13  437  		}
7733f6c32e36ff Pawel Laszczak 2019-08-26  438  		if (ret)
7733f6c32e36ff Pawel Laszczak 2019-08-26  439  			return ret;
7733f6c32e36ff Pawel Laszczak 2019-08-26  440  
7733f6c32e36ff Pawel Laszczak 2019-08-26  441  		list_del(&request->list);
7733f6c32e36ff Pawel Laszczak 2019-08-26  442  		list_add_tail(&request->list,
7733f6c32e36ff Pawel Laszczak 2019-08-26  443  			      &priv_ep->pending_req_list);
54c4c69f0baa43 Jayshri Pawar  2019-12-13  444  		if (request->stream_id != 0 || (priv_ep->flags & EP_TDLCHK_EN))
54c4c69f0baa43 Jayshri Pawar  2019-12-13  445  			break;
7733f6c32e36ff Pawel Laszczak 2019-08-26  446  	}
7733f6c32e36ff Pawel Laszczak 2019-08-26  447  
7733f6c32e36ff Pawel Laszczak 2019-08-26  448  	priv_ep->flags &= ~EP_RING_FULL;
7733f6c32e36ff Pawel Laszczak 2019-08-26  449  	return ret;
7733f6c32e36ff Pawel Laszczak 2019-08-26  450  }
7733f6c32e36ff Pawel Laszczak 2019-08-26  451  

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

Download attachment ".config.gz" of type "application/gzip" (31981 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ