summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch10
-rw-r--r--0002-iommu-amd-Don-t-initialise-remapping-irqdomain-if-IO.patch71
-rw-r--r--PKGBUILD8
-rw-r--r--config4
5 files changed, 88 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2af6a84ece27..67a597b814b0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-ck
pkgver = 5.11.8
- pkgrel = 1
+ pkgrel = 2
url = https://wiki.archlinux.org/index.php/Linux-ck
arch = x86_64
license = GPL2
@@ -18,14 +18,16 @@ pkgbase = linux-ck
source = more-uarches-20210309.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/20210309.tar.gz
source = http://ck.kolivas.org/patches/5.0/5.11/5.11-ck1/patch-5.11-ck1.xz
source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+ source = 0002-iommu-amd-Don-t-initialise-remapping-irqdomain-if-IO.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
b2sums = 48028845215ba4514735575b2cf0f9bd67c224168074c406d01188ab28483ab139d6fab42dda6be10b04c9716e7be91fc6f5e4bbd58984bea40b7e7cff60e477
b2sums = SKIP
- b2sums = 20042a049ca6f95782c0e6a05e67871f6f5a290098b051b87d4f8ddbb965e78e3ecdd20fad38bde6efb462cb21a65b8aac19455396ba0aef83e73a55bc7b3fb6
+ b2sums = fb0f93e5373ba40e8b019195faf56480d0e2e4216124c3b30293ff6abf0885e867e17b3a613da9ed0ba3fe7fd1cb539f08fa1f7370d875e3cb6bbd1ada78f0eb
b2sums = 04351f264bf9ec12b5acdc13546531f38b6fee9f2eca55eb7aec28dbff6a45a5e29a0603d52b4a7dc89ed86e401fb18625ef8d91073ff4732e1d03a135339413
b2sums = 81d948aef4423255ebb4fa9b12c96207af8d14e225cf95d631dfbb1c0e88d31f60f81c2aff63046a78d8daf2601270ebb1d9cfaeccc3e3fdb08dbc430b53aff5
- b2sums = 59c8f4d66eeeb5b3f84b17ab81431804ac9334e97cdbf99ff3dd77803ee3af55908d3d3ba0e957093418a7c5805e423ac78dd398ffb64ba6577aa69bfb9cfbe1
+ b2sums = c22463da6e78830e104f728c00cf43573a7e1a59c17234f49844b9295eab953f4e119d34a0621feb816b9f1f0469dd769884f9ed1740c73176625435ea0a8624
+ b2sums = 917b32c49ed6d96fcbcbe661e0232ff720f9e317e5e1e884152e937f46a00877f9b44584ef3cd8804bcf6d1626886f3a2edc1eb84f605c71a0f0cdfa6c3d4e32
pkgname = linux-ck
pkgdesc = The Linux-ck kernel and modules with the ck1 patchset featuring MuQSS CPU scheduler
diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
index ab38fb134382..11567cef166e 100644
--- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+++ b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
@@ -1,7 +1,7 @@
-From 2aef6c5fe88b92e9f611ec0b04ab8e023e943cd8 Mon Sep 17 00:00:00 2001
+From 831eecdabcef05828987209749a3db5242e3ce29 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Mon, 16 Sep 2019 04:53:20 +0200
-Subject: [PATCH 1/4] ZEN: Add sysctl and CONFIG to disallow unprivileged
+Subject: [PATCH 1/3] ZEN: Add sysctl and CONFIG to disallow unprivileged
CLONE_NEWUSER
Our default behavior continues to match the vanilla kernel.
@@ -36,7 +36,7 @@ index 64cf8ebdc4ec..bd29529ac188 100644
{
return &init_user_ns;
diff --git a/init/Kconfig b/init/Kconfig
-index 29ad68325028..96b79cfb2845 100644
+index b7d3c6a12196..9e8a5351063e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1172,6 +1172,22 @@ config USER_NS
@@ -102,7 +102,7 @@ index d66cd1014211..231a94ffd302 100644
if (err)
goto bad_unshare_out;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index c9fbdd848138..1fbf5d551fa0 100644
+index 62fbd09b5dc1..01192edd25f3 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -103,6 +103,9 @@
@@ -150,5 +150,5 @@ index af612945a4d0..95c54dae4aa1 100644
static DEFINE_MUTEX(userns_state_mutex);
--
-2.30.1
+2.31.0
diff --git a/0002-iommu-amd-Don-t-initialise-remapping-irqdomain-if-IO.patch b/0002-iommu-amd-Don-t-initialise-remapping-irqdomain-if-IO.patch
new file mode 100644
index 000000000000..10f06e0d4034
--- /dev/null
+++ b/0002-iommu-amd-Don-t-initialise-remapping-irqdomain-if-IO.patch
@@ -0,0 +1,71 @@
+From fa6692f3c77252a239725dab4352cecf34e12098 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <dwmw@amazon.co.uk>
+Date: Mon, 15 Mar 2021 11:15:02 +0000
+Subject: [PATCH 2/3] iommu/amd: Don't initialise remapping irqdomain if IOMMU
+ is disabled
+
+When the IOMMU is disabled, the driver still enumerates and initialises
+the hardware in order to turn it off. Because IRQ remapping setup is
+done early, the irqdomain is set up opportunistically.
+
+In commit b34f10c2dc59 ("iommu/amd: Stop irq_remapping_select() matching
+when remapping is disabled") I already make the irq_remapping_select()
+function check the amd_iommu_irq_setup flag because that might get
+cleared only after the irqdomain setup is done, when the IVRS is parsed.
+
+However, in the case where 'amd_iommu=off' is passed on the command line,
+the IRQ remapping setup isn't done but the amd_iommu_irq_setup flag is
+still set by the early IRQ remap init code. Stop it doing that, by
+bailing out of amd_iommu_prepare() early when it's disabled.
+
+This avoids the crash in irq_remapping_select() as it dereferences the
+NULL amd_iommu_rlookup_table[]:
+
+[ 0.243659] Switched APIC routing to physical x2apic.
+[ 0.262206] BUG: kernel NULL pointer dereference, address: 0000000000000500
+[ 0.262927] #PF: supervisor read access in kernel mode
+[ 0.263390] #PF: error_code(0x0000) - not-present page
+[ 0.263844] PGD 0 P4D 0
+[ 0.264135] Oops: 0000 [#1] SMP PTI
+[ 0.264460] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.12.0-rc3 #831
+[ 0.265069] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-1.fc33 04/01/2014
+[ 0.265825] RIP: 0010:irq_remapping_select+0x57/0xb0
+[ 0.266327] Code: 4b 0c 48 3d 30 e0 a7 9e 75 0d eb 35 48 8b 00 48 3d 30 e0 a7 9e 74 2a 0f b6 50 10 39 d1 75 ed 0f b7 40 12 48 8b 15 69 e3 d2 01 <48> 8b 14 c2 48 85 d2 74 0e b8 01 00 00 00 48 3b aa 90 04 00 00 74
+[ 0.268412] RSP: 0000:ffffffff9e803db0 EFLAGS: 00010246
+[ 0.268919] RAX: 00000000000000a0 RBX: ffffffff9e803df8 RCX: 0000000000000000
+[ 0.269550] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff98120112fe79
+[ 0.270245] RBP: ffff9812011c8218 R08: 0000000000000001 R09: 000000000000000a
+[ 0.270922] R10: 000000000000000a R11: f000000000000000 R12: ffff9812011c8218
+[ 0.271549] R13: ffff98120181ed88 R14: 0000000000000000 R15: 0000000000000000
+[ 0.272221] FS: 0000000000000000(0000) GS:ffff98127dc00000(0000) knlGS:0000000000000000
+[ 0.272997] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+[ 0.273508] CR2: 0000000000000500 CR3: 0000000030810000 CR4: 00000000000006b0
+[ 0.274178] Call Trace:
+[ 0.274416] irq_find_matching_fwspec+0x41/0xc0
+[ 0.274812] mp_irqdomain_create+0x65/0x150
+[ 0.275251] setup_IO_APIC+0x70/0x811
+
+Fixes: a1a785b57242 ("iommu/amd: Implement select() method on remapping irqdomain")
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212017
+Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
+---
+ drivers/iommu/amd/init.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
+index 01da76dc1caa..3ea395ef4929 100644
+--- a/drivers/iommu/amd/init.c
++++ b/drivers/iommu/amd/init.c
+@@ -2997,6 +2997,9 @@ int __init amd_iommu_prepare(void)
+ {
+ int ret;
+
++ if (amd_iommu_disabled)
++ return -ENODEV;
++
+ amd_iommu_irq_remap = true;
+
+ ret = iommu_go_to_state(IOMMU_ACPI_FINISHED);
+--
+2.31.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 26cbc55ac11f..baf5d7dfee13 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -65,7 +65,7 @@ _localmodcfg=
pkgbase=linux-ck
pkgver=5.11.8
-pkgrel=1
+pkgrel=2
_ckpatchversion=1
arch=(x86_64)
url="https://wiki.archlinux.org/index.php/Linux-ck"
@@ -82,6 +82,7 @@ source=(
"more-uarches-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/$_gcc_more_v.tar.gz"
"http://ck.kolivas.org/patches/5.0/5.11/5.11-ck${_ckpatchversion}/$_ckpatch.xz"
0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+ 0002-iommu-amd-Don-t-initialise-remapping-irqdomain-if-IO.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
@@ -89,10 +90,11 @@ validpgpkeys=(
)
b2sums=('48028845215ba4514735575b2cf0f9bd67c224168074c406d01188ab28483ab139d6fab42dda6be10b04c9716e7be91fc6f5e4bbd58984bea40b7e7cff60e477'
'SKIP'
- '20042a049ca6f95782c0e6a05e67871f6f5a290098b051b87d4f8ddbb965e78e3ecdd20fad38bde6efb462cb21a65b8aac19455396ba0aef83e73a55bc7b3fb6'
+ 'fb0f93e5373ba40e8b019195faf56480d0e2e4216124c3b30293ff6abf0885e867e17b3a613da9ed0ba3fe7fd1cb539f08fa1f7370d875e3cb6bbd1ada78f0eb'
'04351f264bf9ec12b5acdc13546531f38b6fee9f2eca55eb7aec28dbff6a45a5e29a0603d52b4a7dc89ed86e401fb18625ef8d91073ff4732e1d03a135339413'
'81d948aef4423255ebb4fa9b12c96207af8d14e225cf95d631dfbb1c0e88d31f60f81c2aff63046a78d8daf2601270ebb1d9cfaeccc3e3fdb08dbc430b53aff5'
- '59c8f4d66eeeb5b3f84b17ab81431804ac9334e97cdbf99ff3dd77803ee3af55908d3d3ba0e957093418a7c5805e423ac78dd398ffb64ba6577aa69bfb9cfbe1')
+ 'c22463da6e78830e104f728c00cf43573a7e1a59c17234f49844b9295eab953f4e119d34a0621feb816b9f1f0469dd769884f9ed1740c73176625435ea0a8624'
+ '917b32c49ed6d96fcbcbe661e0232ff720f9e317e5e1e884152e937f46a00877f9b44584ef3cd8804bcf6d1626886f3a2edc1eb84f605c71a0f0cdfa6c3d4e32')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
diff --git a/config b/config
index 3a1dde2bc72f..d6a80d38e660 100644
--- a/config
+++ b/config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 5.11.7-arch1 Kernel Configuration
+# Linux/x86 5.11.8-arch1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.2.0"
CONFIG_CC_IS_GCC=y
@@ -6523,7 +6523,7 @@ CONFIG_SND_HDA_DSP_LOADER=y
CONFIG_SND_HDA_COMPONENT=y
CONFIG_SND_HDA_I915=y
CONFIG_SND_HDA_EXT_CORE=m
-CONFIG_SND_HDA_PREALLOC_SIZE=4096
+CONFIG_SND_HDA_PREALLOC_SIZE=0
CONFIG_SND_INTEL_NHLT=y
CONFIG_SND_INTEL_DSP_CONFIG=m
CONFIG_SND_SPI=y