[PATCH 0/9] Clean up some old patches post F31
by Laura Abbott
I'd like to drop a bunch of patches Fedora has been carrying since
forever. Most of these are fairly minor tweaks most people forgot
we had and nobody cares about. My motivation is both in the spirit
of cleaning up and also to better align Fedora + RHEL (I had a talk
about this at Flock, video should be up soon).
If someone wants to make an effort at upstreaming any of these, feel
free to do so but I really think most of these are cruft.
Thanks,
Laura
Laura Abbott (9):
Drop namespaces config tweak
Drop cpumask auto select patch
Drop scsi warning patch
Remove ancient ath9k workaround
Drop old lis3 patch
Remove some old modalias adjustments
Remove old keyboard logging patch
Remove patch for GCC VTA
Remove crash driver
Kbuild-Add-an-option-to-enable-GCC-VTA.patch | 94 ---
ath9k-rx-dma-stop-check.patch | 38 -
.../fedora/generic/x86/x86_64/CONFIG_NR_CPUS | 2 +-
crash-driver.patch | 722 ------------------
die-floppy-die.patch | 29 -
input-kill-stupid-messages.patch | 30 -
kernel.spec | 20 -
...-CPUMASK_OFFSTACK-usable-without-deb.patch | 34 -
lis3-improve-handling-of-null-rate.patch | 75 --
namespaces-no-expert.patch | 27 -
no-pcspkr-modalias.patch | 22 -
...validate_disk-prevent-NULL-ptr-deref.patch | 39 -
12 files changed, 1 insertion(+), 1131 deletions(-)
delete mode 100644 Kbuild-Add-an-option-to-enable-GCC-VTA.patch
delete mode 100644 ath9k-rx-dma-stop-check.patch
delete mode 100644 crash-driver.patch
delete mode 100644 die-floppy-die.patch
delete mode 100644 input-kill-stupid-messages.patch
delete mode 100644 lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
delete mode 100644 lis3-improve-handling-of-null-rate.patch
delete mode 100644 namespaces-no-expert.patch
delete mode 100644 no-pcspkr-modalias.patch
delete mode 100644 scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
--
2.21.0
3 years, 11 months
[PATCH] Enable CONFIG_DEBUG_INFO_BTF option
by Jiri Olsa
hi,
please consider attached patch for fedora kernel.spec.
It enables CONFIG_DEBUG_INFO_BTF options to export BTF
info in /sys/kernel/btf/vmlinux file.
I tested on x86_64/s390x/aarach64/ppc servers and the
file /sys/kernel/btf/vmlinux shows correctly.
I checked the armv7hl arch build.log and it containes
the pahole execution, so I assume it's generated properly.
brew: https://koji.fedoraproject.org/koji/taskinfo?taskID=38681853
thanks,
jirka
---
Plus adding dwarves build dependency which is needed
for BTF debuginfo to be generated and attached to kernel.
Signed-off-by: Jiri Olsa <jolsa(a)kernel.org>
---
configs/fedora/generic/CONFIG_DEBUG_INFO_BTF | 2 +-
kernel-aarch64-debug.config | 2 +-
kernel-aarch64.config | 2 +-
kernel-armv7hl-debug.config | 2 +-
kernel-armv7hl-lpae-debug.config | 2 +-
kernel-armv7hl-lpae.config | 2 +-
kernel-armv7hl.config | 2 +-
kernel-i686-debug.config | 2 +-
kernel-i686.config | 2 +-
kernel-ppc64le-debug.config | 2 +-
kernel-ppc64le.config | 2 +-
kernel-s390x-debug.config | 2 +-
kernel-s390x.config | 2 +-
kernel-x86_64-debug.config | 2 +-
kernel-x86_64.config | 2 +-
kernel.spec | 3 ++-
16 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/configs/fedora/generic/CONFIG_DEBUG_INFO_BTF b/configs/fedora/generic/CONFIG_DEBUG_INFO_BTF
index 3b5ac748f282..39227b4511af 100644
--- a/configs/fedora/generic/CONFIG_DEBUG_INFO_BTF
+++ b/configs/fedora/generic/CONFIG_DEBUG_INFO_BTF
@@ -1 +1 @@
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config
index 25917ed7c0a2..f40220d5c179 100644
--- a/kernel-aarch64-debug.config
+++ b/kernel-aarch64-debug.config
@@ -1289,7 +1289,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-aarch64.config b/kernel-aarch64.config
index aaa967b286df..55f21773af73 100644
--- a/kernel-aarch64.config
+++ b/kernel-aarch64.config
@@ -1289,7 +1289,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-armv7hl-debug.config b/kernel-armv7hl-debug.config
index d7d7a9f0a485..d54ce8ceb0e9 100644
--- a/kernel-armv7hl-debug.config
+++ b/kernel-armv7hl-debug.config
@@ -1279,7 +1279,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-armv7hl-lpae-debug.config b/kernel-armv7hl-lpae-debug.config
index adda1dc48d4e..e049ebdddacf 100644
--- a/kernel-armv7hl-lpae-debug.config
+++ b/kernel-armv7hl-lpae-debug.config
@@ -1239,7 +1239,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-armv7hl-lpae.config b/kernel-armv7hl-lpae.config
index b3788525651d..e572f653140f 100644
--- a/kernel-armv7hl-lpae.config
+++ b/kernel-armv7hl-lpae.config
@@ -1239,7 +1239,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-armv7hl.config b/kernel-armv7hl.config
index 6e8ea6ec9783..e840ac68c870 100644
--- a/kernel-armv7hl.config
+++ b/kernel-armv7hl.config
@@ -1279,7 +1279,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-i686-debug.config b/kernel-i686-debug.config
index 7ef076f3646f..bd6a05f5004f 100644
--- a/kernel-i686-debug.config
+++ b/kernel-i686-debug.config
@@ -1047,7 +1047,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-i686.config b/kernel-i686.config
index 597f8233c8af..a2e8941d433c 100644
--- a/kernel-i686.config
+++ b/kernel-i686.config
@@ -1046,7 +1046,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config
index f3db93aef02c..bab3a555a9ad 100644
--- a/kernel-ppc64le-debug.config
+++ b/kernel-ppc64le-debug.config
@@ -975,7 +975,7 @@ CONFIG_DEBUGGER=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config
index 0b421851571d..b2f334f4f818 100644
--- a/kernel-ppc64le.config
+++ b/kernel-ppc64le.config
@@ -974,7 +974,7 @@ CONFIG_DEBUGGER=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-s390x-debug.config b/kernel-s390x-debug.config
index c5e323fc7534..3e6a04264f0b 100644
--- a/kernel-s390x-debug.config
+++ b/kernel-s390x-debug.config
@@ -985,7 +985,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-s390x.config b/kernel-s390x.config
index e61d0d5888e6..6915b19b141d 100644
--- a/kernel-s390x.config
+++ b/kernel-s390x.config
@@ -984,7 +984,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config
index c1cc5697b34b..86a8d050eecc 100644
--- a/kernel-x86_64-debug.config
+++ b/kernel-x86_64-debug.config
@@ -1082,7 +1082,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel-x86_64.config b/kernel-x86_64.config
index 25e8456ada0a..6140186ea49c 100644
--- a/kernel-x86_64.config
+++ b/kernel-x86_64.config
@@ -1081,7 +1081,7 @@ CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_DEBUG_HIGHMEM=y
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-# CONFIG_DEBUG_INFO_BTF is not set
+CONFIG_DEBUG_INFO_BTF=y
# CONFIG_DEBUG_INFO_DWARF4 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
diff --git a/kernel.spec b/kernel.spec
index 25ef410900c4..999efa25f81f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -501,7 +501,7 @@ Requires: kernel-modules-uname-r = %{KVERREL}%{?variant}
BuildRequires: kmod, patch, bash, tar, git-core
BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk
BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex
-BuildRequires: net-tools, hostname, bc, elfutils-devel
+BuildRequires: net-tools, hostname, bc, elfutils-devel, dwarves
%if 0%{?fedora}
# Used to mangle unversioned shebangs to be Python 3
BuildRequires: /usr/bin/pathfix.py
@@ -530,6 +530,7 @@ BuildConflicts: rhbuildsys(DiskFree) < 500Mb
%if %{with_debuginfo}
BuildRequires: rpm-build, elfutils
BuildConflicts: rpm < 4.13.0.1-19
+BuildConflicts: dwarves < 1.13
# Most of these should be enabled after more investigation
%undefine _include_minidebuginfo
%undefine _find_debuginfo_dwz_opts
--
2.21.0
3 years, 11 months
New subpackages for Fedora
by Laura Abbott
Some of the downstream work I'm looking to bring back into Fedora is
some new subpackages. Here's a brief explanation of what I'd like to
bring in:
- several packages with 'kabi' in the name. These are related to downstream
ABI guarantees. All of the packages would be turned off for Fedora. No
Fedora isn't getting any ABI guarantee.
- ipaclones: this is related to kpatch support. This package will be turned
off in Fedora. There are no plans to get kpatch support for Fedora at
this time but like any feature if it makes sense to support it in the
future we would consider it.
- selftests: These are some bpf related selftests. This package will be
turned off in Fedora.
- modules-internal: Downstream wanted to designate a set of modules
that get turned on but are not officially shipped. The existing
design ends up building this package unconditionally so I was planning
on bringing this in for Fedora. There are currently 4 modules that
are designated for this package at the moment:
mac80211_hwsim
netdevsim
pktgen
rocker
None of these seem like things that would be used in a regular Fedora
system so I think it would be safe to move them around.
I don't expect any of these changes to be particularly controversial
but please let me know if you see any issue with this.
I have a tree at https://pagure.io/fedora-kernel-labbott/tree/align_fedora_oct25
with everything I'd like to bring in. I've been testing and everything seems
to work fine. If there are no objections, I plan to bring this in sometime
next week.
Thanks,
Laura
3 years, 11 months
Talk from Flock up and a note on some upcoming work
by Laura Abbott
If you didn't get a chance to see it, the talk I gave at Flock is up
https://www.youtube.com/watch?v=kb2VS2_P6Ts . I'm linking this not
for self-promotion but to give a heads up that some of the work
related to this talk may start to land in Fedora. Some of the boring
cleanup work will just go in but for some of the bigger pieces
I'll post here to see if anyone has any objections.
The goal is to eventually get a src-git that we can use as the daily
driver for most of the Fedora work. When that switch over will actually
happen depends on when we get a tree that meets Fedora needs. I don't
want to regress Fedora or violate any packaging guidelines or make
anything harder.
If you have any questions, feel free to reach out to me.
Thanks,
Laura
3 years, 11 months
How to properly PATCH F30 kernel to resolve GPU PASSTHROUGH Header
Error Code 127
by Kot Begemot
Hi all,
my inquiry concerns the "Building the Fedora Kernel" article (See https://fedoramagazine.org/building-fedora-kernel/, "Building the Fedora Kernel by Laura Abbot, 09/06/2019 stating that "Two common reasons to rebuild the kernel are to . . . add patches"; Also See https://docs.pagure.org/docs-fedora/building-custom-kernel.html).
Specifically, I would like to apply the below-listed PATCH to kernel 5.2.18-200.fc30.x86_64 to patch to resolve a Header Error Code 127 error received when attempting GPU pass-through on a 2700X Taichi Ultimate ( PATCH: https://clbin.com/VCiYJ, patch code listed at the end).
I am running the following Build:
Motherboard: ASRock, X470 Taichi Ultimate
BIOS Version: BIOS 3.3P
CPU: AMD Ryzen 7 2700X
HDDs:
Host Linux: Samsung Electronics NVMe SSD Controller SM961/PM961,
Windows(7/10) VMSamsung SSD 860
GPUs:
Host Linux: PNY nVidia Quadro M2000,
VM Pass-through: EVGA nVidia GeForce GTX 760; Linux: Fedora 30
Kernel: 5.2.18-200.fc30.x86_64).
I have been through several materials including (https://unix.stackexchange.com/questions/475128/is-there-a-quick-way-to-i... describing how to get a particular build using koji; https://docs.fedoraproject.org/en-US/quick-docs/kernel/build-custom-kernel/ describing how to build the kernel via fedpkg and git; https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators... directed to upgrading the kernel; https://fedoraproject.org/wiki/Building_a_custom_kernel/Source_RPM describing how to build the kernel from RPMS using rpmdev-setuptree and koji; https://fedoraproject.org/wiki/Building_a_custom_kernel#Dependencies_for_... describing how to building the kernel via fedpkg and git; https://fedoramagazine.org/building-fedora-kernel/ describing how to build the kernel and listing two main reasons for doing so; https://docs.pagure.org/docs-fedora/building-
custom-kernel.html crediting "Building the Fedora Kernel"; https://fedoramagazine.org/install-kernel-koji/ describing how to install a kernel from koji; https://github.com/AcidzDev/CentOS-header127/blob/master/CentOS-127patch.sh listing patch -p1 < pci.patch as the way to apply a patch to a kernel downloaded via wget from wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.3.1.tar.xz). I have also inquired at level1techs https://forum.level1techs.com/t/windows-10vm-gpu-passthrough-pci-header-e... and the Fedora Forum https://forums.fedoraforum.org/showthread.php?322470-F30-how-to-apply-PAT....
At this point am somewhat overwhelemed with information and am unable to figure out how to properly apply this patch kernel 5.2.18-200.fc30.x86_64.
When attempting to compile and patch using koji (instructions at https://fedoraproject.org/wiki/Build...nel/Source_RPM), I am not sure how to apply the patch because there is only the kernel.spec and source which does not have any .c or .h files. Editing the kernel.spec file and copying the patch to ~/rpmbuild/SOURCES makes the build process fail. So I am kinda stuck here.
On the other hand, going the git and fedpkg route (https://docs.fedoraproject.org/en-US...custom-kernel/, https://fedoramagazine.org/building-fedora-kernel/; https://docs.pagure.org/docs-fedora/...om-kernel.html), I am not able to download a specific kernel version and always get a 5.3 kernel instead of the 5.2.18-200 that I am currently running. In fact, I tried it again yesterday and received the kernel-5.4.0-0.rc2.git2.1.fc30.x86_64.rpm.
It seems that the above-listed two ways are just two similar approaches to accomplishing the same task. Either way, I just cannot get the result I am looking for: a patched 5.2.18-200.fc30.x86_64 kernel with the ability to install NVIDIA drivers, do GPU pass-through and update later via "dnf update"
I must be missing something and any help is welcome.
The PATCH code is below
PATCH: https://clbin.com/VCiYJ (patche code listed at the end)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 766f5779db92..dc19079dad1b 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -52,6 +52,9 @@ unsigned int pci_pm_d3_delay;
static void pci_pme_list_scan(struct work_struct *work);
+static void pci_dev_save_and_disable(struct pci_dev *dev);
+static void pci_dev_restore(struct pci_dev *dev);
+
static LIST_HEAD(pci_pme_list);
static DEFINE_MUTEX(pci_pme_list_mutex);
static DECLARE_DELAYED_WORK(pci_pme_work, pci_pme_list_scan);
@@ -1379,15 +1382,7 @@ static void pci_restore_config_space(struct pci_dev *pdev)
pci_restore_config_space_range(pdev, 4, 9, 10, false);
pci_restore_config_space_range(pdev, 0, 3, 0, false);
} else if (pdev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
- pci_restore_config_space_range(pdev, 12, 15, 0, false);
-
- /*
- * Force rewriting of prefetch registers to avoid S3 resume
- * issues on Intel PCI bridges that occur when these
- * registers are not explicitly written.
- */
- pci_restore_config_space_range(pdev, 9, 11, 0, true);
- pci_restore_config_space_range(pdev, 0, 8, 0, false);
+ pci_restore_config_space_range(pdev, 0, 15, 0, true);
} else {
pci_restore_config_space_range(pdev, 0, 15, 0, false);
}
@@ -4636,6 +4631,8 @@ void pci_reset_secondary_bus(struct pci_dev *dev)
{
u16 ctrl;
+ pci_dev_save_and_disable(dev);
+
pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &ctrl);
ctrl |= PCI_BRIDGE_CTL_BUS_RESET;
pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl);
@@ -4649,6 +4646,8 @@ void pci_reset_secondary_bus(struct pci_dev *dev)
ctrl &= ~PCI_BRIDGE_CTL_BUS_RESET;
pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl);
+ pci_dev_restore(dev);
+
/*
* Trhfa for conventional PCI is 2^25 clock cycles.
* Assuming a minimum 33MHz clock this results in a 1s
3 years, 11 months
[PATCH] configs: fix typo "CONFIG_DRM_TDFX=n"
by Paul Bolle
Signed-off-by: Paul Bolle <pebolle(a)tiscali.nl>
---
Eyeball tested only. Finger crossed!
configs/fedora/generic/CONFIG_DRM_TDFX | 2 +-
kernel-aarch64-debug.config | 2 +-
kernel-aarch64.config | 2 +-
kernel-armv7hl-debug.config | 2 +-
kernel-armv7hl-lpae-debug.config | 2 +-
kernel-armv7hl-lpae.config | 2 +-
kernel-armv7hl.config | 2 +-
kernel-i686-debug.config | 2 +-
kernel-i686.config | 2 +-
kernel-ppc64le-debug.config | 2 +-
kernel-ppc64le.config | 2 +-
kernel-s390x-debug.config | 2 +-
kernel-s390x.config | 2 +-
kernel-x86_64-debug.config | 2 +-
kernel-x86_64.config | 2 +-
15 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/configs/fedora/generic/CONFIG_DRM_TDFX b/configs/fedora/generic/CONFIG_DRM_TDFX
index 6981699538e9..36f8ba1f9344 100644
--- a/configs/fedora/generic/CONFIG_DRM_TDFX
+++ b/configs/fedora/generic/CONFIG_DRM_TDFX
@@ -1 +1 @@
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config
index 4b1ce9112b4b..282ec4e473a7 100644
--- a/kernel-aarch64-debug.config
+++ b/kernel-aarch64-debug.config
@@ -1573,7 +1573,7 @@ CONFIG_DRM_SUN4I=m
CONFIG_DRM_SUN6I_DSI=m
CONFIG_DRM_SUN8I_DW_HDMI=m
CONFIG_DRM_SUN8I_MIXER=m
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_TEGRA_DEBUG is not set
CONFIG_DRM_TEGRA=m
CONFIG_DRM_TEGRA_STAGING=y
diff --git a/kernel-aarch64.config b/kernel-aarch64.config
index 21df2fad32d8..097f21ffa4b6 100644
--- a/kernel-aarch64.config
+++ b/kernel-aarch64.config
@@ -1565,7 +1565,7 @@ CONFIG_DRM_SUN4I=m
CONFIG_DRM_SUN6I_DSI=m
CONFIG_DRM_SUN8I_DW_HDMI=m
CONFIG_DRM_SUN8I_MIXER=m
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_TEGRA_DEBUG is not set
CONFIG_DRM_TEGRA=m
CONFIG_DRM_TEGRA_STAGING=y
diff --git a/kernel-armv7hl-debug.config b/kernel-armv7hl-debug.config
index f94f3971be1b..b100b87683ce 100644
--- a/kernel-armv7hl-debug.config
+++ b/kernel-armv7hl-debug.config
@@ -1600,7 +1600,7 @@ CONFIG_DRM_SUN4I=m
CONFIG_DRM_SUN6I_DSI=m
CONFIG_DRM_SUN8I_DW_HDMI=m
CONFIG_DRM_SUN8I_MIXER=m
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_TEGRA_DEBUG is not set
CONFIG_DRM_TEGRA=m
CONFIG_DRM_TEGRA_STAGING=y
diff --git a/kernel-armv7hl-lpae-debug.config b/kernel-armv7hl-lpae-debug.config
index 3941abcffc40..398a082d8926 100644
--- a/kernel-armv7hl-lpae-debug.config
+++ b/kernel-armv7hl-lpae-debug.config
@@ -1541,7 +1541,7 @@ CONFIG_DRM_SUN4I=m
CONFIG_DRM_SUN6I_DSI=m
CONFIG_DRM_SUN8I_DW_HDMI=m
CONFIG_DRM_SUN8I_MIXER=m
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_TEGRA_DEBUG is not set
CONFIG_DRM_TEGRA=m
CONFIG_DRM_TEGRA_STAGING=y
diff --git a/kernel-armv7hl-lpae.config b/kernel-armv7hl-lpae.config
index 02461d14b794..394e0933ef83 100644
--- a/kernel-armv7hl-lpae.config
+++ b/kernel-armv7hl-lpae.config
@@ -1534,7 +1534,7 @@ CONFIG_DRM_SUN4I=m
CONFIG_DRM_SUN6I_DSI=m
CONFIG_DRM_SUN8I_DW_HDMI=m
CONFIG_DRM_SUN8I_MIXER=m
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_TEGRA_DEBUG is not set
CONFIG_DRM_TEGRA=m
CONFIG_DRM_TEGRA_STAGING=y
diff --git a/kernel-armv7hl.config b/kernel-armv7hl.config
index 6cc7b413783d..450cee04bb1b 100644
--- a/kernel-armv7hl.config
+++ b/kernel-armv7hl.config
@@ -1593,7 +1593,7 @@ CONFIG_DRM_SUN4I=m
CONFIG_DRM_SUN6I_DSI=m
CONFIG_DRM_SUN8I_DW_HDMI=m
CONFIG_DRM_SUN8I_MIXER=m
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_TEGRA_DEBUG is not set
CONFIG_DRM_TEGRA=m
CONFIG_DRM_TEGRA_STAGING=y
diff --git a/kernel-i686-debug.config b/kernel-i686-debug.config
index 272fe3f12912..47186c2dea5d 100644
--- a/kernel-i686-debug.config
+++ b/kernel-i686-debug.config
@@ -1317,7 +1317,7 @@ CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_SII902X is not set
CONFIG_DRM_SII9234=m
# CONFIG_DRM_SIL_SII8620 is not set
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TINYDRM is not set
CONFIG_DRM_TI_SN65DSI86=m
diff --git a/kernel-i686.config b/kernel-i686.config
index f9c8e2035edc..5dfc4c9bc5a7 100644
--- a/kernel-i686.config
+++ b/kernel-i686.config
@@ -1308,7 +1308,7 @@ CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_SII902X is not set
CONFIG_DRM_SII9234=m
# CONFIG_DRM_SIL_SII8620 is not set
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TINYDRM is not set
CONFIG_DRM_TI_SN65DSI86=m
diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config
index 82585d81a157..7865171eb13f 100644
--- a/kernel-ppc64le-debug.config
+++ b/kernel-ppc64le-debug.config
@@ -1214,7 +1214,7 @@ CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_SII902X is not set
CONFIG_DRM_SII9234=m
# CONFIG_DRM_SIL_SII8620 is not set
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TINYDRM is not set
CONFIG_DRM_TI_SN65DSI86=m
diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config
index 0c7b7bcafc4d..2377bcd61e22 100644
--- a/kernel-ppc64le.config
+++ b/kernel-ppc64le.config
@@ -1205,7 +1205,7 @@ CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_SII902X is not set
CONFIG_DRM_SII9234=m
# CONFIG_DRM_SIL_SII8620 is not set
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TINYDRM is not set
CONFIG_DRM_TI_SN65DSI86=m
diff --git a/kernel-s390x-debug.config b/kernel-s390x-debug.config
index c325d31ba282..2344597a3caa 100644
--- a/kernel-s390x-debug.config
+++ b/kernel-s390x-debug.config
@@ -1222,7 +1222,7 @@ CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_SII902X is not set
CONFIG_DRM_SII9234=m
# CONFIG_DRM_SIL_SII8620 is not set
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TINYDRM is not set
CONFIG_DRM_TI_SN65DSI86=m
diff --git a/kernel-s390x.config b/kernel-s390x.config
index 3ff05de88726..08029e7481c2 100644
--- a/kernel-s390x.config
+++ b/kernel-s390x.config
@@ -1213,7 +1213,7 @@ CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_SII902X is not set
CONFIG_DRM_SII9234=m
# CONFIG_DRM_SIL_SII8620 is not set
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TINYDRM is not set
CONFIG_DRM_TI_SN65DSI86=m
diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config
index a40147d602da..4b02a2477b9e 100644
--- a/kernel-x86_64-debug.config
+++ b/kernel-x86_64-debug.config
@@ -1360,7 +1360,7 @@ CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_SII902X is not set
CONFIG_DRM_SII9234=m
# CONFIG_DRM_SIL_SII8620 is not set
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TINYDRM is not set
CONFIG_DRM_TI_SN65DSI86=m
diff --git a/kernel-x86_64.config b/kernel-x86_64.config
index 99e018991026..949cd403ebbf 100644
--- a/kernel-x86_64.config
+++ b/kernel-x86_64.config
@@ -1351,7 +1351,7 @@ CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_SII902X is not set
CONFIG_DRM_SII9234=m
# CONFIG_DRM_SIL_SII8620 is not set
-# CONFIG_DRM_TDFX=n is not set
+# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TINYDRM is not set
CONFIG_DRM_TI_SN65DSI86=m
--
2.21.0
3 years, 11 months
[PATCH 0/5] Kconfig symbol cleanup for v5.4-rc1
by Paul Bolle
Here's yet another Kconfig symbol cleanup, now for v5.4-rc1.
This series is - as always - boring to review and hard to test
thoroughly. (I build-tested this on x86_64, but a sufficiently paranoid
tester would like to build-test on other arches too. I do not have
access to non-x86 hardware.) Sorry about that.
Note that four symbols that were dropped in v5.4-rc1 (ie,
CONFIG_ARCH_IOP13XX, CONFIG_ARCH_IOP33X, CONFIG_ARCH_KS8695, and
CONFIG_ARCH_W90X900) were already removed by a recent patch by Peter.
Nice!
Anyhow, working on this I thought of a way to sort-of do this during
regular builds. I hope to work on that before v5.5-rc1. Stay tuned!
Paul Bolle (5):
Remove two Kconfig symbols dropped before v5.3
configs: remove CONFIG_DEBUG_INFO_VTA
configs: remove two Kconfig symbols
configs: remove CONFIG_CRASH
Remove all Kconfig symbols dropped in v5.4-rc1
configs/fedora/generic/CONFIG_CRASH | 1 -
.../fedora/generic/CONFIG_CRYPTO_AEGIS128L | 1 -
configs/fedora/generic/CONFIG_CRYPTO_AEGIS256 | 1 -
.../fedora/generic/CONFIG_CRYPTO_MORUS1280 | 1 -
configs/fedora/generic/CONFIG_CRYPTO_MORUS640 | 1 -
configs/fedora/generic/CONFIG_DEBUG_INFO_VTA | 1 -
configs/fedora/generic/CONFIG_DRM_TINYDRM | 1 -
configs/fedora/generic/CONFIG_I2C_BCM2048 | 1 -
.../fedora/generic/CONFIG_LOCK_DOWN_KERNEL | 1 -
configs/fedora/generic/CONFIG_PREEMPT_LL | 1 -
configs/fedora/generic/CONFIG_SENSORS_ADS1015 | 1 -
configs/fedora/generic/CONFIG_SGI_IOC4 | 1 -
configs/fedora/generic/CONFIG_SOUNDWIRE_BUS | 1 -
.../generic/arm/CONFIG_ARM_QCOM_CPUFREQ_KRYO | 1 -
configs/fedora/generic/arm/CONFIG_DRM_TINYDRM | 1 -
.../generic/arm/CONFIG_TINYDRM_MIPI_DBI | 1 -
.../arm/aarch64/CONFIG_HISI_KIRIN_DW_DSI | 1 -
.../generic/arm/armv7/CONFIG_MTD_M25P80 | 1 -
.../generic/s390x/CONFIG_KEXEC_VERIFY_SIG | 1 -
.../generic/x86/CONFIG_LOCK_DOWN_KERNEL | 1 -
.../generic/x86/CONFIG_LOCK_DOWN_KERNEL_FORCE | 1 -
.../generic/x86/i686/CONFIG_CRYPTO_AES_586 | 1 -
.../x86_64/CONFIG_CRYPTO_AEGIS128L_AESNI_SSE2 | 1 -
.../x86_64/CONFIG_CRYPTO_AEGIS256_AESNI_SSE2 | 1 -
.../x86/x86_64/CONFIG_CRYPTO_AES_X86_64 | 1 -
.../x86/x86_64/CONFIG_CRYPTO_MORUS1280_AVX2 | 1 -
.../x86/x86_64/CONFIG_CRYPTO_MORUS1280_SSE2 | 1 -
.../x86/x86_64/CONFIG_CRYPTO_MORUS640_SSE2 | 1 -
.../fedora/generic/x86/x86_64/CONFIG_SGI_IOC4 | 1 -
kernel-aarch64-debug.config | 16 ---------------
kernel-aarch64.config | 16 ---------------
kernel-armv7hl-debug.config | 16 ---------------
kernel-armv7hl-lpae-debug.config | 16 ---------------
kernel-armv7hl-lpae.config | 16 ---------------
kernel-armv7hl.config | 16 ---------------
kernel-i686-debug.config | 15 --------------
kernel-i686.config | 15 --------------
kernel-ppc64le-debug.config | 13 ------------
kernel-ppc64le.config | 13 ------------
kernel-s390x-debug.config | 14 -------------
kernel-s390x.config | 14 -------------
kernel-x86_64-debug.config | 20 -------------------
kernel-x86_64.config | 20 -------------------
43 files changed, 249 deletions(-)
delete mode 100644 configs/fedora/generic/CONFIG_CRASH
delete mode 100644 configs/fedora/generic/CONFIG_CRYPTO_AEGIS128L
delete mode 100644 configs/fedora/generic/CONFIG_CRYPTO_AEGIS256
delete mode 100644 configs/fedora/generic/CONFIG_CRYPTO_MORUS1280
delete mode 100644 configs/fedora/generic/CONFIG_CRYPTO_MORUS640
delete mode 100644 configs/fedora/generic/CONFIG_DEBUG_INFO_VTA
delete mode 100644 configs/fedora/generic/CONFIG_DRM_TINYDRM
delete mode 100644 configs/fedora/generic/CONFIG_I2C_BCM2048
delete mode 100644 configs/fedora/generic/CONFIG_LOCK_DOWN_KERNEL
delete mode 100644 configs/fedora/generic/CONFIG_PREEMPT_LL
delete mode 100644 configs/fedora/generic/CONFIG_SENSORS_ADS1015
delete mode 100644 configs/fedora/generic/CONFIG_SGI_IOC4
delete mode 100644 configs/fedora/generic/CONFIG_SOUNDWIRE_BUS
delete mode 100644 configs/fedora/generic/arm/CONFIG_ARM_QCOM_CPUFREQ_KRYO
delete mode 100644 configs/fedora/generic/arm/CONFIG_DRM_TINYDRM
delete mode 100644 configs/fedora/generic/arm/CONFIG_TINYDRM_MIPI_DBI
delete mode 100644 configs/fedora/generic/arm/aarch64/CONFIG_HISI_KIRIN_DW_DSI
delete mode 100644 configs/fedora/generic/arm/armv7/CONFIG_MTD_M25P80
delete mode 100644 configs/fedora/generic/s390x/CONFIG_KEXEC_VERIFY_SIG
delete mode 100644 configs/fedora/generic/x86/CONFIG_LOCK_DOWN_KERNEL
delete mode 100644 configs/fedora/generic/x86/CONFIG_LOCK_DOWN_KERNEL_FORCE
delete mode 100644 configs/fedora/generic/x86/i686/CONFIG_CRYPTO_AES_586
delete mode 100644 configs/fedora/generic/x86/x86_64/CONFIG_CRYPTO_AEGIS128L_AESNI_SSE2
delete mode 100644 configs/fedora/generic/x86/x86_64/CONFIG_CRYPTO_AEGIS256_AESNI_SSE2
delete mode 100644 configs/fedora/generic/x86/x86_64/CONFIG_CRYPTO_AES_X86_64
delete mode 100644 configs/fedora/generic/x86/x86_64/CONFIG_CRYPTO_MORUS1280_AVX2
delete mode 100644 configs/fedora/generic/x86/x86_64/CONFIG_CRYPTO_MORUS1280_SSE2
delete mode 100644 configs/fedora/generic/x86/x86_64/CONFIG_CRYPTO_MORUS640_SSE2
delete mode 100644 configs/fedora/generic/x86/x86_64/CONFIG_SGI_IOC4
--
2.21.0
3 years, 11 months
[PATCH] re-enable HDA sound drivers on PPC
by Dan Horák
---
configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL | 1 +
configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL_DETECT_DMIC | 1 +
kernel-ppc64le-debug.config | 2 +-
kernel-ppc64le.config | 2 +-
4 files changed, 4 insertions(+), 2 deletions(-)
create mode 100644 configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL
create mode 100644 configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL_DETECT_DMIC
diff --git a/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL b/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL
new file mode 100644
index 000000000..dfe74ea98
--- /dev/null
+++ b/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL
@@ -0,0 +1 @@
+CONFIG_SND_HDA_INTEL=m
diff --git a/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL_DETECT_DMIC b/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL_DETECT_DMIC
new file mode 100644
index 000000000..501f523b0
--- /dev/null
+++ b/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL_DETECT_DMIC
@@ -0,0 +1 @@
+# CONFIG_SND_HDA_INTEL_DETECT_DMIC is not set
diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config
index 82585d81a..c85d5b83a 100644
--- a/kernel-ppc64le-debug.config
+++ b/kernel-ppc64le-debug.config
@@ -4929,7 +4929,7 @@ CONFIG_SND_HDA_I915=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=0
CONFIG_SND_HDA_INPUT_BEEP=y
# CONFIG_SND_HDA_INTEL_DETECT_DMIC is not set
-# CONFIG_SND_HDA_INTEL is not set
+CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
CONFIG_SND_HDA_PREALLOC_SIZE=4096
diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config
index 0c7b7bcaf..52cd43193 100644
--- a/kernel-ppc64le.config
+++ b/kernel-ppc64le.config
@@ -4907,7 +4907,7 @@ CONFIG_SND_HDA_I915=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=0
CONFIG_SND_HDA_INPUT_BEEP=y
# CONFIG_SND_HDA_INTEL_DETECT_DMIC is not set
-# CONFIG_SND_HDA_INTEL is not set
+CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
CONFIG_SND_HDA_PREALLOC_SIZE=4096
--
2.21.0
3 years, 12 months
[PATCH] Enable CONFIG_EFI_TEST as a module (rhbz 1759325)
by Javier Martinez Canillas
The driver is needed for testing purposes, enable it on the architectures
where EFI is supported. Also, disallow access to the registered device if
the kernel is locked down.
---
configs/fedora/generic/CONFIG_EFI_TEST | 2 +-
...k-down-dev-efi_test-and-require-CAP_.patch | 85 +++++++++++++++++++
kernel-aarch64-debug.config | 2 +-
kernel-aarch64.config | 2 +-
kernel-armv7hl-debug.config | 2 +-
kernel-armv7hl-lpae-debug.config | 2 +-
kernel-armv7hl-lpae.config | 2 +-
kernel-armv7hl.config | 2 +-
kernel-i686-debug.config | 2 +-
kernel-i686.config | 2 +-
kernel-x86_64-debug.config | 2 +-
kernel-x86_64.config | 2 +-
kernel.spec | 3 +
13 files changed, 99 insertions(+), 11 deletions(-)
create mode 100644 efi-efi_test-lock-down-dev-efi_test-and-require-CAP_.patch
diff --git a/configs/fedora/generic/CONFIG_EFI_TEST b/configs/fedora/generic/CONFIG_EFI_TEST
index 455eb306151..09ff10ce71f 100644
--- a/configs/fedora/generic/CONFIG_EFI_TEST
+++ b/configs/fedora/generic/CONFIG_EFI_TEST
@@ -1 +1 @@
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
diff --git a/efi-efi_test-lock-down-dev-efi_test-and-require-CAP_.patch b/efi-efi_test-lock-down-dev-efi_test-and-require-CAP_.patch
new file mode 100644
index 00000000000..36ef9b827a5
--- /dev/null
+++ b/efi-efi_test-lock-down-dev-efi_test-and-require-CAP_.patch
@@ -0,0 +1,85 @@
+From 6ec9c505a12c0b5822c41f2b3bf873ebaeaae034 Mon Sep 17 00:00:00 2001
+From: Javier Martinez Canillas <javierm(a)redhat.com>
+Date: Wed, 2 Oct 2019 11:21:52 +0200
+Subject: [PATCH] efi/efi_test: lock down /dev/efi_test and require
+ CAP_SYS_ADMIN
+
+The driver exposes EFI runtime services to user-space through an IOCTL
+interface, calling the EFI services function pointers directly without
+using the efivar API.
+
+Disallow access to the /dev/efi_test character device when the kernel is
+locked down to prevent arbitrary user-space to call EFI runtime services.
+
+Also require CAP_SYS_ADMIN to open the chardev to prevent unprivileged
+users to call the EFI runtime services, instead of just relying on the
+chardev file mode bits for this.
+
+The main user of this driver is the fwts [0] tool that already checks if
+the effective user ID is 0 and fails otherwise. So this change shouldn't
+cause any regression to this tool.
+
+[0]: https://wiki.ubuntu.com/FirmwareTestSuite/Reference/uefivarinfo
+
+Signed-off-by: Javier Martinez Canillas <javierm(a)redhat.com>
+Acked-by: Laszlo Ersek <lersek(a)redhat.com>
+Acked-by: Matthew Garrett <mjg59(a)google.com>
+---
+ drivers/firmware/efi/test/efi_test.c | 8 ++++++++
+ include/linux/security.h | 1 +
+ security/lockdown/lockdown.c | 1 +
+ 3 files changed, 10 insertions(+)
+
+diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
+index 877745c3aaf..7baf48c01e7 100644
+--- a/drivers/firmware/efi/test/efi_test.c
++++ b/drivers/firmware/efi/test/efi_test.c
+@@ -14,6 +14,7 @@
+ #include <linux/init.h>
+ #include <linux/proc_fs.h>
+ #include <linux/efi.h>
++#include <linux/security.h>
+ #include <linux/slab.h>
+ #include <linux/uaccess.h>
+
+@@ -717,6 +718,13 @@ static long efi_test_ioctl(struct file *file, unsigned int cmd,
+
+ static int efi_test_open(struct inode *inode, struct file *file)
+ {
++ int ret = security_locked_down(LOCKDOWN_EFI_TEST);
++
++ if (ret)
++ return ret;
++
++ if (!capable(CAP_SYS_ADMIN))
++ return -EACCES;
+ /*
+ * nothing special to do here
+ * We do accept multiple open files at the same time as we
+diff --git a/include/linux/security.h b/include/linux/security.h
+index a8d59d612d2..9df7547afc0 100644
+--- a/include/linux/security.h
++++ b/include/linux/security.h
+@@ -105,6 +105,7 @@ enum lockdown_reason {
+ LOCKDOWN_NONE,
+ LOCKDOWN_MODULE_SIGNATURE,
+ LOCKDOWN_DEV_MEM,
++ LOCKDOWN_EFI_TEST,
+ LOCKDOWN_KEXEC,
+ LOCKDOWN_HIBERNATION,
+ LOCKDOWN_PCI_ACCESS,
+diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c
+index 8a10b43daf7..40b790536de 100644
+--- a/security/lockdown/lockdown.c
++++ b/security/lockdown/lockdown.c
+@@ -20,6 +20,7 @@ static const char *const lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = {
+ [LOCKDOWN_NONE] = "none",
+ [LOCKDOWN_MODULE_SIGNATURE] = "unsigned module loading",
+ [LOCKDOWN_DEV_MEM] = "/dev/mem,kmem,port",
++ [LOCKDOWN_EFI_TEST] = "/dev/efi_test access",
+ [LOCKDOWN_KEXEC] = "kexec of unsigned images",
+ [LOCKDOWN_HIBERNATION] = "hibernation",
+ [LOCKDOWN_PCI_ACCESS] = "direct PCI access",
+--
+2.21.0
+
diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config
index 4b1ce9112b4..0c863055531 100644
--- a/kernel-aarch64-debug.config
+++ b/kernel-aarch64-debug.config
@@ -1733,7 +1733,7 @@ CONFIG_EFI_ARMSTUB_DTB_LOADER=y
CONFIG_EFI_PARTITION=y
CONFIG_EFI_PGT_DUMP=y
# CONFIG_EFI_RCI2_TABLE is not set
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_EFI_VARS_PSTORE=y
diff --git a/kernel-aarch64.config b/kernel-aarch64.config
index 21df2fad32d..2f9cab3b141 100644
--- a/kernel-aarch64.config
+++ b/kernel-aarch64.config
@@ -1725,7 +1725,7 @@ CONFIG_EFI_ARMSTUB_DTB_LOADER=y
CONFIG_EFI_PARTITION=y
# CONFIG_EFI_PGT_DUMP is not set
# CONFIG_EFI_RCI2_TABLE is not set
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_EFI_VARS_PSTORE=y
diff --git a/kernel-armv7hl-debug.config b/kernel-armv7hl-debug.config
index f94f3971be1..5fe089172c4 100644
--- a/kernel-armv7hl-debug.config
+++ b/kernel-armv7hl-debug.config
@@ -1762,7 +1762,7 @@ CONFIG_EFI_ARMSTUB_DTB_LOADER=y
CONFIG_EFI_PARTITION=y
CONFIG_EFI_PGT_DUMP=y
# CONFIG_EFI_RCI2_TABLE is not set
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_EFI_VARS_PSTORE=y
diff --git a/kernel-armv7hl-lpae-debug.config b/kernel-armv7hl-lpae-debug.config
index 3941abcffc4..223238f141b 100644
--- a/kernel-armv7hl-lpae-debug.config
+++ b/kernel-armv7hl-lpae-debug.config
@@ -1701,7 +1701,7 @@ CONFIG_EFI_ARMSTUB_DTB_LOADER=y
CONFIG_EFI_PARTITION=y
CONFIG_EFI_PGT_DUMP=y
# CONFIG_EFI_RCI2_TABLE is not set
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_EFI_VARS_PSTORE=y
diff --git a/kernel-armv7hl-lpae.config b/kernel-armv7hl-lpae.config
index 02461d14b79..8c0a47ce90e 100644
--- a/kernel-armv7hl-lpae.config
+++ b/kernel-armv7hl-lpae.config
@@ -1694,7 +1694,7 @@ CONFIG_EFI_ARMSTUB_DTB_LOADER=y
CONFIG_EFI_PARTITION=y
# CONFIG_EFI_PGT_DUMP is not set
# CONFIG_EFI_RCI2_TABLE is not set
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_EFI_VARS_PSTORE=y
diff --git a/kernel-armv7hl.config b/kernel-armv7hl.config
index 6cc7b413783..8df753f0be2 100644
--- a/kernel-armv7hl.config
+++ b/kernel-armv7hl.config
@@ -1755,7 +1755,7 @@ CONFIG_EFI_ARMSTUB_DTB_LOADER=y
CONFIG_EFI_PARTITION=y
# CONFIG_EFI_PGT_DUMP is not set
# CONFIG_EFI_RCI2_TABLE is not set
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_EFI_VARS_PSTORE=y
diff --git a/kernel-i686-debug.config b/kernel-i686-debug.config
index 272fe3f1291..0d9448b888d 100644
--- a/kernel-i686-debug.config
+++ b/kernel-i686-debug.config
@@ -1484,7 +1484,7 @@ CONFIG_EFI_PGT_DUMP=y
CONFIG_EFI_RCI2_TABLE=y
CONFIG_EFI_RUNTIME_MAP=y
CONFIG_EFI_STUB=y
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
# CONFIG_EFI_VARS is not set
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
diff --git a/kernel-i686.config b/kernel-i686.config
index f9c8e2035ed..1e3916c40b8 100644
--- a/kernel-i686.config
+++ b/kernel-i686.config
@@ -1475,7 +1475,7 @@ CONFIG_EFI_PARTITION=y
CONFIG_EFI_RCI2_TABLE=y
CONFIG_EFI_RUNTIME_MAP=y
CONFIG_EFI_STUB=y
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
# CONFIG_EFI_VARS is not set
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config
index a40147d602d..7c7573e0937 100644
--- a/kernel-x86_64-debug.config
+++ b/kernel-x86_64-debug.config
@@ -1528,7 +1528,7 @@ CONFIG_EFI_PGT_DUMP=y
CONFIG_EFI_RCI2_TABLE=y
CONFIG_EFI_RUNTIME_MAP=y
CONFIG_EFI_STUB=y
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
# CONFIG_EFI_VARS is not set
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
diff --git a/kernel-x86_64.config b/kernel-x86_64.config
index 99e01899102..17386faeff6 100644
--- a/kernel-x86_64.config
+++ b/kernel-x86_64.config
@@ -1519,7 +1519,7 @@ CONFIG_EFI_PARTITION=y
CONFIG_EFI_RCI2_TABLE=y
CONFIG_EFI_RUNTIME_MAP=y
CONFIG_EFI_STUB=y
-# CONFIG_EFI_TEST is not set
+CONFIG_EFI_TEST=m
CONFIG_EFIVAR_FS=y
# CONFIG_EFI_VARS is not set
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
diff --git a/kernel.spec b/kernel.spec
index 9d4dcf3212b..c28e1b32fd5 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -507,6 +507,9 @@ Patch202: 0003-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch
Patch204: efi-secureboot.patch
Patch205: lift-lockdown-sysrq.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1759325
+# Submitted upstream at https://lore.kernel.org/patchwork/patch/1136967/
+Patch206: efi-efi_test-lock-down-dev-efi_test-and-require-CAP_.patch
# 300 - ARM patches
Patch300: arm64-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch
--
2.21.0
3 years, 12 months