Skip to content

Commit 847d428

Browse files
committed
Merge tag 's390-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Vasily Gorbik: - Remove address space overrides using set_fs() - Convert to generic vDSO - Convert to generic page table dumper - Add ARCH_HAS_DEBUG_WX support - Add leap seconds handling support - Add NVMe firmware-assisted kernel dump support - Extend NVMe boot support with memory clearing control and addition of kernel parameters - AP bus and zcrypt api code rework. Add adapter configure/deconfigure interface. Extend debug features. Add failure injection support - Add ECC secure private keys support - Add KASan support for running protected virtualization host with 4-level paging - Utilize destroy page ultravisor call to speed up secure guests shutdown - Implement ioremap_wc() and ioremap_prot() with MIO in PCI code - Various checksum improvements - Other small various fixes and improvements all over the code * tag 's390-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (85 commits) s390/uaccess: fix indentation s390/uaccess: add default cases for __put_user_fn()/__get_user_fn() s390/zcrypt: fix wrong format specifications s390/kprobes: move insn_page to text segment s390/sie: fix typo in SIGP code description s390/lib: fix kernel doc for memcmp() s390/zcrypt: Introduce Failure Injection feature s390/zcrypt: move ap_msg param one level up the call chain s390/ap/zcrypt: revisit ap and zcrypt error handling s390/ap: Support AP card SCLP config and deconfig operations s390/sclp: Add support for SCLP AP adapter config/deconfig s390/ap: add card/queue deconfig state s390/ap: add error response code field for ap queue devices s390/ap: split ap queue state machine state from device state s390/zcrypt: New config switch CONFIG_ZCRYPT_DEBUG s390/zcrypt: introduce msg tracking in zcrypt functions s390/startup: correct early pgm check info formatting s390: remove orphaned extern variables declarations s390/kasan: make sure int handler always run with DAT on s390/ipl: add support to control memory clearing for nvme re-IPL ...
2 parents 96685f8 + 10e5afb commit 847d428

File tree

129 files changed

+4094
-2162
lines changed

Some content is hidden

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

129 files changed

+4094
-2162
lines changed

Documentation/features/vm/ioremap_prot/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
| parisc: | TODO |
2525
| powerpc: | ok |
2626
| riscv: | TODO |
27-
| s390: | TODO |
27+
| s390: | ok |
2828
| sh: | ok |
2929
| sparc: | TODO |
3030
| um: | TODO |

arch/s390/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ config S390
6060
def_bool y
6161
select ARCH_BINFMT_ELF_STATE
6262
select ARCH_HAS_DEBUG_VM_PGTABLE
63+
select ARCH_HAS_DEBUG_WX
6364
select ARCH_HAS_DEVMEM_IS_ALLOWED
6465
select ARCH_HAS_ELF_RANDOMIZE
6566
select ARCH_HAS_FORTIFY_SOURCE
@@ -73,6 +74,7 @@ config S390
7374
select ARCH_HAS_STRICT_MODULE_RWX
7475
select ARCH_HAS_SYSCALL_WRAPPER
7576
select ARCH_HAS_UBSAN_SANITIZE_ALL
77+
select ARCH_HAS_VDSO_DATA
7678
select ARCH_HAVE_NMI_SAFE_CMPXCHG
7779
select ARCH_INLINE_READ_LOCK
7880
select ARCH_INLINE_READ_LOCK_BH
@@ -118,6 +120,8 @@ config S390
118120
select GENERIC_CPU_AUTOPROBE
119121
select GENERIC_CPU_VULNERABILITIES
120122
select GENERIC_FIND_FIRST_BIT
123+
select GENERIC_GETTIMEOFDAY
124+
select GENERIC_PTDUMP
121125
select GENERIC_SMP_IDLE_THREAD
122126
select GENERIC_TIME_VSYSCALL
123127
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
@@ -149,6 +153,7 @@ config S390
149153
select HAVE_FUNCTION_TRACER
150154
select HAVE_FUTEX_CMPXCHG if FUTEX
151155
select HAVE_GCC_PLUGINS
156+
select HAVE_GENERIC_VDSO
152157
select HAVE_KERNEL_BZIP2
153158
select HAVE_KERNEL_GZIP
154159
select HAVE_KERNEL_LZ4

arch/s390/Kconfig.debug

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,5 @@
33
config TRACE_IRQFLAGS_SUPPORT
44
def_bool y
55

6-
config S390_PTDUMP
7-
bool "Export kernel pagetable layout to userspace via debugfs"
8-
depends on DEBUG_KERNEL
9-
select DEBUG_FS
10-
help
11-
Say Y here if you want to show the kernel pagetable layout in a
12-
debugfs file. This information is only useful for kernel developers
13-
who are working in architecture specific areas of the kernel.
14-
It is probably not a good idea to enable this feature in a production
15-
kernel.
16-
If in doubt, say "N"
17-
186
config EARLY_PRINTK
197
def_bool y

