summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2022-12-22 05:50:38 -0500
committergraysky2022-12-22 05:50:40 -0500
commit20f235ed4c4be0ab0467be162669667e4b0faaf9 (patch)
treec073561b09438376fd460778dfa7d3eaad14f863
parent0e843c95b936762284a76ac79e5fc67b484c034b (diff)
downloadaur-20f235ed4c4be0ab0467be162669667e4b0faaf9.tar.gz
Update to 6.1.1-1
Run away memory with CONFIG_DEBUG_INFO=y enabled is not longer an issue, peak memory use during build was <5G
-rw-r--r--.SRCINFO20
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch4
-rw-r--r--0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch4
-rw-r--r--0003-futex-Resend-potentially-swallowed-owner-death-notif.patch100
-rw-r--r--PKGBUILD31
5 files changed, 127 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1bc0fcb99d86..a8ebe76416e4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,32 +1,35 @@
pkgbase = linux-ck
- pkgver = 6.1
+ pkgver = 6.1.1
pkgrel = 1
url = https://wiki.archlinux.org/index.php/Linux-ck
arch = x86_64
license = GPL2
makedepends = bc
makedepends = libelf
+ makedepends = pahole
makedepends = cpio
makedepends = perl
makedepends = tar
makedepends = xz
options = !strip
- source = https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.tar.xz
- source = https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.tar.sign
+ source = https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.1.tar.xz
+ source = https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.1.tar.sign
source = config
- source = more-uarches-20221104.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20221104.tar.gz
+ source = more-uarches-20221217.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20221217.tar.gz
source = ck-hrtimer-fdbdf7e0ec56cd59e11d024c473e766429271a5c.tar.gz::https://github.com/graysky2/linux-patches/archive/fdbdf7e0ec56cd59e11d024c473e766429271a5c.tar.gz
source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
source = 0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch
+ source = 0003-futex-Resend-potentially-swallowed-owner-death-notif.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
- sha256sums = 2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb
+ sha256sums = a3e61377cf4435a9e2966b409a37a1056f6aaa59e561add9125a88e3c0971dfb
sha256sums = SKIP
sha256sums = 0571ea17a2e38458096b679418197bbea8c414388f628d122517f3a1f3a31b3a
- sha256sums = 3a8f397b89bad95c46f42c0f80ede7536a4a45a28621e00ed486918a55f905ed
+ sha256sums = f1d586e111932890ad5e0df15d092fb9b3f87bae4ea17812aae9b0ec98fe2db0
sha256sums = 6d3b9cb4639c1c5eb4e2697aed0dbffa5b4a37d63a0861dec8315dd052723e0e
- sha256sums = 01f0f3d1b79fd789e01ba5debb3b63e9716679199b6fd79e81744d688632e273
- sha256sums = a3dc6156ca04fef849662a8febd2ebc7ca175de54253ef293f4c8ce638149507
+ sha256sums = 865fa8cc41186a42225e89c845d438aefae6332d1ef18b94ef3aae04deb5e784
+ sha256sums = 9c6191b355fcaf41cfeb92105ea0d24bbc51c993877d3fb5325f139997ede058
+ sha256sums = 748e40e3a4b889850e8f86aee7ff96a93d43476a6529316bd823e18e23fc82f8
pkgname = linux-ck
pkgdesc = The Linux kernel and modules with ck's hrtimer patches
@@ -43,4 +46,5 @@ pkgname = linux-ck
pkgname = linux-ck-headers
pkgdesc = Headers and scripts for building modules for Linux-ck kernel
+ depends = pahole
depends = linux-ck
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 4d8686f77412..7649aaeb5834 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 d50977b164e708bf523a35ef53315355528c3ca6 Mon Sep 17 00:00:00 2001
+From c1992e54412eedc904c7a0997ead8ecf6ef50ea6 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/4] ZEN: Add sysctl and CONFIG to disallow unprivileged
CLONE_NEWUSER
Our default behavior continues to match the vanilla kernel.
diff --git a/0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch b/0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch
index ce67dba036f5..79c0d9e02e16 100644
--- a/0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch
+++ b/0002-drm-i915-improve-the-catch-all-evict-to-handle-lock-.patch
@@ -1,7 +1,7 @@
-From 0c079d3f88df5f8286cd5c91b54bdac7c819be85 Mon Sep 17 00:00:00 2001
+From c2337439f6d74e9f8e003e55c786839886bc4911 Mon Sep 17 00:00:00 2001
From: Matthew Auld <matthew.auld@intel.com>
Date: Tue, 6 Dec 2022 16:11:41 +0000
-Subject: [PATCH 2/3] drm/i915: improve the catch-all evict to handle lock
+Subject: [PATCH 2/4] drm/i915: improve the catch-all evict to handle lock
contention
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
diff --git a/0003-futex-Resend-potentially-swallowed-owner-death-notif.patch b/0003-futex-Resend-potentially-swallowed-owner-death-notif.patch
new file mode 100644
index 000000000000..5ac537cb9140
--- /dev/null
+++ b/0003-futex-Resend-potentially-swallowed-owner-death-notif.patch
@@ -0,0 +1,100 @@
+From 189603b802a2bb276b82a0a4f66528ad29156f46 Mon Sep 17 00:00:00 2001
+From: Alexey Izbyshev <izbyshev@ispras.ru>
+Date: Sat, 12 Nov 2022 00:54:39 +0300
+Subject: [PATCH 3/4] futex: Resend potentially swallowed owner death
+ notification
+
+Commit ca16d5bee598 ("futex: Prevent robust futex exit race") addressed
+two cases when tasks waiting on a robust non-PI futex remained blocked
+despite the futex not being owned anymore:
+
+* if the owner died after writing zero to the futex word, but before
+ waking up a waiter
+
+* if a task waiting on the futex was woken up, but died before updating
+ the futex word (effectively swallowing the notification without acting
+ on it)
+
+In the second case, the task could be woken up either by the previous
+owner (after the futex word was reset to zero) or by the kernel (after
+the OWNER_DIED bit was set and the TID part of the futex word was reset
+to zero) if the previous owner died without the resetting the futex.
+
+Because the referenced commit wakes up a potential waiter only if the
+whole futex word is zero, the latter subcase remains unaddressed.
+
+Fix this by looking only at the TID part of the futex when deciding
+whether a wake up is needed.
+
+Fixes: ca16d5bee598 ("futex: Prevent robust futex exit race")
+Signed-off-by: Alexey Izbyshev <izbyshev@ispras.ru>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lore.kernel.org/r/20221111215439.248185-1-izbyshev@ispras.ru
+---
+ kernel/futex/core.c | 26 +++++++++++++++++---------
+ 1 file changed, 17 insertions(+), 9 deletions(-)
+
+diff --git a/kernel/futex/core.c b/kernel/futex/core.c
+index b22ef1efe751..514e4582b863 100644
+--- a/kernel/futex/core.c
++++ b/kernel/futex/core.c
+@@ -638,6 +638,7 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,
+ bool pi, bool pending_op)
+ {
+ u32 uval, nval, mval;
++ pid_t owner;
+ int err;
+
+ /* Futex address must be 32bit aligned */
+@@ -659,6 +660,10 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,
+ * 2. A woken up waiter is killed before it can acquire the
+ * futex in user space.
+ *
++ * In the second case, the wake up notification could be generated
++ * by the unlock path in user space after setting the futex value
++ * to zero or by the kernel after setting the OWNER_DIED bit below.
++ *
+ * In both cases the TID validation below prevents a wakeup of
+ * potential waiters which can cause these waiters to block
+ * forever.
+@@ -667,24 +672,27 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,
+ *
+ * 1) task->robust_list->list_op_pending != NULL
+ * @pending_op == true
+- * 2) User space futex value == 0
++ * 2) The owner part of user space futex value == 0
+ * 3) Regular futex: @pi == false
+ *
+ * If these conditions are met, it is safe to attempt waking up a
+ * potential waiter without touching the user space futex value and
+- * trying to set the OWNER_DIED bit. The user space futex value is
+- * uncontended and the rest of the user space mutex state is
+- * consistent, so a woken waiter will just take over the
+- * uncontended futex. Setting the OWNER_DIED bit would create
+- * inconsistent state and malfunction of the user space owner died
+- * handling.
++ * trying to set the OWNER_DIED bit. If the futex value is zero,
++ * the rest of the user space mutex state is consistent, so a woken
++ * waiter will just take over the uncontended futex. Setting the
++ * OWNER_DIED bit would create inconsistent state and malfunction
++ * of the user space owner died handling. Otherwise, the OWNER_DIED
++ * bit is already set, and the woken waiter is expected to deal with
++ * this.
+ */
+- if (pending_op && !pi && !uval) {
++ owner = uval & FUTEX_TID_MASK;
++
++ if (pending_op && !pi && !owner) {
+ futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY);
+ return 0;
+ }
+
+- if ((uval & FUTEX_TID_MASK) != task_pid_vnr(curr))
++ if (owner != task_pid_vnr(curr))
+ return 0;
+
+ /*
+--
+2.39.0
+
diff --git a/PKGBUILD b/PKGBUILD
index c9ef8b721515..1c3cb282e710 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -68,13 +68,13 @@ _subarch=
### IMPORTANT: Do no edit below this line unless you know what you're doing
pkgbase=linux-ck
-pkgver=6.1
+pkgver=6.1.1
pkgrel=1
arch=(x86_64)
url="https://wiki.archlinux.org/index.php/Linux-ck"
license=(GPL2)
makedepends=(
- bc libelf cpio perl tar xz
+ bc libelf pahole cpio perl tar xz
)
[[ -n "$_clangbuild" ]] && makedepends+=(clang llvm lld python)
options=('!strip')
@@ -84,7 +84,7 @@ options=('!strip')
_ckhrtimer=linux-6.1.y
_commit=fdbdf7e0ec56cd59e11d024c473e766429271a5c
-_gcc_more_v=20221104
+_gcc_more_v=20221217
source=(
"https://www.kernel.org/pub/linux/kernel/v6.x/linux-$pkgver.tar".{xz,sign}
config # the main kernel config file
@@ -92,18 +92,20 @@ 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-i915-improve-the-catch-all-evict-to-handle-lock-.patch
+ 0003-futex-Resend-potentially-swallowed-owner-death-notif.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
-sha256sums=('2ca1f17051a430f6fed1196e4952717507171acfd97d96577212502703b25deb'
+sha256sums=('a3e61377cf4435a9e2966b409a37a1056f6aaa59e561add9125a88e3c0971dfb'
'SKIP'
'0571ea17a2e38458096b679418197bbea8c414388f628d122517f3a1f3a31b3a'
- '3a8f397b89bad95c46f42c0f80ede7536a4a45a28621e00ed486918a55f905ed'
+ 'f1d586e111932890ad5e0df15d092fb9b3f87bae4ea17812aae9b0ec98fe2db0'
'6d3b9cb4639c1c5eb4e2697aed0dbffa5b4a37d63a0861dec8315dd052723e0e'
- '01f0f3d1b79fd789e01ba5debb3b63e9716679199b6fd79e81744d688632e273'
- 'a3dc6156ca04fef849662a8febd2ebc7ca175de54253ef293f4c8ce638149507')
+ '865fa8cc41186a42225e89c845d438aefae6332d1ef18b94ef3aae04deb5e784'
+ '9c6191b355fcaf41cfeb92105ea0d24bbc51c993877d3fb5325f139997ede058'
+ '748e40e3a4b889850e8f86aee7ff96a93d43476a6529316bd823e18e23fc82f8')
prepare() {
cd linux-${pkgver}
@@ -125,17 +127,6 @@ prepare() {
echo "Setting config..."
cp ../config .config
- # disable CONFIG_DEBUG_INFO=y at build time otherwise memory usage blows up
- # and can easily overwhelm a system with 32 GB of memory using a tmpfs build
- # partition ... this was introduced by FS#66260, see:
- # https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux&id=663b08666b269eeeeaafbafaee07fd03389ac8d7
- scripts/config --disable CONFIG_DEBUG_INFO
- scripts/config --disable CONFIG_CGROUP_BPF
- scripts/config --disable CONFIG_BPF_LSM
- scripts/config --disable CONFIG_BPF_PRELOAD
- scripts/config --disable CONFIG_BPF_LIRC_MODE2
- scripts/config --disable CONFIG_BPF_KPROBE_OVERRIDE
-
# https://bbs.archlinux.org/viewtopic.php?pid=1824594#p1824594
scripts/config --enable CONFIG_PSI_DEFAULT_DISABLED
@@ -246,7 +237,7 @@ _package() {
_package-headers() {
pkgdesc="Headers and scripts for building modules for ${pkgbase/linux/Linux} kernel"
- depends=("$pkgbase") # added to keep kernel and headers packages matched
+ depends=(pahole "$pkgbase") # added to keep kernel and headers packages matched
#groups=('ck-generic')
cd linux-${pkgver}
@@ -263,7 +254,7 @@ _package-headers() {
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# required when DEBUG_INFO_BTF_MODULES is enabled
- #install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
+ install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
echo "Installing headers..."
cp -t "$builddir" -a include