Skip to content

Commit 2547f79

Browse files
committed
Merge tag 's390-6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Heiko Carstens: - Provide a new interface for dynamic configuration and deconfiguration of hotplug memory, allowing with and without memmap_on_memory support. This makes the way memory hotplug is handled on s390 much more similar to other architectures - Remove compat support. There shouldn't be any compat user space around anymore, therefore get rid of a lot of code which also doesn't need to be tested anymore - Add stackprotector support. GCC 16 will get new compiler options, which allow to generate code required for kernel stackprotector support - Merge pai_crypto and pai_ext PMU drivers into a new driver. This removes a lot of duplicated code. The new driver is also extendable and allows to support new PMUs - Add driver override support for AP queues - Rework and extend zcrypt and AP trace events to allow for tracing of crypto requests - Support block sizes larger than 65535 bytes for CCW tape devices - Since the rework of the virtual kernel address space the module area and the kernel image are within the same 4GB area. This eliminates the need of weak per cpu variables. Get rid of ARCH_MODULE_NEEDS_WEAK_PER_CPU - Various other small improvements and fixes * tag 's390-6.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (92 commits) watchdog: diag288_wdt: Remove KMSG_COMPONENT macro s390/entry: Use lay instead of aghik s390/vdso: Get rid of -m64 flag handling s390/vdso: Rename vdso64 to vdso s390: Rename head64.S to head.S s390/vdso: Use common STABS_DEBUG and DWARF_DEBUG macros s390: Add stackprotector support s390/modules: Simplify module_finalize() slightly s390: Remove KMSG_COMPONENT macro s390/percpu: Get rid of ARCH_MODULE_NEEDS_WEAK_PER_CPU s390/ap: Restrict driver_override versus apmask and aqmask use s390/ap: Rename mutex ap_perms_mutex to ap_attr_mutex s390/ap: Support driver_override for AP queue devices s390/ap: Use all-bits-one apmask/aqmask for vfio in_use() checks s390/debug: Update description of resize operation s390/syscalls: Switch to generic system call table generation s390/syscalls: Remove system call table pointer from thread_struct s390/uapi: Remove 31 bit support from uapi header files s390: Remove compat support tools: Remove s390 compat support ...
2 parents 4a21d1b + 283f90b commit 2547f79

258 files changed

Lines changed: 3136 additions & 6189 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/arch/s390/s390dbf.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,8 @@ Examples:
243243

244244
Changing the size of debug areas
245245
------------------------------------
246-
It is possible the change the size of debug areas through piping
247-
the number of pages to the debugfs file "pages". The resize request will
248-
also flush the debug areas.
246+
To resize a debug area, write the desired page count to the "pages" file.
247+
Existing data is preserved if it fits; otherwise, oldest entries are dropped.
249248

250249
Example:
251250

arch/s390/Kconfig

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ config CC_HAS_ASM_AOR_FORMAT_FLAGS
6969
Clang versions before 19.1.0 do not support A,
7070
O, and R inline assembly format flags.
7171

72+
config CC_HAS_STACKPROTECTOR_GLOBAL
73+
def_bool $(cc-option, -mstack-protector-guard=global -mstack-protector-guard-record)
74+
7275
config S390
7376
def_bool y
7477
#
@@ -140,7 +143,6 @@ config S390
140143
select ARCH_INLINE_WRITE_UNLOCK_IRQ
141144
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
142145
select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
143-
select ARCH_MODULE_NEEDS_WEAK_PER_CPU
144146
select ARCH_STACKWALK
145147
select ARCH_SUPPORTS_ATOMIC_RMW
146148
select ARCH_SUPPORTS_DEBUG_PAGEALLOC
@@ -245,6 +247,7 @@ config S390
245247
select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
246248
select HAVE_SETUP_PER_CPU_AREA
247249
select HAVE_SOFTIRQ_ON_OWN_STACK
250+
select HAVE_STACKPROTECTOR if CC_HAS_STACKPROTECTOR_GLOBAL
248251
select HAVE_SYSCALL_TRACEPOINTS
249252
select HAVE_VIRT_CPU_ACCOUNTING
250253
select HAVE_VIRT_CPU_ACCOUNTING_IDLE
@@ -504,22 +507,6 @@ config COMMAND_LINE_SIZE
504507
This allows you to specify the maximum length of the kernel command
505508
line.
506509

507-
config COMPAT
508-
def_bool n
509-
prompt "Kernel support for 31 bit emulation"
510-
select ARCH_WANT_OLD_COMPAT_IPC
511-
select COMPAT_OLD_SIGACTION
512-
select HAVE_UID16
513-
depends on MULTIUSER
514-
depends on !CC_IS_CLANG && !LD_IS_LLD
515-
help
516-
Select this option if you want to enable your system kernel to
517-
handle system-calls from ELF binaries for 31 bit ESA. This option
518-
(and some other stuff like libraries and such) is needed for
519-
executing 31 bit applications.
520-
521-
If unsure say N.
522-
523510
config SMP
524511
def_bool y
525512

arch/s390/Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ ifdef CONFIG_EXPOLINE
9090
aflags-y += -DCC_USING_EXPOLINE
9191
endif
9292

