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]
Message-ID: <202406041854.1Ad8rnRn-lkp@intel.com>
Date: Tue, 4 Jun 2024 19:29:28 +0800
From: kernel test robot <lkp@...el.com>
To: Andreas Kemnade <andreas@...nade.info>, marcel@...tmann.org,
	luiz.dentz@...il.com, johan@...nel.org, gregkh@...uxfoundation.org,
	jirislaby@...nel.org, pmenzel@...gen.mpg.de,
	linux-kernel@...r.kernel.org, linux-bluetooth@...r.kernel.org,
	Adam Ford <aford173@...il.com>, Tony Lindgren <tony@...mide.com>,
	tomi.valkeinen@...asonboard.com,
	Péter Ujfalusi <peter.ujfalusi@...il.com>,
	robh@...nel.org, hns@...delico.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH v3 3/4] gnss: Add driver for AI2 protocol

Hi Andreas,

kernel test robot noticed the following build errors:

[auto build test ERROR on bluetooth/master]
[also build test ERROR on bluetooth-next/master char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.10-rc2 next-20240604]
[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/Andreas-Kemnade/gnss-Add-AI2-protocol-used-by-some-TI-combo-chips/20240603-224753
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link:    https://lore.kernel.org/r/20240603144400.2195564-4-andreas%40kemnade.info
patch subject: [PATCH v3 3/4] gnss: Add driver for AI2 protocol
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20240604/202406041854.1Ad8rnRn-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project d7d2d4f53fc79b4b58e8d8d08151b577c3699d4a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240604/202406041854.1Ad8rnRn-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406041854.1Ad8rnRn-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/gnss/ai2.c:9:
   In file included from include/linux/gnss.h:13:
   In file included from include/linux/kfifo.h:42:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2210:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/gnss/ai2.c:9:
   In file included from include/linux/gnss.h:13:
   In file included from include/linux/kfifo.h:42:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     547 |         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]
     560 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from drivers/gnss/ai2.c:9:
   In file included from include/linux/gnss.h:13:
   In file included from include/linux/kfifo.h:42:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     573 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from drivers/gnss/ai2.c:9:
   In file included from include/linux/gnss.h:13:
   In file included from include/linux/kfifo.h:42:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     584 |         __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]
     594 |         __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]
     604 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
>> drivers/gnss/ai2.c:340:6: error: call to undeclared function 'get_unaligned_le16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     340 |         if (get_unaligned_le16(data + i) != sum) {
         |             ^
   7 warnings and 1 error generated.


vim +/get_unaligned_le16 +340 drivers/gnss/ai2.c

   324	
   325	/* do some sanity checks and split frame into packets */
   326	static void process_ai2_frame(struct ai2_device *ai2dev)
   327	{
   328		u16 sum;
   329		int i;
   330		u8 *head;
   331		u8 *data;
   332	
   333		sum = 0;
   334		data = ai2dev->recv_skb->data;
   335		for (i = 0; i < ai2dev->recv_skb->len - 2; i++)
   336			sum += data[i];
   337	
   338		print_hex_dump_bytes("ai2 frame: ", DUMP_PREFIX_OFFSET, data, ai2dev->recv_skb->len);
   339	
 > 340		if (get_unaligned_le16(data + i) != sum) {
   341			dev_dbg(ai2dev->dev,
   342				"checksum error in reception, dropping frame\n");
   343			return;
   344		}
   345	
   346		/* reached if byte 1 in the command packet is set to 1 */
   347		if (data[1] == AI2_ACK)
   348			return;
   349	
   350		head = skb_pull(ai2dev->recv_skb, 2); /* drop frame start marker */
   351		while (head && (ai2dev->recv_skb->len >= 3)) {
   352			u8 cmd;
   353			u16 pktlen;
   354	
   355			cmd = head[0];
   356			pktlen = get_unaligned_le16(head + 1);
   357			data = skb_pull(ai2dev->recv_skb, 3);
   358			if (!data)
   359				break;
   360	
   361			if (pktlen > ai2dev->recv_skb->len)
   362				break;
   363	
   364			head = skb_pull(ai2dev->recv_skb, pktlen);
   365	
   366			process_ai2_packet(ai2dev, cmd, data, pktlen);
   367		}
   368	}
   369	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