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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250209154512.GA18688@redhat.com>
Date: Sun, 9 Feb 2025 16:45:12 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Alex Williamson <alex.williamson@...hat.com>
Cc: bhelgaas@...gle.com, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, mitchell.augustin@...onical.com,
	ilpo.jarvinen@...ux.intel.com
Subject: Re: [PATCH v2] PCI: Batch BAR sizing operations

On 01/20, Alex Williamson wrote:
>
>  static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
>  {
> +	u32 rombar, stdbars[PCI_STD_NUM_BARS];
>  	unsigned int pos, reg;
> +	u16 orig_cmd;
> +
> +	BUILD_BUG_ON(howmany > PCI_STD_NUM_BARS);

FYI, I can't build the kernel after this patch:

	$ make drivers/pci/probe.o
	  UPD     include/config/kernel.release
	  UPD     include/generated/utsrelease.h
	  CALL    scripts/checksyscalls.sh
	  DESCEND objtool
	  INSTALL libsubcmd_headers
	  CC      drivers/pci/probe.o
	In file included from <command-line>:0:0:
	drivers/pci/probe.c: In function ‘pci_read_bases’:
	././include/linux/compiler_types.h:542:38: error: call to ‘__compiletime_assert_338’ declared with attribute error: BUILD_BUG_ON failed: howmany > PCI_STD_NUM_BARS
	  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
					      ^
	././include/linux/compiler_types.h:523:4: note: in definition of macro ‘__compiletime_assert’
	    prefix ## suffix();    \
	    ^
	././include/linux/compiler_types.h:542:2: note: in expansion of macro ‘_compiletime_assert’
	  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
	  ^
	./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
	 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
					     ^
	./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
	  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
	  ^
	drivers/pci/probe.c:348:2: note: in expansion of macro ‘BUILD_BUG_ON’
	  BUILD_BUG_ON(howmany > PCI_STD_NUM_BARS);

Yes, my gcc version 5.3.1 is very old, but according to Documentation/process/changes.rst
it should still be supported, the minimal version is 5.1.

Oleg.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