93+
ifeq ($(CONFIG_STACKPROTECTOR),y)
94+
KBUILD_CFLAGS += -mstack-protector-guard=global -mstack-protector-guard-record
95+
endif
96+
9397
ifdef CONFIG_FUNCTION_TRACER
9498
ifeq ($(call cc-option,-mfentry -mnop-mcount),)
9599
# make use of hotpatch feature if the compiler supports it
@@ -135,10 +139,9 @@ zfcpdump:
135139
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
136140

137141
archheaders:
138-
$(Q)$(MAKE) $(build)=$(syscalls) uapi
142+
$(Q)$(MAKE) $(build)=$(syscalls) all
139143

140144
archprepare:
141-
$(Q)$(MAKE) $(build)=$(syscalls) kapi
142145
$(Q)$(MAKE) $(build)=$(tools) kapi $(extra_tools)
143146
ifeq ($(KBUILD_EXTMOD),)
144147
# We need to generate vdso-offsets.h before compiling certain files in kernel/.
@@ -149,12 +152,9 @@ ifeq ($(KBUILD_EXTMOD),)
149152
# this hack.
150153
prepare: vdso_prepare
151154
vdso_prepare: prepare0
152-
$(Q)$(MAKE) $(build)=arch/s390/kernel/vdso64 include/generated/vdso64-offsets.h
153-
$(if $(CONFIG_COMPAT),$(Q)$(MAKE) \
154-
$(build)=arch/s390/kernel/vdso32 include/generated/vdso32-offsets.h)
155+
$(Q)$(MAKE) $(build)=arch/s390/kernel/vdso include/generated/vdso-offsets.h
155156

156-
vdso-install-y += arch/s390/kernel/vdso64/vdso64.so.dbg
157-
vdso-install-$(CONFIG_COMPAT) += arch/s390/kernel/vdso32/vdso32.so.dbg
157+
vdso-install-y += arch/s390/kernel/vdso/vdso.so.dbg
158158

159159
endif
160160

arch/s390/appldata/appldata_base.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
1010
*/
1111

12-
#define KMSG_COMPONENT "appldata"
13-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
12+
#define pr_fmt(fmt) "appldata: " fmt
1413

1514
#include <linux/export.h>
1615
#include <linux/module.h>

arch/s390/appldata/appldata_os.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
* Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
99
*/
1010

11-
#define KMSG_COMPONENT "appldata"
12-
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
11+
#define pr_fmt(fmt) "appldata: " fmt
1312

1413
#include <linux/module.h>
1514
#include <linux/init.h>

arch/s390/boot/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
3232
obj-y += $(if $(CONFIG_KERNEL_UNCOMPRESSED),,decompressor.o) info.o
3333
obj-$(CONFIG_KERNEL_ZSTD) += clz_ctz.o
3434
obj-$(CONFIG_KMSAN) += kmsan.o
35+
obj-$(CONFIG_STACKPROTECTOR) += stackprotector.o
3536
obj-all := $(obj-y) piggy.o syms.o
3637

3738
targets := bzImage section_cmp.boot.data section_cmp.boot.preserved.data $(obj-y)

arch/s390/boot/boot.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ struct vmlinux_info {
2828
unsigned long invalid_pg_dir_off;
2929
unsigned long alt_instructions;
3030
unsigned long alt_instructions_end;
31+
#ifdef CONFIG_STACKPROTECTOR
32+
unsigned long stack_prot_start;
33+
unsigned long stack_prot_end;
34+
#endif
3135
#ifdef CONFIG_KASAN
3236
unsigned long kasan_early_shadow_page_off;
3337
unsigned long kasan_early_shadow_pte_off;

arch/s390/boot/ipl_data.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// SPDX-License-Identifier: GPL-2.0
22

3-
#include <linux/compat.h>
43
#include <linux/ptrace.h>
54
#include <asm/cio.h>
65
#include <asm/asm-offsets.h>
@@ -12,7 +11,7 @@
1211
#define PSW_MASK_DISABLED (PSW_MASK_WAIT | PSW_MASK_EA | PSW_MASK_BA)
1312

1413
struct ipl_lowcore {
15-
psw_t32 ipl_psw; /* 0x0000 */
14+
psw32_t ipl_psw; /* 0x0000 */
1615
struct ccw0 ccwpgm[2]; /* 0x0008 */
1716
u8 fill[56]; /* 0x0018 */
1817
struct ccw0 ccwpgmcc[20]; /* 0x0050 */

arch/s390/boot/ipl_parm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/init.h>
44
#include <linux/ctype.h>
55
#include <linux/pgtable.h>
6+
#include <asm/arch-stackprotector.h>
67
#include <asm/abs_lowcore.h>
78
#include <asm/page-states.h>
89
#include <asm/machine.h>
@@ -294,6 +295,11 @@ void parse_boot_command_line(void)
294295
cmma_flag = 0;
295296
}
296297

298+
#ifdef CONFIG_STACKPROTECTOR
299+
if (!strcmp(param, "debug_stackprotector"))
300+
stack_protector_debug = 1;
301+
#endif
302+
297303
#if IS_ENABLED(CONFIG_KVM)
298304
if (!strcmp(param, "prot_virt")) {
299305
rc = kstrtobool(val, &enabled);

arch/s390/boot/stackprotector.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
3+
#define boot_fmt(fmt) "stackprot: " fmt
4+
5+
#include "boot.h"
6+
#include "../kernel/stackprotector.c"

0 commit comments

Comments
 (0)