summaryrefslogtreecommitdiffstats
path: root/debian/patches/features
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 18:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 18:50:59 +0000
commitba6b167af6ee5e63ca79ad22e7719644aed12b2c (patch)
tree62272cbe2fb256ecb90fa6e2cbfa509541954d28 /debian/patches/features
parentMerging upstream version 6.8.9. (diff)
downloadlinux-ba6b167af6ee5e63ca79ad22e7719644aed12b2c.tar.xz
linux-ba6b167af6ee5e63ca79ad22e7719644aed12b2c.zip
Merging debian version 6.8.9-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/features')
-rw-r--r--debian/patches/features/all/driver-core-Emit-reason-for-pending-deferred-probe.patch35
-rw-r--r--debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch14
-rw-r--r--debian/patches/features/arm64/arm64-dynamically-allocate-cpumasks-and-increase-supported-cpus-to-512.patch98
-rw-r--r--debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch24
4 files changed, 117 insertions, 54 deletions
diff --git a/debian/patches/features/all/driver-core-Emit-reason-for-pending-deferred-probe.patch b/debian/patches/features/all/driver-core-Emit-reason-for-pending-deferred-probe.patch
deleted file mode 100644
index 4c4be6b22..000000000
--- a/debian/patches/features/all/driver-core-Emit-reason-for-pending-deferred-probe.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-Date: Wed, 22 Nov 2023 10:33:33 +0100
-Subject: driver core: Emit reason for pending deferred probe
-Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=7c41da586e9f45bf8842b4dca08681df8d586ebb
-
-Ending a boot log with
-
- platform 3f202000.mmc: deferred probe pending
-
-is already a nice hint about the problem. Sometimes there is a more
-detailed error indicator available, add that to the output.
-
-Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-Link: https://lore.kernel.org/r/20231122093332.274145-2-u.kleine-koenig@pengutronix.de
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- drivers/base/dd.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/base/dd.c b/drivers/base/dd.c
-index 0c3725c3eefa..85152537dbf1 100644
---- a/drivers/base/dd.c
-+++ b/drivers/base/dd.c
-@@ -313,7 +313,7 @@ static void deferred_probe_timeout_work_func(struct work_struct *work)
-
- mutex_lock(&deferred_probe_mutex);
- list_for_each_entry(p, &deferred_probe_pending_list, deferred_probe)
-- dev_info(p->device, "deferred probe pending\n");
-+ dev_info(p->device, "deferred probe pending: %s", p->deferred_probe_reason ?: "(reason unknown)\n");
- mutex_unlock(&deferred_probe_mutex);
-
- fw_devlink_probing_done();
---
-2.43.0
-
diff --git a/debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch b/debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch
index 3a10822b3..d224208d4 100644
--- a/debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch
+++ b/debian/patches/features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch
@@ -26,7 +26,7 @@ Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
-@@ -902,6 +902,8 @@ void __init setup_arch(char **cmdline_p)
+@@ -900,6 +900,8 @@ void __init setup_arch(char **cmdline_p)
if (efi_enabled(EFI_BOOT))
efi_init();
@@ -67,17 +67,17 @@ Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
default:
--- a/include/linux/security.h
+++ b/include/linux/security.h
-@@ -486,6 +486,7 @@ int security_inode_notifysecctx(struct i
- int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen);
- int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen);
+@@ -496,6 +496,7 @@ int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen);
int security_locked_down(enum lockdown_reason what);
+ int lsm_fill_user_ctx(struct lsm_ctx __user *uctx, u32 *uctx_len,
+ void *val, size_t val_len, u64 id, u64 flags);
+int lock_kernel_down(const char *where, enum lockdown_reason level);
#else /* CONFIG_SECURITY */
static inline int call_blocking_lsm_notifier(enum lsm_event event, void *data)
-@@ -1404,6 +1405,11 @@ static inline int security_locked_down(e
+@@ -1439,6 +1440,11 @@ static inline int lsm_fill_user_ctx(struct lsm_ctx __user *uctx,
{
- return 0;
+ return -EOPNOTSUPP;
}
+static inline int
+lock_kernel_down(const char *where, enum lockdown_reason level)
@@ -110,7 +110,7 @@ Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
+ triggered in integrity mode if EFI Secure Boot is set.
--- a/security/lockdown/lockdown.c
+++ b/security/lockdown/lockdown.c
-@@ -23,7 +23,7 @@ static const enum lockdown_reason lockdo
+@@ -24,7 +24,7 @@ static const enum lockdown_reason lockdo
/*
* Put the kernel into lock-down mode.
*/
diff --git a/debian/patches/features/arm64/arm64-dynamically-allocate-cpumasks-and-increase-supported-cpus-to-512.patch b/debian/patches/features/arm64/arm64-dynamically-allocate-cpumasks-and-increase-supported-cpus-to-512.patch
new file mode 100644
index 000000000..dd7c02e00
--- /dev/null
+++ b/debian/patches/features/arm64/arm64-dynamically-allocate-cpumasks-and-increase-supported-cpus-to-512.patch
@@ -0,0 +1,98 @@
+From: "Christoph Lameter (Ampere)" <cl@gentwo.org>
+Date: Wed, 6 Mar 2024 17:45:04 -0800
+Subject: ARM64: Dynamically allocate cpumasks and increase supported CPUs to
+ 512
+Forwarded: https://lore.kernel.org/lkml/37099a57-b655-3b3a-56d0-5f7fbd49d7db@gentwo.org/
+Applied-Upstream: 3fbd56f0e7c14e7c7a7597fd4a368753fe70d76f
+
+ [ a.k.a. Revert "Revert "ARM64: Dynamically allocate cpumasks and
+ increase supported CPUs to 512""; originally reverted because of a
+ bug in the cpufreq-dt code not using zalloc_cpumask_var() ]
+
+Currently defconfig selects NR_CPUS=256, but some vendors (e.g. Ampere
+Computing) are planning to ship systems with 512 CPUs. So that all CPUs on
+these systems can be used with defconfig, we'd like to bump NR_CPUS to 512.
+Therefore this patch increases the default NR_CPUS from 256 to 512.
+
+As increasing NR_CPUS will increase the size of cpumasks, there's a fear that
+this might have a significant impact on stack usage due to code which places
+cpumasks on the stack. To mitigate that concern, we can select
+CPUMASK_OFFSTACK. As that doesn't seem to be a problem today with
+NR_CPUS=256, we only select this when NR_CPUS > 256.
+
+CPUMASK_OFFSTACK configures the cpumasks in the kernel to be
+dynamically allocated. This was used in the X86 architecture in the
+past to enable support for larger CPU configurations up to 8k cpus.
+
+With that is becomes possible to dynamically size the allocation of
+the cpu bitmaps depending on the quantity of processors detected on
+bootup. Memory used for cpumasks will increase if the kernel is
+run on a machine with more cores.
+
+Further increases may be needed if ARM processor vendors start
+supporting more processors. Given the current inflationary trends
+in core counts from multiple processor manufacturers this may occur.
+
+There are minor regressions for hackbench. The kernel data size
+for 512 cpus is smaller with offstack than with onstack.
+
+Benchmark results using hackbench average over 10 runs of
+
+ hackbench -s 512 -l 2000 -g 15 -f 25 -P
+
+on Altra 80 Core
+
+Support for 256 CPUs on stack. Baseline
+
+ 7.8564 sec
+
+Support for 512 CUs on stack.
+
+ 7.8713 sec + 0.18%
+
+512 CPUS offstack
+
+ 7.8916 sec + 0.44%
+
+Kernel size comparison:
+
+ text data filename Difference to onstack256 baseline
+25755648 9589248 vmlinuz-6.8.0-rc4-onstack256
+25755648 9607680 vmlinuz-6.8.0-rc4-onstack512 +0.19%
+25755648 9603584 vmlinuz-6.8.0-rc4-offstack512 +0.14%
+
+Tested-by: Eric Mackay <eric.mackay@oracle.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Christoph Lameter (Ampere) <cl@linux.com>
+Acked-by: Mark Rutland <mark.rutland@arm.com>
+Link: https://lore.kernel.org/r/37099a57-b655-3b3a-56d0-5f7fbd49d7db@gentwo.org
+Link: https://lore.kernel.org/r/20240314125457.186678-1-m.szyprowski@samsung.com
+[catalin.marinas@arm.com: use 'select' instead of duplicating 'config CPUMASK_OFFSTACK']
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+---
+ arch/arm64/Kconfig | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
+index 4869265ace2ddd..a03de40bd4cd7c 100644
+--- a/arch/arm64/Kconfig
++++ b/arch/arm64/Kconfig
+@@ -120,6 +120,7 @@ config ARM64
+ select CLONE_BACKWARDS
+ select COMMON_CLK
+ select CPU_PM if (SUSPEND || CPU_IDLE)
++ select CPUMASK_OFFSTACK if NR_CPUS > 256
+ select CRC32
+ select DCACHE_WORD_ACCESS
+ select DYNAMIC_FTRACE if FUNCTION_TRACER
+@@ -1430,7 +1431,7 @@ config SCHED_SMT
+ config NR_CPUS
+ int "Maximum number of CPUs (2-4096)"
+ range 2 4096
+- default "256"
++ default "512"
+
+ config HOTPLUG_CPU
+ bool "Support for hot-pluggable CPUs"
+--
+cgit 1.2.3-korg
diff --git a/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch b/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch
index c77b75f36..55f43dcd3 100644
--- a/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch
+++ b/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch
@@ -29,7 +29,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
-@@ -6410,6 +6410,10 @@
+@@ -6468,6 +6468,10 @@
later by a loaded module cannot be set this way.
Example: sysctl.vm.swappiness=40
@@ -42,7 +42,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Ignore sysrq setting - this boot parameter will
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
-@@ -3024,6 +3024,14 @@ config COMPAT_32
+@@ -3052,6 +3052,14 @@ config COMPAT_32
select HAVE_UID16
select OLD_SIGSUSPEND3
@@ -59,14 +59,14 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
depends on IA32_EMULATION || X86_X32_ABI
--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
-@@ -63,7 +63,7 @@ static __always_inline bool do_syscall_x
+@@ -64,7 +64,7 @@ static __always_inline bool do_syscall_x
*/
unsigned int xnr = nr - __X32_SYSCALL_BIT;
- if (IS_ENABLED(CONFIG_X86_X32_ABI) && likely(xnr < X32_NR_syscalls)) {
+ if (IS_ENABLED(CONFIG_X86_X32_ABI) && unlikely(x32_enabled) && likely(xnr < X32_NR_syscalls)) {
xnr = array_index_nospec(xnr, X32_NR_syscalls);
- regs->ax = x32_sys_call_table[xnr](regs);
+ regs->ax = x32_sys_call(regs, xnr);
return true;
--- a/arch/x86/entry/syscall_x32.c
+++ b/arch/x86/entry/syscall_x32.c
@@ -80,9 +80,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
#include <linux/syscalls.h>
#include <asm/syscall.h>
-@@ -16,3 +19,46 @@
- asmlinkage const sys_call_ptr_t x32_sys_call_table[] = {
- #include <asm/syscalls_x32.h>
+@@ -20,3 +23,46 @@
+ default: return __x64_sys_ni_syscall(regs);
+ }
};
+
+/* Maybe enable x32 syscalls */
@@ -139,10 +139,10 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
typedef unsigned long elf_greg_t;
-@@ -150,7 +153,8 @@ do { \
+@@ -151,7 +154,8 @@ do { \
#define compat_elf_check_arch(x) \
- ((elf_check_arch_ia32(x) && ia32_enabled()) || \
+ ((elf_check_arch_ia32(x) && ia32_enabled_verbose()) || \
- (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
+ (IS_ENABLED(CONFIG_X86_X32_ABI) && x32_enabled && \
+ (x)->e_machine == EM_X86_64))
@@ -159,9 +159,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
#include <asm/thread_info.h> /* for TS_COMPAT */
#include <asm/unistd.h>
-@@ -30,6 +31,18 @@ extern const sys_call_ptr_t ia32_sys_cal
- extern const sys_call_ptr_t x32_sys_call_table[];
- #endif
+@@ -28,6 +29,18 @@ extern const sys_call_ptr_t ia32_sys_cal
+ extern long x32_sys_call(const struct pt_regs *, unsigned int nr);
+ extern long x64_sys_call(const struct pt_regs *, unsigned int nr);
+#if defined(CONFIG_X86_X32_ABI)
+#if defined(CONFIG_X86_X32_DISABLED)