From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 288C225613 for ; Wed, 21 Feb 2024 03:35:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708486505; cv=none; b=p71oV6l5RXjnQ5RFsbfKv86sQtUKU2cdfWhrPNySAn1Ec2RsXtqIh4iHsVGA9pms6dTTxUdgHg6ujKxUz4QmzoMwtC2f1gOdNebK2arn0DvPkdmw/FOkNC6dfWs/Aij0QnS3jnVpZPjKmPVm47RxJ6xQYybFuYD8YJT7KV3B8kA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708486505; c=relaxed/simple; bh=tman+kaW9xJ6NOB9RVijG/WgK2n+oftu2CHeCDpTDgw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=KqGja4ODNb1DLQs9yGbL+0WfZLMXHXugUTwy3VjkkVAy8gl7CtMlDs0A/xGxSH/mGMfqbmT6vG12XS4TLsqe7qt9sLI8oqJzPNFHCmem86Zmd5Tx9XHqsqD3dXNnD8RD3KYMmgwARzFr0G8ZtLKT6ml60LLCvkktSWN+fXypdKE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PQ80S+QP; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PQ80S+QP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708486503; x=1740022503; h=date:from:to:cc:subject:message-id:mime-version; bh=tman+kaW9xJ6NOB9RVijG/WgK2n+oftu2CHeCDpTDgw=; b=PQ80S+QPe/ZAuoJzHz5K/AILG/4YHCN1X2lvpqRQ14wDcf+Y4DpjU0VK jqi5Z5K9yI4B+X/FICum/vCRjTdAS6YB3yE6w9DS3DOAXvgPhLCLvzc8D yAkLrdo+QflqgAlelWFZ5RObi8Yc5L9ZhtGHCbxDMgEnEMGQTyzGsOPJ4 0ZIzM7Fa3BjJI19y14oDBQquPtVDXvjE7oAXqpjZIiH+KrC9qCdjmLLHH B3jqOQgPPhx6d2cr7MOHL2Elh1fz9XeoDcC6sxzZgs8cLTTfw+ornUgFT G3zowBUZVJ04UNqBYx9t+ygQfxOpFtRy5eG1QYKdpSgegQEQjt347OEl4 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10990"; a="6445063" X-IronPort-AV: E=Sophos;i="6.06,174,1705392000"; d="scan'208";a="6445063" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2024 19:35:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,174,1705392000"; d="scan'208";a="4971877" Received: from lkp-server02.sh.intel.com (HELO 3c78fa4d504c) ([10.239.97.151]) by fmviesa010.fm.intel.com with ESMTP; 20 Feb 2024 19:35:01 -0800 Received: from kbuild by 3c78fa4d504c with local (Exim 4.96) (envelope-from ) id 1rcdNq-0004yc-1A; Wed, 21 Feb 2024 03:34:58 +0000 Date: Wed, 21 Feb 2024 11:32:33 +0800 From: kernel test robot To: "Gustavo A. R. Silva" Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, "Gustavo A. R. Silva" , LKML Subject: [gustavoars:testing/WFAMNAE-next20240215 1/1] kernel/bpf/core.c:2440:22: warning: comparison of distinct pointer types ('struct bpf_prog_array *' and 'struct bpf_prog_array_hdr *') Message-ID: <202402211137.ShMIWxpm-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/WFAMNAE-next20240215 head: b50c399b249bcb0fdc709e812b4e87519937299d commit: 3fedbc527c5726b876207557fb133a5e558c1898 [1/1] treewide: Address -Wflexible-array-member-not-at-end warnings config: um-allmodconfig (https://download.01.org/0day-ci/archive/20240221/202402211137.ShMIWxpm-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 36adfec155de366d722f2bac8ff9162289dcf06c) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240221/202402211137.ShMIWxpm-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202402211137.ShMIWxpm-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from kernel/bpf/core.c:21: In file included from include/linux/filter.h:9: In file included from include/linux/bpf.h:31: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: 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 kernel/bpf/core.c:21: In file included from include/linux/filter.h:9: In file included from include/linux/bpf.h:31: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: 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 kernel/bpf/core.c:21: In file included from include/linux/filter.h:9: In file included from include/linux/bpf.h:31: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:26: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: 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); | ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 692 | 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] 700 | 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] 708 | 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] 717 | 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] 726 | 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] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ >> kernel/bpf/core.c:2440:22: warning: comparison of distinct pointer types ('struct bpf_prog_array *' and 'struct bpf_prog_array_hdr *') [-Wcompare-distinct-pointer-types] 2440 | if (!progs || progs == &bpf_empty_prog_array.hdr) | ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/core.c:2461:22: warning: comparison of distinct pointer types ('struct bpf_prog_array *' and 'struct bpf_prog_array_hdr *') [-Wcompare-distinct-pointer-types] 2461 | if (!progs || progs == &bpf_empty_prog_array.hdr) | ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ 14 warnings generated. vim +2440 kernel/bpf/core.c 324bda9e6c5add Alexei Starovoitov 2017-10-02 2437 54e9c9d4b506b6 Stanislav Fomichev 2019-05-28 2438 void bpf_prog_array_free(struct bpf_prog_array *progs) 324bda9e6c5add Alexei Starovoitov 2017-10-02 2439 { 46531a30364bd4 Pavel Begunkov 2022-01-27 @2440 if (!progs || progs == &bpf_empty_prog_array.hdr) 324bda9e6c5add Alexei Starovoitov 2017-10-02 2441 return; 324bda9e6c5add Alexei Starovoitov 2017-10-02 2442 kfree_rcu(progs, rcu); 324bda9e6c5add Alexei Starovoitov 2017-10-02 2443 } 324bda9e6c5add Alexei Starovoitov 2017-10-02 2444 :::::: The code at line 2440 was first introduced by commit :::::: 46531a30364bd483bfa1b041c15d42a196e77e93 cgroup/bpf: fast path skb BPF filtering :::::: TO: Pavel Begunkov :::::: CC: Alexei Starovoitov -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki