summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch4
-rw-r--r--0002-drm-amd-display-Have-Payload-Properly-Created-After-.patch4
-rw-r--r--0003-xfs-fix-livelock-in-delayed-allocation-at-ENOSPC.patch54
-rw-r--r--0004-x86-topology-Fix-erroneous-smp_num_siblings-on-Intel.patch91
-rw-r--r--PKGBUILD10
6 files changed, 163 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 380641a26c0e..5a1399086023 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-ck
pkgver = 6.3.4
- pkgrel = 1
+ pkgrel = 2
url = https://wiki.archlinux.org/index.php/Linux-ck
arch = x86_64
license = GPL2
@@ -22,6 +22,8 @@ pkgbase = linux-ck
source = ck-hrtimer-d09271d382ae852c98e17bd7426fc8021e7b465e.tar.gz::https://github.com/graysky2/linux-patches/archive/d09271d382ae852c98e17bd7426fc8021e7b465e.tar.gz
source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
source = 0002-drm-amd-display-Have-Payload-Properly-Created-After-.patch
+ source = 0003-xfs-fix-livelock-in-delayed-allocation-at-ENOSPC.patch
+ source = 0004-x86-topology-Fix-erroneous-smp_num_siblings-on-Intel.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
sha256sums = d8627528ed6b3ae607d00b1ef5a46e0e7051ae40b285fd4e82f4ff0bb72b68e8
@@ -29,8 +31,10 @@ pkgbase = linux-ck
sha256sums = 21b9a9e542f853cdc695648d6ab6219bd2e881a4954277f241e104723c373d42
sha256sums = f1d586e111932890ad5e0df15d092fb9b3f87bae4ea17812aae9b0ec98fe2db0
sha256sums = f781da5ba492d8912c7d4cddac02f21c1799532182e23374c80c19ff0c617373
- sha256sums = c90ccb8accf7fa59f79318b749f0243c96ed9c1e35461f0dae50772f87a467a3
- sha256sums = 5e0f9ee19cb3ef6b811e1563690852b03bbc73c35113ab765a53597cf2030883
+ sha256sums = 927ea3b7f4fc525a50352464e9623ca9d99044344f30a80b91eb8adf6deb21d2
+ sha256sums = 4b4f53c1a75375707cbea83b2d55aecb89ae4e2f7810a899cd615902bbfc9023
+ sha256sums = 764b58e754a3ea29d75e811afb796c38588a7977457a75c6eb762a94754560ee
+ sha256sums = 719c90170133b35fb70fbfe0e9606ad8856f16b2081c7dafb35d7b0ebcff0aad
pkgname = linux-ck
pkgdesc = The Linux kernel and modules with ck's hrtimer patches
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 a6d7c2e8094d..90da9867a68a 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 59f2f4ec4f5168b6c8945d59b9859d8b2321882b Mon Sep 17 00:00:00 2001
+From 6670bdf280ab272b71ad5928e834e9c83c92c24d 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/3] ZEN: Add sysctl and CONFIG to disallow unprivileged
+Subject: [PATCH 1/5] ZEN: Add sysctl and CONFIG to disallow unprivileged
CLONE_NEWUSER
Our default behavior continues to match the vanilla kernel.
diff --git a/0002-drm-amd-display-Have-Payload-Properly-Created-After-.patch b/0002-drm-amd-display-Have-Payload-Properly-Created-After-.patch
index ba9a37090e11..0d8bc4fc9027 100644
--- a/0002-drm-amd-display-Have-Payload-Properly-Created-After-.patch
+++ b/0002-drm-amd-display-Have-Payload-Properly-Created-After-.patch
@@ -1,7 +1,7 @@
-From 2fd9916a465e3b62452ac4346def013c3d8698a4 Mon Sep 17 00:00:00 2001
+From dac3ac92917b844098989bbb1adde630fb54d675 Mon Sep 17 00:00:00 2001
From: Fangzhi Zuo <jerry.zuo@amd.com>
Date: Wed, 17 May 2023 19:37:13 +0800
-Subject: [PATCH 2/3] drm/amd/display: Have Payload Properly Created After
+Subject: [PATCH 2/5] drm/amd/display: Have Payload Properly Created After
Resume
At drm suspend sequence, MST dc_sink is removed. When commit cached
diff --git a/0003-xfs-fix-livelock-in-delayed-allocation-at-ENOSPC.patch b/0003-xfs-fix-livelock-in-delayed-allocation-at-ENOSPC.patch
new file mode 100644
index 000000000000..28e657809d2e
--- /dev/null
+++ b/0003-xfs-fix-livelock-in-delayed-allocation-at-ENOSPC.patch
@@ -0,0 +1,54 @@
+From 3e7f00d639ecf9d740cb578e1fc7c8a18b110cfb Mon Sep 17 00:00:00 2001
+From: Dave Chinner <dchinner@redhat.com>
+Date: Thu, 27 Apr 2023 09:02:11 +1000
+Subject: [PATCH 3/5] xfs: fix livelock in delayed allocation at ENOSPC
+
+On a filesystem with a non-zero stripe unit and a large sequential
+write, delayed allocation will set a minimum allocation length of
+the stripe unit. If allocation fails because there are no extents
+long enough for an aligned minlen allocation, it is supposed to
+fall back to unaligned allocation which allows single block extents
+to be allocated.
+
+When the allocator code was rewritting in the 6.3 cycle, this
+fallback was broken - the old code used args->fsbno as the both the
+allocation target and the allocation result, the new code passes the
+target as a separate parameter. The conversion didn't handle the
+aligned->unaligned fallback path correctly - it reset args->fsbno to
+the target fsbno on failure which broke allocation failure detection
+in the high level code and so it never fell back to unaligned
+allocations.
+
+This resulted in a loop in writeback trying to allocate an aligned
+block, getting a false positive success, trying to insert the result
+in the BMBT. This did nothing because the extent already was in the
+BMBT (merge results in an unchanged extent) and so it returned the
+prior extent to the conversion code as the current iomap.
+
+Because the iomap returned didn't cover the offset we tried to map,
+xfs_convert_blocks() then retries the allocation, which fails in the
+same way and now we have a livelock.
+
+Reported-and-tested-by: Brian Foster <bfoster@redhat.com>
+Fixes: 85843327094f ("xfs: factor xfs_bmap_btalloc()")
+Signed-off-by: Dave Chinner <dchinner@redhat.com>
+Reviewed-by: Darrick J. Wong <djwong@kernel.org>
+---
+ fs/xfs/libxfs/xfs_bmap.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
+index 34de6e6898c4..3ce43068daa1 100644
+--- a/fs/xfs/libxfs/xfs_bmap.c
++++ b/fs/xfs/libxfs/xfs_bmap.c
+@@ -3505,7 +3505,6 @@ xfs_bmap_btalloc_at_eof(
+ * original non-aligned state so the caller can proceed on allocation
+ * failure as if this function was never called.
+ */
+- args->fsbno = ap->blkno;
+ args->alignment = 1;
+ return 0;
+ }
+--
+2.40.1
+
diff --git a/0004-x86-topology-Fix-erroneous-smp_num_siblings-on-Intel.patch b/0004-x86-topology-Fix-erroneous-smp_num_siblings-on-Intel.patch
new file mode 100644
index 000000000000..eedfd6df1003
--- /dev/null
+++ b/0004-x86-topology-Fix-erroneous-smp_num_siblings-on-Intel.patch
@@ -0,0 +1,91 @@
+From 30c93a08fd9b5d861c087c5450df981210e87fd1 Mon Sep 17 00:00:00 2001
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Thu, 23 Mar 2023 09:56:40 +0800
+Subject: [PATCH 4/5] x86/topology: Fix erroneous smp_num_siblings on Intel
+ Hybrid platforms
+
+Traditionally, all CPUs in a system have identical numbers of SMT
+siblings. That changes with hybrid processors where some logical CPUs
+have a sibling and others have none.
+
+Today, the CPU boot code sets the global variable smp_num_siblings when
+every CPU thread is brought up. The last thread to boot will overwrite
+it with the number of siblings of *that* thread. That last thread to
+boot will "win". If the thread is a Pcore, smp_num_siblings == 2. If it
+is an Ecore, smp_num_siblings == 1.
+
+smp_num_siblings describes if the *system* supports SMT. It should
+specify the maximum number of SMT threads among all cores.
+
+Ensure that smp_num_siblings represents the system-wide maximum number
+of siblings by always increasing its value. Never allow it to decrease.
+
+On MeteorLake-P platform, this fixes a problem that the Ecore CPUs are
+not updated in any cpu sibling map because the system is treated as an
+UP system when probing Ecore CPUs.
+
+Below shows part of the CPU topology information before and after the
+fix, for both Pcore and Ecore CPU (cpu0 is Pcore, cpu 12 is Ecore).
+...
+-/sys/devices/system/cpu/cpu0/topology/package_cpus:000fff
+-/sys/devices/system/cpu/cpu0/topology/package_cpus_list:0-11
++/sys/devices/system/cpu/cpu0/topology/package_cpus:3fffff
++/sys/devices/system/cpu/cpu0/topology/package_cpus_list:0-21
+...
+-/sys/devices/system/cpu/cpu12/topology/package_cpus:001000
+-/sys/devices/system/cpu/cpu12/topology/package_cpus_list:12
++/sys/devices/system/cpu/cpu12/topology/package_cpus:3fffff
++/sys/devices/system/cpu/cpu12/topology/package_cpus_list:0-21
+
+Notice that the "before" 'package_cpus_list' has only one CPU. This
+means that userspace tools like lscpu will see a little laptop like
+an 11-socket system:
+
+-Core(s) per socket: 1
+-Socket(s): 11
++Core(s) per socket: 16
++Socket(s): 1
+
+This is also expected to make the scheduler do rather wonky things
+too.
+
+[ dhansen: remove CPUID detail from changelog, add end user effects ]
+
+CC: stable@kernel.org
+Fixes: bbb65d2d365e ("x86: use cpuid vector 0xb when available for detecting cpu topology")
+Fixes: 95f3d39ccf7a ("x86/cpu/topology: Provide detect_extended_topology_early()")
+Suggested-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/all/20230323015640.27906-1-rui.zhang%40intel.com
+---
+ arch/x86/kernel/cpu/topology.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/arch/x86/kernel/cpu/topology.c b/arch/x86/kernel/cpu/topology.c
+index 5e868b62a7c4..0270925fe013 100644
+--- a/arch/x86/kernel/cpu/topology.c
++++ b/arch/x86/kernel/cpu/topology.c
+@@ -79,7 +79,7 @@ int detect_extended_topology_early(struct cpuinfo_x86 *c)
+ * initial apic id, which also represents 32-bit extended x2apic id.
+ */
+ c->initial_apicid = edx;
+- smp_num_siblings = LEVEL_MAX_SIBLINGS(ebx);
++ smp_num_siblings = max_t(int, smp_num_siblings, LEVEL_MAX_SIBLINGS(ebx));
+ #endif
+ return 0;
+ }
+@@ -109,7 +109,8 @@ int detect_extended_topology(struct cpuinfo_x86 *c)
+ */
+ cpuid_count(leaf, SMT_LEVEL, &eax, &ebx, &ecx, &edx);
+ c->initial_apicid = edx;
+- core_level_siblings = smp_num_siblings = LEVEL_MAX_SIBLINGS(ebx);
++ core_level_siblings = LEVEL_MAX_SIBLINGS(ebx);
++ smp_num_siblings = max_t(int, smp_num_siblings, LEVEL_MAX_SIBLINGS(ebx));
+ core_plus_mask_width = ht_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
+ die_level_siblings = LEVEL_MAX_SIBLINGS(ebx);
+ pkg_mask_width = die_plus_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
+--
+2.40.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 45dbf2a96c0b..afa1d10ea7b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -72,7 +72,7 @@ _subarch=
### IMPORTANT: Do no edit below this line unless you know what you're doing
pkgbase=linux-ck
pkgver=6.3.4
-pkgrel=1
+pkgrel=2
arch=(x86_64)
url="https://wiki.archlinux.org/index.php/Linux-ck"
license=(GPL2)
@@ -104,6 +104,8 @@ source=(
"ck-hrtimer-$_commit.tar.gz::https://github.com/graysky2/linux-patches/archive/$_commit.tar.gz"
0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
0002-drm-amd-display-Have-Payload-Properly-Created-After-.patch
+ 0003-xfs-fix-livelock-in-delayed-allocation-at-ENOSPC.patch
+ 0004-x86-topology-Fix-erroneous-smp_num_siblings-on-Intel.patch
)
validpgpkeys=(
ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds
@@ -114,8 +116,10 @@ sha256sums=('d8627528ed6b3ae607d00b1ef5a46e0e7051ae40b285fd4e82f4ff0bb72b68e8'
'21b9a9e542f853cdc695648d6ab6219bd2e881a4954277f241e104723c373d42'
'f1d586e111932890ad5e0df15d092fb9b3f87bae4ea17812aae9b0ec98fe2db0'
'f781da5ba492d8912c7d4cddac02f21c1799532182e23374c80c19ff0c617373'
- 'c90ccb8accf7fa59f79318b749f0243c96ed9c1e35461f0dae50772f87a467a3'
- '5e0f9ee19cb3ef6b811e1563690852b03bbc73c35113ab765a53597cf2030883')
+ '927ea3b7f4fc525a50352464e9623ca9d99044344f30a80b91eb8adf6deb21d2'
+ '4b4f53c1a75375707cbea83b2d55aecb89ae4e2f7810a899cd615902bbfc9023'
+ '764b58e754a3ea29d75e811afb796c38588a7977457a75c6eb762a94754560ee'
+ '719c90170133b35fb70fbfe0e9606ad8856f16b2081c7dafb35d7b0ebcff0aad')
_make() {
test -s version
make KERNELRELEASE="$(<version)" "$@"