summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorblacksky32023-07-01 00:11:54 -0400
committerblacksky32023-07-01 00:11:54 -0400
commitec804243429f6b5fbdef5624fbfaedf582c6d281 (patch)
treec3d87284198a7a5f69c8026fa3c1de6cd6278b2b
parent151f212683a8c060e196c4fa2aff2c68cab83948 (diff)
downloadaur-ec804243429f6b5fbdef5624fbfaedf582c6d281.tar.gz
update to 6.4.0
-rw-r--r--.SRCINFO100
-rw-r--r--0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch154
-rw-r--r--PKGBUILD272
3 files changed, 309 insertions, 217 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c466822829f7..de5fcd42518c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,20 @@
pkgbase = linux-llvm
- pkgdesc = The Linux kernel and modules - Build with LLVM/CLANG
- pkgver = 6.3.8
+ pkgver = 6.4.0
pkgrel = 1
url = https://www.kernel.org/
arch = x86_64
license = GPL2
makedepends = bc
- makedepends = kmod
+ makedepends = cpio
+ makedepends = gettext
+ makedepends = git
makedepends = libelf
makedepends = pahole
- makedepends = cpio
makedepends = perl
makedepends = tar
makedepends = xz
+ makedepends = kmod
makedepends = xmlto
- makedepends = git
makedepends = bison
makedepends = flex
makedepends = zstd
@@ -30,13 +30,91 @@ pkgbase = linux-llvm
makedepends = lld
makedepends = python
options = !strip
- source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.3.8.tar.xz
- source = https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/e7308a977d83f3cf94ed228b0f6b9b65a4d9139c/config
- source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
- sha256sums = 4323d421250e2e444c35d36f4aa8ddb56591dedc25c68d359d19c4ef9dd20955
- sha256sums = 6508516de94ed941ae755d89807610dc51fe1229dbfecdf8a82604a8d33242ce
- sha256sums = d4edb692d0a1772af639730d898282e92a3c06acc46e5a55429315b2a5763e82
+ source = https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.tar.xz
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/1b45fa8cd58990bf455b429c598b6d4bad155172/config
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/arch/v6.4-arch1/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/amd/0001-amd-6.4-merge-changes-from-dev-tree-v2.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/bfq/0001-bfq-cachyos-patches-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/block/0001-block-set-rq_affinity-to-force-full-multithreading-I-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/btrfs/0001-btrfs-6.4-merge-changes-from-dev-tree-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/clang/0001-clang-6.4-add-miscellaneous-fixes-for-clang-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/drm/0001-drm-6.4-Add-HDR-patches-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/hid/0001-hid-6.4-merge-changes-from-dev-tree-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/x86/0001-x86-Avoid-relocation-information-in-final-vmlinux-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/zstd/0001-zstd-6.4-import-v1.5.5-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/sirlucjan/zstd/0001-zstd-modules-cachyos-patches-v1.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/tkg/0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/tkg/0002-mm-Support-soft-dirty-flag-read-with-reset.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/tkg/0013-optimize_harder_O3.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0001-PCI-Enable-overrides-for-missing-ACS-capabilities.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0001-futex-Add-entry-point-for-FUTEX_WAIT_MULTIPLE-opcode.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0001-winesync-Introduce-the-winesync-driver-and-character.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0001-x86-kconfig-more-uarches-for-kernel-5.17-xm_rev2.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0001-XANMOD-x86-build-Add-more-x86_64-optimizations.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0002-XANMOD-Makefile-Move-ARM-and-x86-instruction-set-sel.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0003-XANMOD-fair-Increase-wake-up-granularity-time-to-3ms.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0011-XANMOD-dcache-cache_pressure-50-decreases-the-rate-a.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0012-XANMOD-mm-vmscan-vm_swappiness-30-decreases-the-amou.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/0016-XANMOD-Makefile-Disable-GCC-vectorization-on-trees.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0001-sched-fair-Record-the-average-duration-of-a-task.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0002-sched-fair-Introduce-SIS_CURRENT-to-wake-up-short-ta.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0003-x86-vdso-Use-lfence-instead-of-rep-and-nop.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0004-sched-wait-Do-accept-in-LIFO-order-for-cache-efficie.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0005-intel_rapl-Silence-rapl-trace-debug.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0006-firmware-Enable-stateless-firmware-loading.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0007-locking-rwsem-spin-faster.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0008-drivers-initialize-ata-before-graphics.patch
+ source = https://raw.githubusercontent.com/blacksky3/patches/main/6.4/xanmod/intel/0009-init-wait-for-partition-and-retry-scan.patch
+ sha256sums = 8fa0588f0c2ceca44cac77a0e39ba48c9f00a6b9dc69761c02a5d3efac8da7f3
+ sha256sums = ab8e459ac900f4f2b2677d9692177afdfb215e75b8315259ef8bdd0a1ea032e1
+ sha256sums = db411b01a5896283fdaf1cf30733d41e9740320a3f422b23ee8b376b8a5e8930
+ sha256sums = 1827e974d83d452c8a07bf1a6a1593d214f9a9fe61d3dba8a072c2b1c42673d2
+ sha256sums = 12de7fe29e482e6f0edfd48123c468a309b69d3cca1be4a773c1b96ef6697d22
+ sha256sums = 5d0faf58c6c9e58d709ec2e136bdd576ebd4c0f7d630bef5a05bf188dd482579
+ sha256sums = 2cab3863f3e21a8f8e83b3f86743c57c3f37bf086cc01ebf4573c218df229655
+ sha256sums = 47b6485d9a31eba9589d3ea295239411fc5ae71972cf2e5b94172290d8c12186
+ sha256sums = 5b9a5d0c5c81960d981d01febe201689794b58bb835b2cadadfbdda42b74f47f
+ sha256sums = 0867b5cb21a0765fd7b76d3724fc8a258bedbba974b6e4dbd62348f6ce7d9cee
+ sha256sums = 81cc1547d62933e04aed15c57b9e93101e546298b1fef5f63a6b1469471acebe
+ sha256sums = dd20963020f83e30497ebeccdeace10e98b74ebffa5847de334eeaaae80f5046
+ sha256sums = de7a2748545b2b5d0082c09373c14d9ee41110dfa5e30a3be02e3500c2a8118c
+ sha256sums = 7c913c3b58001d3534b1f1828e920ca61707b545c228714420237af51f2ec77b
+ sha256sums = 1fbf26545a49ce297434fa2c39217361cdd90285b2c5ff04c505008037ede6c5
+ sha256sums = 85669071475af9e4ca74cb15c1f277dadd5ea7b3050f443712da77230a4aa488
+ sha256sums = b4b4f1c20891d1b104354dd574dda80d2f3c5e4f49c76f361c058ffb5b973fd4
+ sha256sums = 4fd244250dad9949dffad6a42b702384c1b1197297f87ffe80cb45496c29cb25
+ sha256sums = f440d27364ad757ea3cf36454a590f0329f8a6e29f630aa497705840f72e214a
+ sha256sums = 75b4f9c09aeaa34f14677ccf8dffe30d786b12235eaf4a0cd9654eaa14e63bbb
+ sha256sums = 5756ce78a788e58f6986640f4699bdb0672742e264b8702997ef5e7feadfc6db
+ sha256sums = f3008b53ec36dba2d71640d8605f6cbf4c5951beadb62f1b614eeefd74d7bdb2
+ sha256sums = 5e7549f6f4d1f5a2f414f9d7c5a28e8079196084942a9d3e95c074cfcc984977
+ sha256sums = 71e4fae21123107f00b5e08f0345591f41c61aa918d3e3680c025ce3a78a8a64
+ sha256sums = 9a1eb034d4a142be9686835d47ebe1998d8f618436756c89b4521fa1a7f13e0f
+ sha256sums = ab6409a7a582ef65bd44519bc56b06eb796c450468a88c7d4fdd67f972488b1b
+ sha256sums = b10fed04277d5808998c5db0ed3147dd003dc74ff548218fe75d6eda985d68c0
+ sha256sums = d1b2e2db347114ccb13ca9c8aaff65e7180cb722f4dc46c82bc5df248edebe63
+ sha256sums = 1e8d4ddba087aeac79c54acee0f37b4ee5d2c7f43f064b2c8cf29d668f798e3f
+ sha256sums = 6579c78554b1f1e97a6a439b4287cd542747208774af4070b6d116456e575429
+ sha256sums = 0ad556c65afca9688ea495106c632d7e479e60e4e2241007a7ef4120f65b27a0
+ sha256sums = 217791179fcf7d522ed8065b4cf49fb9097522b936a8852901dde0702ea90954
+ sha256sums = 9a0fd7b40032514b83ec200cd7aeffccf835889c4b86c012e1b9f50fffbfd1a2
+ sha256sums = 8b7be40de00645ca42ee5c7079bf7d7531de75ecdff97a30914d5d604d7efb58
+ sha256sums = 7352643e67f651d322b2443e25f7b6ab30a667e3dde6fc2688cb75c24ef0ae84
pkgname = linux-llvm
+ pkgdesc = The Linux kernel and modules with Arch and other improvement patches - Build with LLVM/CLANG
+ depends = coreutils
+ depends = initramfs
+ depends = kmod
+ optdepends = wireless-regdb: to set the correct wireless channels of your country
+ optdepends = linux-firmware: firmware images needed for some devices
+ provides = VIRTUALBOX-GUEST-MODULES
+ provides = WIREGUARD-MODULE
+ provides = KSMBD-MODULE
+ replaces = virtualbox-guest-modules-arch
+ replaces = wireguard-arch
pkgname = linux-llvm-headers
+ pkgdesc = Headers and scripts for building modules for the linux-llvm package
+ depends = linux-llvm
+ depends = pahole
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
deleted file mode 100644
index b48186b1a10b..000000000000
--- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From d73ae82da61377a3f89ec5eded369fd186cbd165 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] ZEN: Add sysctl and CONFIG to disallow unprivileged
- CLONE_NEWUSER
-
-Our default behavior continues to match the vanilla kernel.
----
- include/linux/user_namespace.h | 4 ++++
- init/Kconfig | 16 ++++++++++++++++
- kernel/fork.c | 14 ++++++++++++++
- kernel/sysctl.c | 12 ++++++++++++
- kernel/user_namespace.c | 7 +++++++
- 5 files changed, 53 insertions(+)
-
-diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
-index 45f09bec0..87b20e2ee 100644
---- a/include/linux/user_namespace.h
-+++ b/include/linux/user_namespace.h
-@@ -148,6 +148,8 @@ static inline void set_userns_rlimit_max(struct user_namespace *ns,
-
- #ifdef CONFIG_USER_NS
-
-+extern int unprivileged_userns_clone;
-+
- static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
- {
- if (ns)
-@@ -181,6 +183,8 @@ extern bool current_in_userns(const struct user_namespace *target_ns);
- struct ns_common *ns_get_owner(struct ns_common *ns);
- #else
-
-+#define unprivileged_userns_clone 0
-+
- static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
- {
- return &init_user_ns;
-diff --git a/init/Kconfig b/init/Kconfig
-index c88bb30a8..32ba96d94 100644
---- a/init/Kconfig
-+++ b/init/Kconfig
-@@ -1249,6 +1249,22 @@ config USER_NS
-
- If unsure, say N.
-
-+config USER_NS_UNPRIVILEGED
-+ bool "Allow unprivileged users to create namespaces"
-+ default y
-+ depends on USER_NS
-+ help
-+ When disabled, unprivileged users will not be able to create
-+ new namespaces. Allowing users to create their own namespaces
-+ has been part of several recent local privilege escalation
-+ exploits, so if you need user namespaces but are
-+ paranoid^Wsecurity-conscious you want to disable this.
-+
-+ This setting can be overridden at runtime via the
-+ kernel.unprivileged_userns_clone sysctl.
-+
-+ If unsure, say Y.
-+
- config PID_NS
- bool "PID Namespaces"
- default y
-diff --git a/kernel/fork.c b/kernel/fork.c
-index 1ec1e9ea4..90e639a39 100644
---- a/kernel/fork.c
-+++ b/kernel/fork.c
-@@ -98,6 +98,10 @@
- #include <linux/bpf.h>
- #include <linux/stackprotector.h>
-
-+#ifdef CONFIG_USER_NS
-+#include <linux/user_namespace.h>
-+#endif
-+
- #include <asm/pgalloc.h>
- #include <linux/uaccess.h>
- #include <asm/mmu_context.h>
-@@ -2032,6 +2036,10 @@ static __latent_entropy struct task_struct *copy_process(
- if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
- return ERR_PTR(-EINVAL);
-
-+ if ((clone_flags & CLONE_NEWUSER) && !unprivileged_userns_clone)
-+ if (!capable(CAP_SYS_ADMIN))
-+ return ERR_PTR(-EPERM);
-+
- /*
- * Thread groups must share signals as well, and detached threads
- * can only be started up within the thread group.
-@@ -3182,6 +3190,12 @@ int ksys_unshare(unsigned long unshare_flags)
- if (unshare_flags & CLONE_NEWNS)
- unshare_flags |= CLONE_FS;
-
-+ if ((unshare_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) {
-+ err = -EPERM;
-+ if (!capable(CAP_SYS_ADMIN))
-+ goto bad_unshare_out;
-+ }
-+
- err = check_unshare_flags(unshare_flags);
- if (err)
- goto bad_unshare_out;
-diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index 1c240d2c9..2971581a2 100644
---- a/kernel/sysctl.c
-+++ b/kernel/sysctl.c
-@@ -81,6 +81,9 @@
- #ifdef CONFIG_RT_MUTEXES
- #include <linux/rtmutex.h>
- #endif
-+#ifdef CONFIG_USER_NS
-+#include <linux/user_namespace.h>
-+#endif
-
- /* shared constants to be used in various sysctls */
- const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 };
-@@ -1645,6 +1648,15 @@ static struct ctl_table kern_table[] = {
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
-+#ifdef CONFIG_USER_NS
-+ {
-+ .procname = "unprivileged_userns_clone",
-+ .data = &unprivileged_userns_clone,
-+ .maxlen = sizeof(int),
-+ .mode = 0644,
-+ .proc_handler = proc_dointvec,
-+ },
-+#endif
- #ifdef CONFIG_PROC_SYSCTL
- {
- .procname = "tainted",
-diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
-index 1d8e47bed..fec01d016 100644
---- a/kernel/user_namespace.c
-+++ b/kernel/user_namespace.c
-@@ -22,6 +22,13 @@
- #include <linux/bsearch.h>
- #include <linux/sort.h>
-
-+/* sysctl */
-+#ifdef CONFIG_USER_NS_UNPRIVILEGED
-+int unprivileged_userns_clone = 1;
-+#else
-+int unprivileged_userns_clone;
-+#endif
-+
- static struct kmem_cache *user_ns_cachep __read_mostly;
- static DEFINE_MUTEX(userns_state_mutex);
-
---
-2.41.0
-
diff --git a/PKGBUILD b/PKGBUILD
index 51dd4eee1912..c9f5fb2822b9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,32 +25,65 @@ BUILD_FLAGS=(CC=clang CXX=clang++ HOSTCC=clang HOSTCXX=clang++ LD=ld.lld LLVM=1
###################################################################################
pkgbase=linux-llvm
-pkgname=("$pkgbase" "$pkgbase-headers")
-for _p in "${pkgname[@]}"; do
- eval "package_$_p() {
- $(declare -f "_package${_p#$pkgbase}")
- _package${_p#$pkgbase}
- }"
-done
-pkgver=6.3.8
-_pkgver=6.3.8
+pkgver=6.4.0
+_pkgver=6.4
pkgrel=1
-major=6.3
-commit=e7308a977d83f3cf94ed228b0f6b9b65a4d9139c
+major=6.4
+commit=1b45fa8cd58990bf455b429c598b6d4bad155172
arch=(x86_64)
-pkgdesc='The Linux kernel and modules - Build with LLVM/CLANG'
url='https://www.kernel.org/'
license=(GPL2)
-makedepends=(bc kmod libelf pahole cpio perl tar xz xmlto git)
+makedepends=(bc cpio gettext git libelf pahole perl tar xz kmod xmlto)
+makepends+=(graphviz imagemagick python-sphinx texlive-latexextra) # htmldocs
makedepends+=(bison flex zstd make patch gcc gcc-libs glibc binutils)
-makedepends+=(clang llvm llvm-libs lld python) # For LLVM/CLANG
+makedepends+=(clang llvm llvm-libs lld python)
options=(!strip)
archlinuxpath=https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/$commit
+patchpath=https://raw.githubusercontent.com/blacksky3/patches/main/$major
source=(https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$_pkgver.tar.xz
${archlinuxpath}/config
- 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch)
+ # Arch patches
+ ${patchpath}/arch/v6.4-arch1/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+ # Other patches
+ # Sirlucjan
+ ${patchpath}/sirlucjan/amd/0001-amd-6.4-merge-changes-from-dev-tree-v2.patch
+ ${patchpath}/sirlucjan/bfq/0001-bfq-cachyos-patches-v1.patch
+ ${patchpath}/sirlucjan/block/0001-block-set-rq_affinity-to-force-full-multithreading-I-v1.patch
+ ${patchpath}/sirlucjan/btrfs/0001-btrfs-6.4-merge-changes-from-dev-tree-v1.patch
+ ${patchpath}/sirlucjan/clang/0001-clang-6.4-add-miscellaneous-fixes-for-clang-v1.patch
+ ${patchpath}/sirlucjan/drm/0001-drm-6.4-Add-HDR-patches-v1.patch
+ ${patchpath}/sirlucjan/hid/0001-hid-6.4-merge-changes-from-dev-tree-v1.patch
+ ${patchpath}/sirlucjan/x86/0001-x86-Avoid-relocation-information-in-final-vmlinux-v1.patch
+ ${patchpath}/sirlucjan/zstd/0001-zstd-6.4-import-v1.5.5-v1.patch
+ ${patchpath}/sirlucjan/zstd/0001-zstd-modules-cachyos-patches-v1.patch
+ # TKG
+ ${patchpath}/tkg/0001-mm-Support-soft-dirty-flag-reset-for-VA-range.patch
+ ${patchpath}/tkg/0002-mm-Support-soft-dirty-flag-read-with-reset.patch
+ ${patchpath}/tkg/0013-optimize_harder_O3.patch
+ # Xanmod
+ ${patchpath}/xanmod/0001-PCI-Enable-overrides-for-missing-ACS-capabilities.patch
+ ${patchpath}/xanmod/0001-futex-Add-entry-point-for-FUTEX_WAIT_MULTIPLE-opcode.patch
+ ${patchpath}/xanmod/0001-winesync-Introduce-the-winesync-driver-and-character.patch
+ ${patchpath}/xanmod/0001-x86-kconfig-more-uarches-for-kernel-5.17-xm_rev2.patch
+ ${patchpath}/xanmod/0001-XANMOD-x86-build-Add-more-x86_64-optimizations.patch
+ ${patchpath}/xanmod/0002-XANMOD-Makefile-Move-ARM-and-x86-instruction-set-sel.patch\
+ #${patchpath}/xanmod/0002-XANMOD-fair-Remove-all-energy-efficiency-functions.patch
+ ${patchpath}/xanmod/0003-XANMOD-fair-Increase-wake-up-granularity-time-to-3ms.patch
+ ${patchpath}/xanmod/0011-XANMOD-dcache-cache_pressure-50-decreases-the-rate-a.patch
+ ${patchpath}/xanmod/0012-XANMOD-mm-vmscan-vm_swappiness-30-decreases-the-amou.patch
+ ${patchpath}/xanmod/0016-XANMOD-Makefile-Disable-GCC-vectorization-on-trees.patch
+ # Xanmod Intel
+ ${patchpath}/xanmod/intel/0001-sched-fair-Record-the-average-duration-of-a-task.patch
+ ${patchpath}/xanmod/intel/0002-sched-fair-Introduce-SIS_CURRENT-to-wake-up-short-ta.patch
+ ${patchpath}/xanmod/intel/0003-x86-vdso-Use-lfence-instead-of-rep-and-nop.patch
+ ${patchpath}/xanmod/intel/0004-sched-wait-Do-accept-in-LIFO-order-for-cache-efficie.patch
+ ${patchpath}/xanmod/intel/0005-intel_rapl-Silence-rapl-trace-debug.patch
+ ${patchpath}/xanmod/intel/0006-firmware-Enable-stateless-firmware-loading.patch
+ ${patchpath}/xanmod/intel/0007-locking-rwsem-spin-faster.patch
+ ${patchpath}/xanmod/intel/0008-drivers-initialize-ata-before-graphics.patch
+ ${patchpath}/xanmod/intel/0009-init-wait-for-partition-and-retry-scan.patch)
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
@@ -90,36 +123,37 @@ prepare(){
plain ""
fi
- msg "Set LLVM/CLANG LTO"
-
- msg2 "Enable THIN LTO"
- scripts/config --enable CONFIG_LTO
- scripts/config --enable CONFIG_LTO_CLANG
- scripts/config --enable CONFIG_ARCH_SUPPORTS_LTO_CLANG
- scripts/config --enable CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN
- scripts/config --disable CONFIG_LTO_NONE
- scripts/config --enable CONFIG_HAS_LTO_CLANG
- scripts/config --disable CONFIG_LTO_CLANG_FULL
- scripts/config --enable CONFIG_LTO_CLANG_THIN
- scripts/config --enable CONFIG_HAVE_GCC_PLUGINS
-
- #msg2 "Enable FULL LTO"
- #scripts/config --enable CONFIG_LTO
- #scripts/config --enable CONFIG_LTO_CLANG
- #scripts/config --enable CONFIG_ARCH_SUPPORTS_LTO_CLANG
- #scripts/config --enable CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN
- #scripts/config --disable CONFIG_LTO_NONE
- #scripts/config --enable CONFIG_HAS_LTO_CLANG
- #scripts/config --enable CONFIG_LTO_CLANG_FULL
- #scripts/config --disable CONFIG_LTO_CLANG_THIN
- #scripts/config --enable CONFIG_HAVE_GCC_PLUGINS
-
- #msg2 "Disable LTO"
- #scripts/config --enable CONFIG_LTO_NONE
+ # Set LTO with CLANG/LLVM
+ if [[ "$_compiler" = "2" ]]; then
+
+ msg2 "Enable THIN LTO"
+ scripts/config --enable CONFIG_LTO
+ scripts/config --enable CONFIG_LTO_CLANG
+ scripts/config --enable CONFIG_ARCH_SUPPORTS_LTO_CLANG
+ scripts/config --enable CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN
+ scripts/config --disable CONFIG_LTO_NONE
+ scripts/config --enable CONFIG_HAS_LTO_CLANG
+ scripts/config --disable CONFIG_LTO_CLANG_FULL
+ scripts/config --enable CONFIG_LTO_CLANG_THIN
+ scripts/config --enable CONFIG_HAVE_GCC_PLUGINS
+
+ #msg2 "Enable FULL LTO"
+ #scripts/config --enable CONFIG_LTO
+ #scripts/config --enable CONFIG_LTO_CLANG
+ #scripts/config --enable CONFIG_ARCH_SUPPORTS_LTO_CLANG
+ #scripts/config --enable CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN
+ #scripts/config --disable CONFIG_LTO_NONE
+ #scripts/config --enable CONFIG_HAS_LTO_CLANG
+ #scripts/config --enable CONFIG_LTO_CLANG_FULL
+ #scripts/config --disable CONFIG_LTO_CLANG_THIN
+ #scripts/config --enable CONFIG_HAVE_GCC_PLUGINS
+
+ #msg2 "Disable LTO"
+ #scripts/config --enable CONFIG_LTO_NONE
- sleep 2s
-
- plain ""
+ sleep 2s
+ plain ""
+ fi
msg "Apply some Archlinux config"
@@ -150,9 +184,101 @@ prepare(){
sleep 2s
+ msg "Apply config from Cachyos"
+
+ # NUMA is optimized for multi-socket motherboards.
+ # A single multi-core CPU actually runs slower with NUMA enabled.
+ # See, https://bugs.archlinux.org/task/31187
+ msg2 "Disable NUMA"
+ scripts/config --disable CONFIG_NUMA
+ scripts/config --disable CONFIG_AMD_NUMA
+ scripts/config --disable CONFIG_X86_64_ACPI_NUMA
+ scripts/config --disable CONFIG_NODES_SPAN_OTHER_NODES
+ scripts/config --disable CONFIG_NUMA_EMU
+ scripts/config --disable CONFIG_USE_PERCPU_NUMA_NODE_ID
+ scripts/config --disable CONFIG_ACPI_NUMA
+ scripts/config --disable CONFIG_ARCH_SUPPORTS_NUMA_BALANCING
+ scripts/config --disable CONFIG_NODES_SHIFT
+ scripts/config --disable CONFIG_NODES_SHIFT
+ scripts/config --disable CONFIG_NEED_MULTIPLE_NODES
+ scripts/config --disable CONFIG_NUMA_BALANCING
+ scripts/config --disable CONFIG_NUMA_BALANCING_DEFAULT_ENABLED
+
+ sleep 2s
+
+ # Disable debug to lower the size of the kernel
+ msg2 "Disable debug to lower the size of the kernel"
+ scripts/config --disable CONFIG_DEBUG_INFO
+ scripts/config --disable CONFIG_DEBUG_INFO_BTF
+ scripts/config --disable CONFIG_DEBUG_INFO_DWARF4
+ scripts/config --disable CONFIG_DEBUG_INFO_DWARF5
+ scripts/config --disable CONFIG_PAHOLE_HAS_SPLIT_BTF
+ scripts/config --disable CONFIG_DEBUG_INFO_BTF_MODULES
+ scripts/config --disable CONFIG_SLUB_DEBUG
+ scripts/config --disable CONFIG_PM_DEBUG
+ scripts/config --disable CONFIG_PM_ADVANCED_DEBUG
+ scripts/config --disable CONFIG_PM_SLEEP_DEBUG
+ scripts/config --disable CONFIG_ACPI_DEBUG
+ scripts/config --disable CONFIG_SCHED_DEBUG
+ scripts/config --disable CONFIG_LATENCYTOP
+ scripts/config --disable CONFIG_DEBUG_PREEMPT
+
+ sleep 2s
+
+ msg "Apply config from linux-prjc (AUR)"
+
+ # 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
+ msg2 "Disable debug to lower the size of the kernel"
+ 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
+
+ sleep 2s
+
+ # https://gitlab.com/alfredchen/linux-prjc/-/issues/81
+ # Disable mellanox module
+ msg2 "Disable mellanox module"
+ scripts/config --disable CONFIG_MLX5_CORE
+
+ sleep 2s
+
+ msg "Patch addition config"
+
+ msg2 "Enable CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE (O3) (0013-optimize_harder_O3.patch) (Replace O2 by O3)"
+ scripts/config --disable CONFIG_CC_OPTIMIZE_FOR_SIZE
+ scripts/config --enable CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
+
+ sleep 2s
+
+ msg2 "Enable Winesync"
+ scripts/config --enable CONFIG_WINESYNC
+
+ sleep 2s
+
+ msg2 "Set ZSTD modules and kernel compression level"
+ scripts/config --enable CONFIG_KERNEL_ZSTD
+ scripts/config --set-val CONFIG_ZSTD_COMP_VAL 19
+ scripts/config --set-val CONFIG_MODULE_COMPRESS_ZSTD_LVL 19
+ scripts/config --enable CONFIG_MODULE_COMPRESS_ZSTD_ULTRA
+ scripts/config --set-val CONFIG_MODULE_COMPRESS_ZSTD_LEVEL_ULTRA 22
+
+ sleep 2s
+
+ msg2 "Add NVIDIA Shield and Google Stadia support"
+ scripts/config --module CONFIG_HID_SHIELD
+ scripts/config --enable CONFIG_SHIELD_FF
+ scripts/config --enable CONFIG_HID_STADIA_FF
+
+ sleep 2s
+
plain ""
- msg2 "Supress depmod"
+ msg "Supress depmod"
sed -i '2iexit 0' scripts/depmod.sh
sleep 2s
@@ -160,7 +286,7 @@ prepare(){
plain ""
# Setting localversion
- msg2 "Setting localversion..."
+ msg "Setting localversion..."
# --save-scmversion as been removed in upstream
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/setlocalversion?h=v6.3-rc1&id=f6e09b07cc12a4d104bb19fe7566b0636f60c413
# scripts/setlocalversion --save-scmversion
@@ -174,7 +300,7 @@ prepare(){
plain ""
make -s kernelrelease > version
- msg2 "Prepared $pkgbase version $(<version)"
+ msg "Prepared $pkgbase version $(<version)"
plain ""
}
@@ -188,8 +314,8 @@ build(){
}
_package(){
- pkgdesc='The Linux kernel and modules - Build with LLVM/CLANG'
- depends=(coreutils kmod initramfs)
+ pkgdesc='The Linux kernel and modules with Arch and other improvement patches - Build with LLVM/CLANG'
+ depends=(coreutils initramfs kmod)
optdepends=('wireless-regdb: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices')
provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE)
@@ -209,6 +335,8 @@ _package(){
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
msg2 "Installing modules..."
+ # ZSTD_CLEVEL=19
+ # Keep it not far away Arch use it in official repo, since we use sirlucjan xstd patch
make ARCH=${ARCH} ${BUILD_FLAGS[*]} INSTALL_MOD_PATH="${pkgdir}"/usr INSTALL_MOD_STRIP=1 -j$(nproc) modules_install
# remove build and source links
@@ -300,8 +428,48 @@ _package-headers(){
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
}
-sha256sums=('4323d421250e2e444c35d36f4aa8ddb56591dedc25c68d359d19c4ef9dd20955'
- '6508516de94ed941ae755d89807610dc51fe1229dbfecdf8a82604a8d33242ce'
- 'd4edb692d0a1772af639730d898282e92a3c06acc46e5a55429315b2a5763e82')
+sha256sums=('8fa0588f0c2ceca44cac77a0e39ba48c9f00a6b9dc69761c02a5d3efac8da7f3'
+ 'ab8e459ac900f4f2b2677d9692177afdfb215e75b8315259ef8bdd0a1ea032e1'
+ 'db411b01a5896283fdaf1cf30733d41e9740320a3f422b23ee8b376b8a5e8930'
+ '1827e974d83d452c8a07bf1a6a1593d214f9a9fe61d3dba8a072c2b1c42673d2'
+ '12de7fe29e482e6f0edfd48123c468a309b69d3cca1be4a773c1b96ef6697d22'
+ '5d0faf58c6c9e58d709ec2e136bdd576ebd4c0f7d630bef5a05bf188dd482579'
+ '2cab3863f3e21a8f8e83b3f86743c57c3f37bf086cc01ebf4573c218df229655'
+ '47b6485d9a31eba9589d3ea295239411fc5ae71972cf2e5b94172290d8c12186'
+ '5b9a5d0c5c81960d981d01febe201689794b58bb835b2cadadfbdda42b74f47f'
+ '0867b5cb21a0765fd7b76d3724fc8a258bedbba974b6e4dbd62348f6ce7d9cee'
+ '81cc1547d62933e04aed15c57b9e93101e546298b1fef5f63a6b1469471acebe'
+ 'dd20963020f83e30497ebeccdeace10e98b74ebffa5847de334eeaaae80f5046'
+ 'de7a2748545b2b5d0082c09373c14d9ee41110dfa5e30a3be02e3500c2a8118c'
+ '7c913c3b58001d3534b1f1828e920ca61707b545c228714420237af51f2ec77b'
+ '1fbf26545a49ce297434fa2c39217361cdd90285b2c5ff04c505008037ede6c5'
+ '85669071475af9e4ca74cb15c1f277dadd5ea7b3050f443712da77230a4aa488'
+ 'b4b4f1c20891d1b104354dd574dda80d2f3c5e4f49c76f361c058ffb5b973fd4'
+ '4fd244250dad9949dffad6a42b702384c1b1197297f87ffe80cb45496c29cb25'
+ 'f440d27364ad757ea3cf36454a590f0329f8a6e29f630aa497705840f72e214a'
+ '75b4f9c09aeaa34f14677ccf8dffe30d786b12235eaf4a0cd9654eaa14e63bbb'
+ '5756ce78a788e58f6986640f4699bdb0672742e264b8702997ef5e7feadfc6db'
+ 'f3008b53ec36dba2d71640d8605f6cbf4c5951beadb62f1b614eeefd74d7bdb2'
+ '5e7549f6f4d1f5a2f414f9d7c5a28e8079196084942a9d3e95c074cfcc984977'
+ '71e4fae21123107f00b5e08f0345591f41c61aa918d3e3680c025ce3a78a8a64'
+ '9a1eb034d4a142be9686835d47ebe1998d8f618436756c89b4521fa1a7f13e0f'
+ 'ab6409a7a582ef65bd44519bc56b06eb796c450468a88c7d4fdd67f972488b1b'
+ 'b10fed04277d5808998c5db0ed3147dd003dc74ff548218fe75d6eda985d68c0'
+ 'd1b2e2db347114ccb13ca9c8aaff65e7180cb722f4dc46c82bc5df248edebe63'
+ '1e8d4ddba087aeac79c54acee0f37b4ee5d2c7f43f064b2c8cf29d668f798e3f'
+ '6579c78554b1f1e97a6a439b4287cd542747208774af4070b6d116456e575429'
+ '0ad556c65afca9688ea495106c632d7e479e60e4e2241007a7ef4120f65b27a0'
+ '217791179fcf7d522ed8065b4cf49fb9097522b936a8852901dde0702ea90954'
+ '9a0fd7b40032514b83ec200cd7aeffccf835889c4b86c012e1b9f50fffbfd1a2'
+ '8b7be40de00645ca42ee5c7079bf7d7531de75ecdff97a30914d5d604d7efb58'
+ '7352643e67f651d322b2443e25f7b6ab30a667e3dde6fc2688cb75c24ef0ae84')
+
+pkgname=($pkgbase $pkgbase-headers)
+for _p in "${pkgname[@]}"; do
+ eval "package_$_p() {
+ $(declare -f "_package${_p#$pkgbase}")
+ _package${_p#$pkgbase}
+ }"
+done
# vim:set ts=8 sts=2 sw=2 et: