5.8.8-1 (clr 5.8.8-984)
This commit is contained in:
parent
5da4996d40
commit
41d7ed55d2
3 changed files with 70 additions and 49 deletions
16
.SRCINFO
16
.SRCINFO
|
@ -1,6 +1,6 @@
|
|||
pkgbase = linux-clear
|
||||
pkgdesc = Clear Linux
|
||||
pkgver = 5.7.19
|
||||
pkgver = 5.8.8
|
||||
pkgrel = 1
|
||||
url = https://github.com/clearlinux-pkgs/linux
|
||||
arch = x86_64
|
||||
|
@ -12,22 +12,22 @@ pkgbase = linux-clear
|
|||
makedepends = libelf
|
||||
makedepends = xmlto
|
||||
options = !strip
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.tar.xz
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.tar.sign
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/patch-5.7.19.xz
|
||||
source = clearlinux::git+https://github.com/clearlinux-pkgs/linux.git#tag=5.7.9-970
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.tar.xz
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.tar.sign
|
||||
source = https://cdn.kernel.org/pub/linux/kernel/v5.x/patch-5.8.8.xz
|
||||
source = clearlinux::git+https://github.com/clearlinux-pkgs/linux.git#tag=5.8.8-984
|
||||
source = enable_additional_cpu_optimizations-20200615.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/20200615.tar.gz
|
||||
source = pci-enable-overrides-for-missing-acs-capabilities.patch
|
||||
source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
|
||||
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
|
||||
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
|
||||
sha256sums = de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0
|
||||
sha256sums = e7f75186aa0642114af8f19d99559937300ca27acaf7451b36d4f9b0f85cf1f5
|
||||
sha256sums = SKIP
|
||||
sha256sums = 66a0173a13cd58015f5bf1b14f67bfa15dc1db5d8e7225fcd95ac2e9a5341653
|
||||
sha256sums = 4cfc08e0e26f824eb876b9ebd8bb29f3739a2790e949a514ce31f7f5d58c8c44
|
||||
sha256sums = SKIP
|
||||
sha256sums = 278fe9ffb29d92cc5220e7beac34a8e3a2006e714d16a21a0427069f9634af90
|
||||
sha256sums = 2c98de0814366b041aeee4cbf82b82620c7834bc33752d50f089e8bd7ea5cf5e
|
||||
sha256sums = bdd05caf94135898bceac0a9d14ec6b1b458dba162d00efd46a292fe97f2679b
|
||||
sha256sums = 261574aeee09864929d44a5f9896ad2645fe4539d9ee8a86575bd19a07eed865
|
||||
|
||||
pkgname = linux-clear
|
||||
pkgdesc = The Clear Linux kernel and modules
|
||||
|
|
|
@ -1,22 +1,44 @@
|
|||
From f4b254de5d2b75143dd7c225e58afb3f5ee3bae6 Mon Sep 17 00:00:00 2001
|
||||
From 5a924ab983b82b3c5cba2b7abc90f8f38be41b6d 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
|
||||
Subject: 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(+)
|
||||
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 6ef1c7109fc4..2140091b0b8d 100644
|
||||
--- a/include/linux/user_namespace.h
|
||||
+++ b/include/linux/user_namespace.h
|
||||
@@ -106,6 +106,8 @@ void dec_ucount(struct ucounts *ucounts, enum ucount_type type);
|
||||
|
||||
#ifdef CONFIG_USER_NS
|
||||
|
||||
+extern int unprivileged_userns_clone;
|
||||
+
|
||||
static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
|
||||
{
|
||||
if (ns)
|
||||
@@ -139,6 +141,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 6db3e310a5e4..2dd7dd1b6b0d 100644
|
||||
index 0498af567f70..078a0b73effd 100644
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1083,6 +1083,22 @@ config USER_NS
|
||||
@@ -1140,6 +1140,22 @@ config USER_NS
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
|
@ -40,22 +62,21 @@ index 6db3e310a5e4..2dd7dd1b6b0d 100644
|
|||
bool "PID Namespaces"
|
||||
default y
|
||||
diff --git a/kernel/fork.c b/kernel/fork.c
|
||||
index 9180f4416dba..a02f83b1d9b4 100644
|
||||
index efc5493203ae..90859b7531d3 100644
|
||||
--- a/kernel/fork.c
|
||||
+++ b/kernel/fork.c
|
||||
@@ -106,6 +106,11 @@
|
||||
@@ -96,6 +96,10 @@
|
||||
#include <linux/kasan.h>
|
||||
#include <linux/scs.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/task.h>
|
||||
+#ifdef CONFIG_USER_NS
|
||||
+extern int unprivileged_userns_clone;
|
||||
+#else
|
||||
+#define unprivileged_userns_clone 0
|
||||
+#include <linux/user_namespace.h>
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Minimum number of threads to boot the kernel
|
||||
@@ -1779,6 +1784,10 @@ static __latent_entropy struct task_struct *copy_process(
|
||||
+
|
||||
#include <asm/pgalloc.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/mmu_context.h>
|
||||
@@ -1861,6 +1865,10 @@ static __latent_entropy struct task_struct *copy_process(
|
||||
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
|
@ -66,7 +87,7 @@ index 9180f4416dba..a02f83b1d9b4 100644
|
|||
/*
|
||||
* Thread groups must share signals as well, and detached threads
|
||||
* can only be started up within the thread group.
|
||||
@@ -2837,6 +2846,12 @@ int ksys_unshare(unsigned long unshare_flags)
|
||||
@@ -2961,6 +2969,12 @@ int ksys_unshare(unsigned long unshare_flags)
|
||||
if (unshare_flags & CLONE_NEWNS)
|
||||
unshare_flags |= CLONE_FS;
|
||||
|
||||
|
@ -80,20 +101,20 @@ index 9180f4416dba..a02f83b1d9b4 100644
|
|||
if (err)
|
||||
goto bad_unshare_out;
|
||||
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
|
||||
index 70665934d53e..9797869ed829 100644
|
||||
index db1ce7af2563..9b73467e279d 100644
|
||||
--- a/kernel/sysctl.c
|
||||
+++ b/kernel/sysctl.c
|
||||
@@ -110,6 +110,9 @@ extern int core_uses_pid;
|
||||
extern char core_pattern[];
|
||||
extern unsigned int core_pipe_limit;
|
||||
@@ -103,6 +103,9 @@
|
||||
#ifdef CONFIG_LOCKUP_DETECTOR
|
||||
#include <linux/nmi.h>
|
||||
#endif
|
||||
+#ifdef CONFIG_USER_NS
|
||||
+extern int unprivileged_userns_clone;
|
||||
+#include <linux/user_namespace.h>
|
||||
+#endif
|
||||
extern int pid_max;
|
||||
extern int pid_max_min, pid_max_max;
|
||||
extern int percpu_pagelist_fraction;
|
||||
@@ -546,6 +549,15 @@ static struct ctl_table kern_table[] = {
|
||||
|
||||
#if defined(CONFIG_SYSCTL)
|
||||
|
||||
@@ -1882,6 +1885,15 @@ static struct ctl_table kern_table[] = {
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
#endif
|
||||
|
@ -110,7 +131,7 @@ index 70665934d53e..9797869ed829 100644
|
|||
{
|
||||
.procname = "tainted",
|
||||
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
|
||||
index 8eadadc478f9..c36ecd19562c 100644
|
||||
index 87804e0371fe..66b5afb0d0ee 100644
|
||||
--- a/kernel/user_namespace.c
|
||||
+++ b/kernel/user_namespace.c
|
||||
@@ -21,6 +21,13 @@
|
||||
|
@ -128,5 +149,5 @@ index 8eadadc478f9..c36ecd19562c 100644
|
|||
static DEFINE_MUTEX(userns_state_mutex);
|
||||
|
||||
--
|
||||
2.26.2
|
||||
cgit v1.2.3-1-gf6bb5
|
||||
|
||||
|
|
16
PKGBUILD
16
PKGBUILD
|
@ -67,10 +67,10 @@ _use_current=
|
|||
|
||||
### IMPORTANT: Do no edit below this line unless you know what you're doing
|
||||
|
||||
_major=5.7
|
||||
_minor=19
|
||||
_major=5.8
|
||||
_minor=8
|
||||
_srcname=linux-${_major}
|
||||
_clr=${_major}.9-970
|
||||
_clr=${_major}.8-984
|
||||
pkgbase=linux-clear
|
||||
pkgver=${_major}.${_minor}
|
||||
pkgrel=1
|
||||
|
@ -179,8 +179,8 @@ prepare() {
|
|||
### Patch source to unlock additional gcc CPU optimizations
|
||||
# https://github.com/graysky2/kernel_gcc_patch
|
||||
if [ "${_enable_gcc_more_v}" = "y" ]; then
|
||||
echo "Applying enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v10.1+_kernel_v5.7+.patch ..."
|
||||
patch -Np1 -i "$srcdir/kernel_gcc_patch-$_gcc_more_v/enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v5.7+.patch"
|
||||
echo "Applying enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v10.1+_kernel_v5.8+.patch ..."
|
||||
patch -Np1 -i "$srcdir/kernel_gcc_patch-$_gcc_more_v/enable_additional_cpu_optimizations_for_gcc_v10.1+_kernel_v5.8+.patch"
|
||||
fi
|
||||
|
||||
### Get kernel version
|
||||
|
@ -350,13 +350,13 @@ for _p in "${pkgname[@]}"; do
|
|||
}"
|
||||
done
|
||||
|
||||
sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0'
|
||||
sha256sums=('e7f75186aa0642114af8f19d99559937300ca27acaf7451b36d4f9b0f85cf1f5'
|
||||
'SKIP'
|
||||
'66a0173a13cd58015f5bf1b14f67bfa15dc1db5d8e7225fcd95ac2e9a5341653'
|
||||
'4cfc08e0e26f824eb876b9ebd8bb29f3739a2790e949a514ce31f7f5d58c8c44'
|
||||
'SKIP'
|
||||
'278fe9ffb29d92cc5220e7beac34a8e3a2006e714d16a21a0427069f9634af90'
|
||||
'2c98de0814366b041aeee4cbf82b82620c7834bc33752d50f089e8bd7ea5cf5e'
|
||||
'bdd05caf94135898bceac0a9d14ec6b1b458dba162d00efd46a292fe97f2679b')
|
||||
'261574aeee09864929d44a5f9896ad2645fe4539d9ee8a86575bd19a07eed865')
|
||||
|
||||
validpgpkeys=(
|
||||
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
||||
|
|
Loading…
Reference in a new issue