arch/s390/boot/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,3 @@ $(obj)/startup.a: $(OBJECTS) FORCE
7373
install:
7474
sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \
7575
System.map "$(INSTALL_PATH)"
76-
77-
chkbss := $(obj-y)
78-
chkbss-target := startup.a
79-
include $(srctree)/arch/s390/scripts/Makefile.chkbss

arch/s390/boot/compressed/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,3 @@ $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
6262
OBJCOPYFLAGS_piggy.o := -I binary -O elf64-s390 -B s390:64-bit --rename-section .data=.vmlinux.bin.compressed
6363
$(obj)/piggy.o: $(obj)/vmlinux.bin$(suffix-y) FORCE
6464
$(call if_changed,objcopy)
65-
66-
chkbss := $(filter-out piggy.o info.o, $(obj-y))
67-
chkbss-target := vmlinux.bin
68-
include $(srctree)/arch/s390/scripts/Makefile.chkbss

arch/s390/boot/compressed/decompressor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* gzip declarations
1717
*/
1818
#define STATIC static
19-
#define STATIC_RW_DATA static __section(.data)
2019

2120
#undef memset
2221
#undef memcpy

arch/s390/boot/compressed/vmlinux.lds.S

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ SECTIONS
5858
BOOT_DATA
5959
BOOT_DATA_PRESERVED
6060

61+
/*
62+
* This is the BSS section of the decompressor and not of the decompressed Linux kernel.
63+
* It will consume place in the decompressor's image.
64+
*/
65+
. = ALIGN(8);
66+
.bss : {
67+
_bss = . ;
68+
*(.bss)
69+
*(.bss.*)
70+
*(COMMON)
71+
_ebss = .;
72+
}
73+
6174
/*
6275
* uncompressed image info used by the decompressor it should match
6376
* struct vmlinux_info. It comes from .vmlinux.info section of
@@ -81,15 +94,6 @@ SECTIONS
8194
FILL(0xff);
8295
. = ALIGN(4096);
8396
}
84-
. = ALIGN(256);
85-
.bss : {
86-
_bss = . ;
87-
*(.bss)
88-
*(.bss.*)
89-
*(COMMON)
90-
. = ALIGN(8); /* For convenience during zeroing */
91-
_ebss = .;
92-
}
9397
_end = .;
9498

9599
/* Sections to be discarded */

arch/s390/boot/head.S

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -360,22 +360,23 @@ ENTRY(startup_kdump)
360360
# the save area and does disabled wait with a faulty address.
361361
#
362362
ENTRY(startup_pgm_check_handler)
363-
stmg %r0,%r15,__LC_SAVE_AREA_SYNC
364-
la %r1,4095
365-
stctg %c0,%c15,__LC_CREGS_SAVE_AREA-4095(%r1)
366-
mvc __LC_GPREGS_SAVE_AREA-4095(128,%r1),__LC_SAVE_AREA_SYNC
367-
mvc __LC_PSW_SAVE_AREA-4095(16,%r1),__LC_PGM_OLD_PSW
363+
stmg %r8,%r15,__LC_SAVE_AREA_SYNC
364+
la %r8,4095
365+
stctg %c0,%c15,__LC_CREGS_SAVE_AREA-4095(%r8)
366+
stmg %r0,%r7,__LC_GPREGS_SAVE_AREA-4095(%r8)
367+
mvc __LC_GPREGS_SAVE_AREA-4095+64(64,%r8),__LC_SAVE_AREA_SYNC
368+
mvc __LC_PSW_SAVE_AREA-4095(16,%r8),__LC_PGM_OLD_PSW
368369
mvc __LC_RETURN_PSW(16),__LC_PGM_OLD_PSW
369370
ni __LC_RETURN_PSW,0xfc # remove IO and EX bits
370371
ni __LC_RETURN_PSW+1,0xfb # remove MCHK bit
371372
oi __LC_RETURN_PSW+1,0x2 # set wait state bit
372-
larl %r2,.Lold_psw_disabled_wait
373-
stg %r2,__LC_PGM_NEW_PSW+8
374-
l %r15,.Ldump_info_stack-.Lold_psw_disabled_wait(%r2)
373+
larl %r9,.Lold_psw_disabled_wait
374+
stg %r9,__LC_PGM_NEW_PSW+8
375+
l %r15,.Ldump_info_stack-.Lold_psw_disabled_wait(%r9)
375376
brasl %r14,print_pgm_check_info
376377
.Lold_psw_disabled_wait:
377-
la %r1,4095
378-
lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)
378+
la %r8,4095
379+
lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r8)
379380
lpswe __LC_RETURN_PSW # disabled wait
380381
.Ldump_info_stack:
381382
.long 0x5000 + PAGE_SIZE - STACK_FRAME_OVERHEAD

arch/s390/boot/ipl_parm.c

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ unsigned long __bootdata(memory_end);
2121
int __bootdata(memory_end_set);
2222
int __bootdata(noexec_disabled);
2323

24-
int kaslr_enabled __section(.data);
24+
int kaslr_enabled;
2525

