Commit f3d8b0eb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 fixes from Vasily Gorbik:

 - Fix isolated VFs handling by verifying that a VF’s parent PF is
   locally owned before registering it in an existing PCI domain

 - Disable arch_test_bit() optimization for PROFILE_ALL_BRANCHES to
   workaround gcc failure in handling __builtin_constant_p() in this
   case

 - Fix CHPID "configure" attribute caching in CIO by not updating the
   cache when SCLP returns no data, ensuring consistent sysfs output

 - Remove CONFIG_LSM from default configs and rely on defaults, which
   enables BPF LSM hook

* tag 's390-6.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/pci: Fix handling of isolated VFs
  s390/pci: Pull search for parent PF out of zpci_iov_setup_virtfn()
  s390/bitops: Disable arch_test_bit() optimization for PROFILE_ALL_BRANCHES
  s390/cio: Fix CHPID "configure" attribute caching
  s390/configs: Remove CONFIG_LSM
parents 24389907 2844ddbd
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -740,7 +740,6 @@ CONFIG_IMA=y
CONFIG_IMA_DEFAULT_HASH_SHA256=y
CONFIG_IMA_WRITE_POLICY=y
CONFIG_IMA_APPRAISE=y
CONFIG_LSM="yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor"
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_CRYPTO_USER=m
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
+0 −1
Original line number Diff line number Diff line
@@ -725,7 +725,6 @@ CONFIG_IMA=y
CONFIG_IMA_DEFAULT_HASH_SHA256=y
CONFIG_IMA_WRITE_POLICY=y
CONFIG_IMA_APPRAISE=y
CONFIG_LSM="yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor"
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_CRYPTO_FIPS=y
CONFIG_CRYPTO_USER=m
+0 −1
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ CONFIG_ZFCP=y
# CONFIG_INOTIFY_USER is not set
# CONFIG_MISC_FILESYSTEMS is not set
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_LSM="yama,loadpin,safesetid,integrity"
# CONFIG_ZLIB_DFLTCC is not set
CONFIG_XZ_DEC_MICROLZMA=y
CONFIG_PRINTK_TIME=y
+5 −1
Original line number Diff line number Diff line
@@ -53,7 +53,11 @@ static __always_inline bool arch_test_bit(unsigned long nr, const volatile unsig
	unsigned long mask;
	int cc;

	if (__builtin_constant_p(nr)) {
	/*
	 * With CONFIG_PROFILE_ALL_BRANCHES enabled gcc fails to
	 * handle __builtin_constant_p() in some cases.
	 */
	if (!IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && __builtin_constant_p(nr)) {
		addr = (const volatile unsigned char *)ptr;
		addr += (nr ^ (BITS_PER_LONG - BITS_PER_BYTE)) / BITS_PER_BYTE;
		mask = 1UL << (nr & (BITS_PER_BYTE - 1));
+20 −0
Original line number Diff line number Diff line
@@ -331,6 +331,17 @@ static int zpci_bus_add_device(struct zpci_bus *zbus, struct zpci_dev *zdev)
	return rc;
}

static bool zpci_bus_is_isolated_vf(struct zpci_bus *zbus, struct zpci_dev *zdev)
{
	struct pci_dev *pdev;

	pdev = zpci_iov_find_parent_pf(zbus, zdev);
	if (!pdev)
		return true;
	pci_dev_put(pdev);
	return false;
}

int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops)
{
	bool topo_is_tid = zdev->tid_avail;
@@ -345,6 +356,15 @@ int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops)

	topo = topo_is_tid ? zdev->tid : zdev->pchid;
	zbus = zpci_bus_get(topo, topo_is_tid);
	/*
	 * An isolated VF gets its own domain/bus even if there exists
	 * a matching domain/bus already
	 */
	if (zbus && zpci_bus_is_isolated_vf(zbus, zdev)) {
		zpci_bus_put(zbus);
		zbus = NULL;
	}

	if (!zbus) {
		zbus = zpci_bus_alloc(topo, topo_is_tid);
		if (!zbus)
Loading