summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2022-06-15 20:52:20 -0400
committergraysky2022-06-15 20:52:20 -0400
commit48a238b731736c76d9416df7810159b081312b0d (patch)
tree38dfcc162de7c24289fb71e9dd57b3a341dc4620
parentb0756dece3a231e6c4b4c8c8e823d7b6109c92b2 (diff)
downloadaur-48a238b731736c76d9416df7810159b081312b0d.tar.gz
Update to 5.18.4-1
-rw-r--r--.SRCINFO14
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch12
-rw-r--r--0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch107
-rw-r--r--PKGBUILD10
-rw-r--r--config15
5 files changed, 140 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 956bd0b212de..d9dbd40033f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = linux-ck
- pkgver = 5.18.3
+ pkgver = 5.18.4
pkgrel = 1
url = https://wiki.archlinux.org/index.php/Linux-ck
arch = x86_64
@@ -11,20 +11,22 @@ pkgbase = linux-ck
makedepends = tar
makedepends = xz
options = !strip
- source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.18.3.tar.xz
- source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.18.3.tar.sign
+ source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.18.4.tar.xz
+ source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.18.4.tar.sign
source = config
source = more-uarches-20220315.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/20220315.tar.gz
source = ck-hrtimer-5d3a0424bdbfdf2fc4cca389bf0f1ee4876e782d.tar.gz::https://github.com/graysky2/linux-patches/archive/5d3a0424bdbfdf2fc4cca389bf0f1ee4876e782d.tar.gz
source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+ source = 0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
- sha256sums = c70cb405076c3cfd73e4de729430b0342ea21b92a04d8284a03fac664ef1cfea
+ sha256sums = 4b7193476f79c56b0d9988f68777dd0f885a1965e6fd55ec015922aa789492dd
sha256sums = SKIP
- sha256sums = 9f4fda38f1c59f7a20a76eff48a0cb302cb0e8e55bda53ec0f1807e10dcdad3a
+ sha256sums = 4dfb25ec17a6ba9f78fa9c0c4e4202f016d6aa92adb83f9e16a3835a0d067bfa
sha256sums = 5a29d172d442a3f31a402d7d306aaa292b0b5ea29139d05080a55e2425f48c5c
sha256sums = 0506bdad4255ccc8165e39b2567450a3b12de2759ed7b42c0c90de1c57b1a283
- sha256sums = 93d720a496ac649851ac8e78bcbea93a54e422eb11ef770e84c4d8693e681925
+ sha256sums = 7294286511384aa7f7685b7f9cbe1d9729cc2ab8306541c9bdc6a521e2c92cb8
+ sha256sums = 15a2140a4bbf6b8ef32ddd6f7f65633c4af6aad9ca788c863d2d3fcfc0656fb2
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 081721495a2d..bdb5b9a519b5 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 6b212353b9dd9da3c9ff4272ca951d97fb6b10b4 Mon Sep 17 00:00:00 2001
+From 81630fb51fe95fd5d184974ed0c9074f0d9a648d 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/2] 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,10 +36,10 @@ index 33a4240e6a6f..82213f9c4c17 100644
{
return &init_user_ns;
diff --git a/init/Kconfig b/init/Kconfig
-index ddcbefe535e9..f05715cf89af 100644
+index b19e2eeaae80..2c2e01d76076 100644
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -1235,6 +1235,22 @@ config USER_NS
+@@ -1240,6 +1240,22 @@ config USER_NS
If unsure, say N.
@@ -63,7 +63,7 @@ index ddcbefe535e9..f05715cf89af 100644
bool "PID Namespaces"
default y
diff --git a/kernel/fork.c b/kernel/fork.c
-index 35a3beff140b..b013ab5ee88f 100644
+index 0d8abfb9e0f4..bd7c215e315f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -99,6 +99,10 @@
@@ -88,7 +88,7 @@ index 35a3beff140b..b013ab5ee88f 100644
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
-@@ -3110,6 +3118,12 @@ int ksys_unshare(unsigned long unshare_flags)
+@@ -3128,6 +3136,12 @@ int ksys_unshare(unsigned long unshare_flags)
if (unshare_flags & CLONE_NEWNS)
unshare_flags |= CLONE_FS;
diff --git a/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch b/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch
new file mode 100644
index 000000000000..3fa5fe6ec37b
--- /dev/null
+++ b/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch
@@ -0,0 +1,107 @@
+From 759410cbc43568775113a7d1c6bff1286a0d2a91 Mon Sep 17 00:00:00 2001
+From: Bryan Cain <bryancain3@gmail.com>
+Date: Thu, 5 May 2022 13:12:21 -0600
+Subject: [PATCH 2/3] HID: apple: Properly handle function keys on Keychron
+ keyboards
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Keychron's C-series and K-series of keyboards copy the vendor and
+product IDs of an Apple keyboard, but only behave like that device when
+set to "Mac" mode. In "Windows" mode, the Fn key doesn't generate a
+scancode, so it's impossible to use the F1-F12 keys when fnmode is set
+to its default value of 1.
+
+To fix this, make fnmode default to the new value of 3, which behaves
+like fnmode=2 for Keychron keyboards and like fnmode=1 for actual Apple
+keyboards. This way, Keychron devices are fully usable in both "Windows"
+and "Mac" modes, while behavior is unchanged for everything else.
+
+Signed-off-by: Bryan Cain <bryancain3@gmail.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Tested-by: José Expósito <jose.exposito89@gmail.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+---
+ drivers/hid/hid-apple.c | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
+index 0cf35caee9fa..42a568902f49 100644
+--- a/drivers/hid/hid-apple.c
++++ b/drivers/hid/hid-apple.c
+@@ -21,6 +21,7 @@
+ #include <linux/module.h>
+ #include <linux/slab.h>
+ #include <linux/timer.h>
++#include <linux/string.h>
+
+ #include "hid-ids.h"
+
+@@ -35,16 +36,17 @@
+ #define APPLE_NUMLOCK_EMULATION BIT(8)
+ #define APPLE_RDESC_BATTERY BIT(9)
+ #define APPLE_BACKLIGHT_CTL BIT(10)
++#define APPLE_IS_KEYCHRON BIT(11)
+
+ #define APPLE_FLAG_FKEY 0x01
+
+ #define HID_COUNTRY_INTERNATIONAL_ISO 13
+ #define APPLE_BATTERY_TIMEOUT_MS 60000
+
+-static unsigned int fnmode = 1;
++static unsigned int fnmode = 3;
+ module_param(fnmode, uint, 0644);
+ MODULE_PARM_DESC(fnmode, "Mode of fn key on Apple keyboards (0 = disabled, "
+- "[1] = fkeyslast, 2 = fkeysfirst)");
++ "1 = fkeyslast, 2 = fkeysfirst, [3] = auto)");
+
+ static int iso_layout = -1;
+ module_param(iso_layout, int, 0644);
+@@ -349,6 +351,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
+ const struct apple_key_translation *trans, *table;
+ bool do_translate;
+ u16 code = 0;
++ unsigned int real_fnmode;
+
+ u16 fn_keycode = (swap_fn_leftctrl) ? (KEY_LEFTCTRL) : (KEY_FN);
+
+@@ -359,7 +362,13 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
+ return 1;
+ }
+
+- if (fnmode) {
++ if (fnmode == 3) {
++ real_fnmode = (asc->quirks & APPLE_IS_KEYCHRON) ? 2 : 1;
++ } else {
++ real_fnmode = fnmode;
++ }
++
++ if (real_fnmode) {
+ if (hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI ||
+ hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO ||
+ hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS ||
+@@ -406,7 +415,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
+
+ if (!code) {
+ if (trans->flags & APPLE_FLAG_FKEY) {
+- switch (fnmode) {
++ switch (real_fnmode) {
+ case 1:
+ do_translate = !asc->fn_on;
+ break;
+@@ -660,6 +669,11 @@ static int apple_input_configured(struct hid_device *hdev,
+ asc->quirks &= ~APPLE_HAS_FN;
+ }
+
++ if (strncmp(hdev->name, "Keychron", 8) == 0) {
++ hid_info(hdev, "Keychron keyboard detected; function keys will default to fnmode=2 behavior\n");
++ asc->quirks |= APPLE_IS_KEYCHRON;
++ }
++
+ return 0;
+ }
+
+--
+2.36.1
+
diff --git a/PKGBUILD b/PKGBUILD
index a260b090c892..cbe748ffa288 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -68,7 +68,7 @@ _subarch=
### IMPORTANT: Do no edit below this line unless you know what you're doing
pkgbase=linux-ck
-pkgver=5.18.3
+pkgver=5.18.4
pkgrel=1
arch=(x86_64)
url="https://wiki.archlinux.org/index.php/Linux-ck"
@@ -91,17 +91,19 @@ source=(
"more-uarches-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_compiler_patch/archive/$_gcc_more_v.tar.gz"
"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-HID-apple-Properly-handle-function-keys-on-Keychron-.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
-sha256sums=('c70cb405076c3cfd73e4de729430b0342ea21b92a04d8284a03fac664ef1cfea'
+sha256sums=('4b7193476f79c56b0d9988f68777dd0f885a1965e6fd55ec015922aa789492dd'
'SKIP'
- '9f4fda38f1c59f7a20a76eff48a0cb302cb0e8e55bda53ec0f1807e10dcdad3a'
+ '4dfb25ec17a6ba9f78fa9c0c4e4202f016d6aa92adb83f9e16a3835a0d067bfa'
'5a29d172d442a3f31a402d7d306aaa292b0b5ea29139d05080a55e2425f48c5c'
'0506bdad4255ccc8165e39b2567450a3b12de2759ed7b42c0c90de1c57b1a283'
- '93d720a496ac649851ac8e78bcbea93a54e422eb11ef770e84c4d8693e681925')
+ '7294286511384aa7f7685b7f9cbe1d9729cc2ab8306541c9bdc6a521e2c92cb8'
+ '15a2140a4bbf6b8ef32ddd6f7f65633c4af6aad9ca788c863d2d3fcfc0656fb2')
prepare() {
cd linux-${pkgver}
diff --git a/config b/config
index b89f137e5df2..48f9aa1f03d9 100644
--- a/config
+++ b/config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 5.18.3-arch1 Kernel Configuration
+# Linux/x86 5.18.4-arch1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.1.0"
CONFIG_CC_IS_GCC=y
@@ -10206,8 +10206,18 @@ CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y
# CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set
# CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set
CONFIG_SECURITY_LANDLOCK=y
-# CONFIG_INTEGRITY is not set
+CONFIG_INTEGRITY=y
+CONFIG_INTEGRITY_SIGNATURE=y
+CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
+CONFIG_INTEGRITY_TRUSTED_KEYRING=y
+CONFIG_INTEGRITY_PLATFORM_KEYRING=y
+CONFIG_INTEGRITY_MACHINE_KEYRING=y
+CONFIG_LOAD_UEFI_KEYS=y
+CONFIG_INTEGRITY_AUDIT=y
+# CONFIG_IMA is not set
+# CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY is not set
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
+# CONFIG_EVM is not set
# CONFIG_DEFAULT_SECURITY_SELINUX is not set
# CONFIG_DEFAULT_SECURITY_SMACK is not set
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
@@ -10621,6 +10631,7 @@ CONFIG_LRU_CACHE=m
CONFIG_CLZ_TAB=y
CONFIG_IRQ_POLL=y
CONFIG_MPILIB=y
+CONFIG_SIGNATURE=y
CONFIG_DIMLIB=y
CONFIG_OID_REGISTRY=y
CONFIG_UCS2_STRING=y