diff options
author | zhullyb | 2021-02-26 01:53:39 +0800 |
---|---|---|
committer | zhullyb | 2021-02-26 01:57:46 +0800 |
commit | 0c446aef9622e7f2b6658e37465f58ef8a573f9c (patch) | |
tree | 8d4da1f32dba4426d1a24cda4a39be62fb557f7c | |
parent | d5e2679e4eb13e1b400a10c8f1a4591de43aeb5b (diff) | |
download | aur-0c446aef9622e7f2b6658e37465f58ef8a573f9c.tar.gz |
Update to 5.11.1-1
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch | 133 | ||||
-rw-r--r-- | 0002-UKSM.patch | 76 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rwxr-xr-x | choose-gcc-optimization.sh | 9 | ||||
-rw-r--r-- | sphinx-workaround.patch | 16 |
6 files changed, 87 insertions, 216 deletions
@@ -1,6 +1,6 @@ pkgbase = linux-xanmod-cacule-uksm-cjktty pkgdesc = Linux Xanmod. Branch with Cacule scheduler by Hamad Marri - pkgver = 5.10.16 + pkgver = 5.11.1 pkgrel = 1 url = http://www.xanmod.org/ arch = x86_64 @@ -12,22 +12,22 @@ pkgbase = linux-xanmod-cacule-uksm-cjktty makedepends = libelf makedepends = cpio options = !strip - source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.tar.xz - source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.tar.sign - source = https://github.com/xanmod/linux/releases/download/5.10.16-xanmod1-cacule/patch-5.10.16-xanmod1-cacule.xz + source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.11.tar.xz + source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.11.tar.sign + source = https://github.com/xanmod/linux/releases/download/5.11.1-xanmod1-cacule/patch-5.11.1-xanmod1-cacule.xz source = choose-gcc-optimization.sh - source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch + source = sphinx-workaround.patch source = 0002-UKSM.patch - source = 0003-CJKTTY.patch::https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v5.x/cjktty-5.10.patch + source = 0003-CJKTTY.patch::https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v5.x/cjktty-5.11.patch validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E - sha256sums = dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43 - sha256sums = cb36d0d05523e1154f84c060081481f799253da06edb127a2630e539c6974f12 - sha256sums = e1c108a65a34c1ed2474a8296a517025fcb26c018bf1b4c02bc12b42487de000 - sha256sums = 2c7369218e81dee86f8ac15bda741b9bb34fa9cefcb087760242277a8207d511 - sha256sums = 6c66dba73251440352f93ff32b72f5dd49536d0f17ef9347867660fd3a626991 - sha256sums = 9f7931fe587cfbc918aabbf3a1211a7179c8b2b300a1fc38c22920df4ed7dc2a - sha256sums = 078837287607800f948e0e26e6a8ba874d856fd37e0063e8975bb562268546c4 + sha256sums = 04f07b54f0d40adfab02ee6cbd2a942c96728d87c1ef9e120d0cb9ba3fe067b4 + sha256sums = b8bc4f6312bdc086c0fecd1cce1ab1ee12b7b4eff63f88239a65461d9ec5e91b + sha256sums = 363373e827e31f1d457e490e84fbe85ed67d7bf63f43da446405c9a9cdd5f067 + sha256sums = e840e41f0f91108f63fd6e085c93b02daa78729268bc31be7be7fb355203e38a + sha256sums = 74339b8ad0ad99f08606c5de0dd3c38f502e29e5c6a78d6efbe656662edb8d73 + sha256sums = 6ae9b0f994c8cea6ddbaaa570a2570d8489643b33b61c68090670c241a0cd3cc + sha256sums = 7d8375f80012443a6d507eaaa913a6c8e4d8b7789b2523cceef9c5214a7650c5 pkgname = linux-xanmod-cacule-uksm-cjktty pkgdesc = The Linux kernel and modules with Xanmod patches diff --git a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch b/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch deleted file mode 100644 index d7dee55dde5e..000000000000 --- a/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch +++ /dev/null @@ -1,133 +0,0 @@ -From a8d736bad70d4062a14c29bdcbed71bef7b575f5 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 01/15] ZEN: Add sysctl and CONFIG to disallow unprivileged - CLONE_NEWUSER - -Our default behavior continues to match the vanilla kernel. ---- - init/Kconfig | 16 ++++++++++++++++ - kernel/fork.c | 15 +++++++++++++++ - kernel/sysctl.c | 12 ++++++++++++ - kernel/user_namespace.c | 7 +++++++ - 4 files changed, 50 insertions(+) - -diff --git a/init/Kconfig b/init/Kconfig -index b4daad2bac23..362f82c5ec07 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -1118,6 +1118,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 755d8160e001..ed909f8050b2 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -106,6 +106,11 @@ - - #define CREATE_TRACE_POINTS - #include <trace/events/task.h> -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#else -+#define unprivileged_userns_clone 0 -+#endif - - /* - * Minimum number of threads to boot the kernel -@@ -1779,6 +1784,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. -@@ -2836,6 +2845,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 70665934d53e..9797869ed829 100644 ---- a/kernel/sysctl.c -+++ b/kernel/sysctl.c -@@ -111,6 +111,10 @@ - static int sixty = 60; - #endif - -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#endif -+ - static int __maybe_unused neg_one = -1; - static int __maybe_unused two = 2; - static int __maybe_unused four = 4; -@@ -1881,6 +1885,15 @@ - .mode = 0644, - .proc_handler = proc_dointvec, - }, -+#endif -+#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 - { -diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index 8eadadc478f9..c36ecd19562c 100644 ---- a/kernel/user_namespace.c -+++ b/kernel/user_namespace.c -@@ -21,6 +21,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.25.0 - diff --git a/0002-UKSM.patch b/0002-UKSM.patch index dfadb980760d..9a8be4e28392 100644 --- a/0002-UKSM.patch +++ b/0002-UKSM.patch @@ -1,7 +1,7 @@ -From 7d21ce8f371b7bc46c2e23cbca1c85aed6450141 Mon Sep 17 00:00:00 2001 +From 54c4e5ae42627a450d15d126302ecc5509ba1e26 Mon Sep 17 00:00:00 2001 From: Piotr Gorski <lucjan.lucjanov@gmail.com> -Date: Sun, 6 Dec 2020 23:49:33 +0100 -Subject: [PATCH] UKSM for 5.10 +Date: Wed, 16 Dec 2020 01:40:01 +0100 +Subject: [PATCH] UKSM for 5.11 Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com> --- @@ -33,7 +33,7 @@ Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com> diff --git a/Documentation/vm/uksm.txt b/Documentation/vm/uksm.txt new file mode 100644 -index 0000000..be19a31 +index 000000000..be19a3127 --- /dev/null +++ b/Documentation/vm/uksm.txt @@ -0,0 +1,61 @@ @@ -99,25 +99,25 @@ index 0000000..be19a31 +2016-09-10 UKSM 0.1.2.5 Fix a bug in dedup ratio calculation. +2017-02-26 UKSM 0.1.2.6 Fix a bug in hugetlbpage handling and a race bug with page migration. diff --git a/fs/exec.c b/fs/exec.c -index 547a239..fc64a20 100644 +index 5d4d52039..86f9f6526 100644 --- a/fs/exec.c +++ b/fs/exec.c -@@ -64,6 +64,7 @@ - #include <linux/compat.h> +@@ -65,6 +65,7 @@ #include <linux/vmalloc.h> #include <linux/io_uring.h> + #include <linux/syscall_user_dispatch.h> +#include <linux/ksm.h> #include <linux/uaccess.h> #include <asm/mmu_context.h> diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c -index 887a553..581a676 100644 +index d6fc74619..7b929bbd2 100644 --- a/fs/proc/meminfo.c +++ b/fs/proc/meminfo.c @@ -108,7 +108,10 @@ static int meminfo_proc_show(struct seq_file *m, void *v) #endif show_val_kb(m, "PageTables: ", - global_zone_page_state(NR_PAGETABLE)); + global_node_page_state(NR_PAGETABLE)); - +#ifdef CONFIG_UKSM + show_val_kb(m, "KsmZeroPages: ", @@ -127,7 +127,7 @@ index 887a553..581a676 100644 show_val_kb(m, "Bounce: ", global_zone_page_state(NR_BOUNCE)); diff --git a/include/linux/ksm.h b/include/linux/ksm.h -index 161e816..f0dbdf3 100644 +index 161e8164a..f0dbdf3c9 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h @@ -21,20 +21,16 @@ struct mem_cgroup; @@ -198,10 +198,10 @@ index 161e816..f0dbdf3 100644 + #endif /* __LINUX_KSM_H */ diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 5a9238f..5dd1ccf 100644 +index 07d9acb5b..858a2f712 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h -@@ -371,6 +371,9 @@ struct vm_area_struct { +@@ -369,6 +369,9 @@ struct vm_area_struct { struct mempolicy *vm_policy; /* NUMA policy for the VMA */ #endif struct vm_userfaultfd_ctx vm_userfaultfd_ctx; @@ -212,10 +212,10 @@ index 5a9238f..5dd1ccf 100644 struct core_thread { diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h -index fb3bf69..e4477c3 100644 +index b593316bf..90d5b5a43 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h -@@ -159,6 +159,9 @@ enum zone_stat_item { +@@ -157,6 +157,9 @@ enum zone_stat_item { NR_ZSPAGES, /* allocated in zsmalloc */ #endif NR_FREE_CMA_PAGES, @@ -226,10 +226,10 @@ index fb3bf69..e4477c3 100644 enum node_stat_item { diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h -index e237004..092cdfb 100644 +index 8fcdfa52e..cc511ae57 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h -@@ -1060,12 +1060,25 @@ extern void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn, +@@ -1115,12 +1115,25 @@ extern void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn, extern void untrack_pfn_moved(struct vm_area_struct *vma); #endif @@ -256,7 +256,7 @@ index e237004..092cdfb 100644 } #define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr)) -@@ -1074,7 +1087,7 @@ static inline int is_zero_pfn(unsigned long pfn) +@@ -1129,7 +1142,7 @@ static inline int is_zero_pfn(unsigned long pfn) static inline int is_zero_pfn(unsigned long pfn) { extern unsigned long zero_pfn; @@ -267,7 +267,7 @@ index e237004..092cdfb 100644 static inline unsigned long my_zero_pfn(unsigned long addr) diff --git a/include/linux/sradix-tree.h b/include/linux/sradix-tree.h new file mode 100644 -index 0000000..d71edba +index 000000000..d71edba6b --- /dev/null +++ b/include/linux/sradix-tree.h @@ -0,0 +1,77 @@ @@ -350,7 +350,7 @@ index 0000000..d71edba +#endif /* _LINUX_SRADIX_TREE_H */ diff --git a/include/linux/uksm.h b/include/linux/uksm.h new file mode 100644 -index 0000000..bb8651f +index 000000000..bb8651f53 --- /dev/null +++ b/include/linux/uksm.h @@ -0,0 +1,149 @@ @@ -504,10 +504,10 @@ index 0000000..bb8651f +#endif /* !CONFIG_UKSM */ +#endif /* __LINUX_UKSM_H */ diff --git a/kernel/fork.c b/kernel/fork.c -index a106335..7392447 100644 +index e39846a73..aaab0f873 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -591,7 +591,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, +@@ -588,7 +588,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, __vma_link_rb(mm, tmp, rb_link, rb_parent); rb_link = &tmp->vm_rb.rb_right; rb_parent = &tmp->vm_rb; @@ -517,7 +517,7 @@ index a106335..7392447 100644 if (!(tmp->vm_flags & VM_WIPEONFORK)) retval = copy_page_range(tmp, mpnt); diff --git a/lib/Makefile b/lib/Makefile -index d415fc7..e4045eb 100644 +index afeff05fa..691f13e0f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -31,7 +31,7 @@ endif @@ -531,7 +531,7 @@ index d415fc7..e4045eb 100644 is_single_threaded.o plist.o decompress.o kobject_uevent.o \ diff --git a/lib/sradix-tree.c b/lib/sradix-tree.c new file mode 100644 -index 0000000..ab21e63 +index 000000000..ab21e6309 --- /dev/null +++ b/lib/sradix-tree.c @@ -0,0 +1,476 @@ @@ -1012,10 +1012,10 @@ index 0000000..ab21e63 + return 0; +} diff --git a/mm/Kconfig b/mm/Kconfig -index 390165f..50d02cf 100644 +index 5f4846c7d..40bf1a135 100644 --- a/mm/Kconfig +++ b/mm/Kconfig -@@ -317,6 +317,32 @@ config KSM +@@ -352,6 +352,32 @@ config KSM See Documentation/vm/ksm.rst for more information: KSM is inactive until a program has madvised that an area is MADV_MERGEABLE, and root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set). @@ -1049,7 +1049,7 @@ index 390165f..50d02cf 100644 config DEFAULT_MMAP_MIN_ADDR int "Low address space to protect from user allocation" diff --git a/mm/Makefile b/mm/Makefile -index d73aed0..d6612b7 100644 +index b6cd2fffa..abe1ab4d4 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -76,7 +76,8 @@ obj-$(CONFIG_SPARSEMEM) += sparse.o @@ -1063,7 +1063,7 @@ index d73aed0..d6612b7 100644 obj-$(CONFIG_SLAB) += slab.o obj-$(CONFIG_SLUB) += slub.o diff --git a/mm/ksm.c b/mm/ksm.c -index 3c51c71..9e82895 100644 +index 50d1d6dd1..a10d21de2 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -858,17 +858,6 @@ static int unmerge_ksm_pages(struct vm_area_struct *vma, @@ -1085,7 +1085,7 @@ index 3c51c71..9e82895 100644 /* * Only called through the sysfs control interface: diff --git a/mm/memory.c b/mm/memory.c -index 01495c1..c651f01 100644 +index feff48e14..9fe7c8e59 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -146,6 +146,25 @@ EXPORT_SYMBOL(zero_pfn); @@ -1134,7 +1134,7 @@ index 01495c1..c651f01 100644 } /* -@@ -1237,8 +1262,10 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, +@@ -1248,8 +1273,10 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, ptent = ptep_get_and_clear_full(mm, addr, pte, tlb->fullmm); tlb_remove_tlb_entry(tlb, pte, addr); @@ -1146,7 +1146,7 @@ index 01495c1..c651f01 100644 if (!PageAnon(page)) { if (pte_dirty(ptent)) { -@@ -2587,6 +2614,7 @@ static inline bool cow_user_page(struct page *dst, struct page *src, +@@ -2597,6 +2624,7 @@ static inline bool cow_user_page(struct page *dst, struct page *src, if (likely(src)) { copy_user_highpage(dst, src, addr, vma); @@ -1154,7 +1154,7 @@ index 01495c1..c651f01 100644 return true; } -@@ -2833,6 +2861,7 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf) +@@ -2843,6 +2871,7 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf) vmf->address); if (!new_page) goto oom; @@ -1162,7 +1162,7 @@ index 01495c1..c651f01 100644 } else { new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address); -@@ -2875,7 +2904,9 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf) +@@ -2885,7 +2914,9 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf) mm_counter_file(old_page)); inc_mm_counter_fast(mm, MM_ANONPAGES); } @@ -1173,7 +1173,7 @@ index 01495c1..c651f01 100644 } flush_cache_page(vma, vmf->address, pte_pfn(vmf->orig_pte)); diff --git a/mm/mmap.c b/mm/mmap.c -index 5c8b448..b8dd56d 100644 +index dc7206032..f2b9cbd7f 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -46,6 +46,7 @@ @@ -1324,7 +1324,7 @@ index 5c8b448..b8dd56d 100644 } return new_vma; -@@ -3491,6 +3527,7 @@ static struct vm_area_struct *__install_special_mapping( +@@ -3507,6 +3543,7 @@ static struct vm_area_struct *__install_special_mapping( vm_stat_account(mm, vma->vm_flags, len >> PAGE_SHIFT); perf_event_mmap(vma); @@ -1334,7 +1334,7 @@ index 5c8b448..b8dd56d 100644 diff --git a/mm/uksm.c b/mm/uksm.c new file mode 100644 -index 0000000..e4732c0 +index 000000000..e4732c00b --- /dev/null +++ b/mm/uksm.c @@ -0,0 +1,5614 @@ @@ -6953,12 +6953,12 @@ index 0000000..e4732c0 +#endif + diff --git a/mm/vmstat.c b/mm/vmstat.c -index c81737a..319f5f8 100644 +index 6b9369fd9..24cb8a8ff 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1216,6 +1216,9 @@ const char * const vmstat_text[] = { - "nr_shadow_call_stack", #endif + "nr_page_table_pages", +#ifdef CONFIG_UKSM + "nr_uksm_zero_pages", @@ -6967,5 +6967,5 @@ index c81737a..319f5f8 100644 "nr_dirty_threshold", "nr_dirty_background_threshold", -- -2.29.2.456.g3a0b884cab +2.30.1.457.gf011795891 @@ -16,9 +16,8 @@ ## Valid numbers between: 0 to 42 ## Default is: 0 => generic ## Good option if your package is for one machine: 42 => native -## 我个人的恶趣味,就是选择 native,自动优化,当然各位根据自己的实际情况做出选择也是可以的 if [ -z ${_microarchitecture+x} ]; then - _microarchitecture=42 + _microarchitecture=0 fi ## Disable NUMA since most users do not have multiple processors. Breaks CUDA/NvEnc. @@ -39,16 +38,6 @@ if [ -z ${use_tracers+x} ]; then use_tracers=n fi -## Enable CONFIG_USER_NS_UNPRIVILEGED flag https://aur.archlinux.org/cgit/aur.git/tree/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch?h=linux-ck -## Set variable "use_ns" to: n to disable (stock Xanmod) -## y to enable (stock Archlinux) -## By the way, This is important for people who using Skype and Wechat UOS, if 'NO', these apps could using. -## 如果你使用 skype 或者 wechatUOS,请选择这个补丁 -## 否则,软件无法启动 -if [ -z ${use_ns+x} ]; then - use_ns=y -fi - # Compile ONLY used modules to VASTLYreduce the number of modules built # and the build time. # @@ -64,14 +53,13 @@ if [ -z ${_localmodcfg} ]; then fi # Tweak kernel options prior to a build via nconfig -# 我觉得还是选上,这样给大家微调的空间 -_makenconfig=y +#_makenconfig=y ### IMPORTANT: Do no edit below this line unless you know what you're doing pkgbase=linux-xanmod-cacule-uksm-cjktty -pkgver=5.10.16 -_major=5.10 +pkgver=5.11.1 +_major=5.11 _branch=5.x xanmod=1 pkgrel=${xanmod} @@ -89,9 +77,9 @@ _srcname="linux-${pkgver}-xanmod${xanmod}" source=("https://cdn.kernel.org/pub/linux/kernel/v${_branch}/linux-${_major}.tar."{xz,sign} "https://github.com/xanmod/linux/releases/download/${pkgver}-xanmod${xanmod}-cacule/patch-${pkgver}-xanmod${xanmod}-cacule.xz" choose-gcc-optimization.sh - '0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch' + 'sphinx-workaround.patch' '0002-UKSM.patch' - '0003-CJKTTY.patch::https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v5.x/cjktty-5.10.patch') + "0003-CJKTTY.patch::https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v5.x/cjktty-${_major}.patch") validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linux Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman @@ -103,13 +91,13 @@ for _patch in $_commits; do source+=("${_patch}.patch::https://git.archlinux.org/linux.git/patch/?id=${_patch}") done -sha256sums=('dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43' - 'cb36d0d05523e1154f84c060081481f799253da06edb127a2630e539c6974f12' - 'e1c108a65a34c1ed2474a8296a517025fcb26c018bf1b4c02bc12b42487de000' - '2c7369218e81dee86f8ac15bda741b9bb34fa9cefcb087760242277a8207d511' - '6c66dba73251440352f93ff32b72f5dd49536d0f17ef9347867660fd3a626991' - '9f7931fe587cfbc918aabbf3a1211a7179c8b2b300a1fc38c22920df4ed7dc2a' - '078837287607800f948e0e26e6a8ba874d856fd37e0063e8975bb562268546c4') +sha256sums=('04f07b54f0d40adfab02ee6cbd2a942c96728d87c1ef9e120d0cb9ba3fe067b4' + 'b8bc4f6312bdc086c0fecd1cce1ab1ee12b7b4eff63f88239a65461d9ec5e91b' + '363373e827e31f1d457e490e84fbe85ed67d7bf63f43da446405c9a9cdd5f067' + 'e840e41f0f91108f63fd6e085c93b02daa78729268bc31be7be7fb355203e38a' + '74339b8ad0ad99f08606c5de0dd3c38f502e29e5c6a78d6efbe656662edb8d73' + '6ae9b0f994c8cea6ddbaaa570a2570d8489643b33b61c68090670c241a0cd3cc' + '7d8375f80012443a6d507eaaa913a6c8e4d8b7789b2523cceef9c5214a7650c5') export KBUILD_BUILD_HOST=${KBUILD_BUILD_HOST:-archlinux} export KBUILD_BUILD_USER=${KBUILD_BUILD_USER:-makepkg} @@ -155,11 +143,6 @@ prepare() { scripts/config --disable CONFIG_NUMA fi - if [ "$use_ns" = "n" ]; then - msg2 "Disabling CONFIG_USER_NS_UNPRIVILEGED" - scripts/config --disable CONFIG_USER_NS_UNPRIVILEGED - fi - # Let's user choose microarchitecture optimization in GCC sh ${srcdir}/choose-gcc-optimization.sh $_microarchitecture diff --git a/choose-gcc-optimization.sh b/choose-gcc-optimization.sh index ccf182e91190..e7852e9a28ee 100755 --- a/choose-gcc-optimization.sh +++ b/choose-gcc-optimization.sh @@ -52,8 +52,10 @@ cat << EOF 39) Intel 8th Gen Core i3/i5/i7-family (Cannon Lake) 40) Intel 8th Gen Core i7/i9-family (Ice Lake) 41) Xeon processors in the Cascade Lake family + 42) Intel Xeon (Cooper Lake) + 43) Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake) - 42) Native optimizations autodetected by GCC + 99) Native optimizations autodetected by GCC 0) Generic (default) @@ -104,7 +106,9 @@ case $answer in 39) Microarchitecture=CONFIG_MCANNONLAKE ;; 40) Microarchitecture=CONFIG_MICELAKE ;; 41) Microarchitecture=CONFIG_MCASCADELAKE ;; - 42) Microarchitecture=CONFIG_MNATIVE ;; + 42) Microarchitecture=CONFIG_MCOOPERLAKE ;; + 43) Microarchitecture=CONFIG_MTIGERLAKE ;; + 99) Microarchitecture=CONFIG_MNATIVE ;; *) default=CONFIG_GENERIC_CPU ;; esac @@ -116,3 +120,4 @@ sed -e 's|^CONFIG_GENERIC_CPU=y|# CONFIG_GENERIC_CPU is not set|g' -i .config sed -e "s|^# $Microarchitecture is not set|$Microarchitecture=y|g" -i .config echo + diff --git a/sphinx-workaround.patch b/sphinx-workaround.patch new file mode 100644 index 000000000000..788514eff204 --- /dev/null +++ b/sphinx-workaround.patch @@ -0,0 +1,16 @@ +diff --git i/Documentation/conf.py w/Documentation/conf.py +index 6a767294887e..d1d145759fed 100644 +--- i/Documentation/conf.py ++++ w/Documentation/conf.py +@@ -267,11 +267,9 @@ except ImportError: + + html_static_path = ['sphinx-static'] + +-html_context = { +- 'css_files': [ +- '_static/theme_overrides.css', +- ], +-} ++html_css_files = [ ++ '_static/theme_overrides.css', ++] |