2626
static inline int __diag308(unsigned long subcode, void *addr)
2727
{
@@ -70,30 +70,44 @@ static size_t scpdata_length(const u8 *buf, size_t count)
7070
static size_t ipl_block_get_ascii_scpdata(char *dest, size_t size,
7171
const struct ipl_parameter_block *ipb)
7272
{
73-
size_t count;
74-
size_t i;
73+
const __u8 *scp_data;
74+
__u32 scp_data_len;
7575
int has_lowercase;
76+
size_t count = 0;
77+
size_t i;
78+
79+
switch (ipb->pb0_hdr.pbt) {
80+
case IPL_PBT_FCP:
81+
scp_data_len = ipb->fcp.scp_data_len;
82+
scp_data = ipb->fcp.scp_data;
83+
break;
84+
case IPL_PBT_NVME:
85+
scp_data_len = ipb->nvme.scp_data_len;
86+
scp_data = ipb->nvme.scp_data;
87+
break;
88+
default:
89+
goto out;
90+
}
7691

77-
count = min(size - 1, scpdata_length(ipb->fcp.scp_data,
78-
ipb->fcp.scp_data_len));
92+
count = min(size - 1, scpdata_length(scp_data, scp_data_len));
7993
if (!count)
8094
goto out;
8195

8296
has_lowercase = 0;
8397
for (i = 0; i < count; i++) {
84-
if (!isascii(ipb->fcp.scp_data[i])) {
98+
if (!isascii(scp_data[i])) {
8599
count = 0;
86100
goto out;
87101
}
88-
if (!has_lowercase && islower(ipb->fcp.scp_data[i]))
102+
if (!has_lowercase && islower(scp_data[i]))
89103
has_lowercase = 1;
90104
}
91105

92106
if (has_lowercase)
93-
memcpy(dest, ipb->fcp.scp_data, count);
107+
memcpy(dest, scp_data, count);
94108
else
95109
for (i = 0; i < count; i++)
96-
dest[i] = tolower(ipb->fcp.scp_data[i]);
110+
dest[i] = tolower(scp_data[i]);
97111
out:
98112
dest[count] = '\0';
99113
return count;
@@ -115,6 +129,7 @@ static void append_ipl_block_parm(void)
115129
parm, COMMAND_LINE_SIZE - len - 1, &ipl_block);
116130
break;
117131
case IPL_PBT_FCP:
132+
case IPL_PBT_NVME:
118133
rc = ipl_block_get_ascii_scpdata(
119134
parm, COMMAND_LINE_SIZE - len - 1, &ipl_block);
120135
break;
@@ -209,7 +224,7 @@ static void modify_fac_list(char *str)
209224
check_cleared_facilities();
210225
}
211226

212-
static char command_line_buf[COMMAND_LINE_SIZE] __section(.data);
227+
static char command_line_buf[COMMAND_LINE_SIZE];
213228
void parse_boot_command_line(void)
214229
{
215230
char *param, *val;
@@ -230,7 +245,7 @@ void parse_boot_command_line(void)
230245
if (!strcmp(param, "vmalloc") && val)
231246
vmalloc_size = round_up(memparse(val, NULL), PAGE_SIZE);
232247

233-
if (!strcmp(param, "dfltcc")) {
248+
if (!strcmp(param, "dfltcc") && val) {
234249
if (!strcmp(val, "off"))
235250
zlib_dfltcc_support = ZLIB_DFLTCC_DISABLED;
236251
else if (!strcmp(val, "on"))
@@ -254,17 +269,34 @@ void parse_boot_command_line(void)
254269

255270
if (!strcmp(param, "nokaslr"))
256271
kaslr_enabled = 0;
272+
273+
#if IS_ENABLED(CONFIG_KVM)
274+
if (!strcmp(param, "prot_virt")) {
275+
rc = kstrtobool(val, &enabled);
276+
if (!rc && enabled)
277+
prot_virt_host = 1;
278+
}
279+
#endif
257280
}
258281
}
259282

283+
static inline bool is_ipl_block_dump(void)
284+
{
285+
if (ipl_block.pb0_hdr.pbt == IPL_PBT_FCP &&
286+
ipl_block.fcp.opt == IPL_PB0_FCP_OPT_DUMP)
287+
return true;
288+
if (ipl_block.pb0_hdr.pbt == IPL_PBT_NVME &&
289+
ipl_block.nvme.opt == IPL_PB0_NVME_OPT_DUMP)
290+
return true;
291+
return false;
292+
}
293+
260294
void setup_memory_end(void)
261295
{
262296
#ifdef CONFIG_CRASH_DUMP
263297
if (OLDMEM_BASE) {
264298
kaslr_enabled = 0;
265-
} else if (ipl_block_valid &&
266-
ipl_block.pb0_hdr.pbt == IPL_PBT_FCP &&
267-
ipl_block.fcp.opt == IPL_PB0_FCP_OPT_DUMP) {
299+
} else if (ipl_block_valid && is_ipl_block_dump()) {
268300
kaslr_enabled = 0;
269301
if (!sclp_early_get_hsa_size(&memory_end) && memory_end)
270302
memory_end_set = 1;

0 commit comments

Comments
 (0)