s390 updates for 6.2-rc4
Subsystems (3)
Heiko Carstens
maintainerHello Linus,
please pull s390 updates for 6.2-rc4.
Thanks,
Heiko
The following changes since commit 88603b6dc419445847923fcb7fe5080067a30f98:
Linux 6.2-rc2 (2023-01-01 13:53:16 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-6.2-2
for you to fetch changes up to 1ecf7bd9c267ab85aff3c4a17fe56bc9754a13be:
s390: update defconfigs (2023-01-11 21:26:40 +0100)
----------------------------------------------------------------
s390 updates for 6.2-rc4
- Add various missing READ_ONCE() to cmpxchg() loops prevent the compiler from potentially generating incorrect code. This includes a rather large change to the s390 specific hardware sampling code and its current use of cmpxchg_double().
Do the fix now to get it out of the way of Peter Zijlstra's cmpxchg128() work, and have something that can be backported. The added new code includes a private 128 bit cmpxchg variant which will be removed again after Peter's rework is available. Also note that this 128 bit cmpxchg variant is used to implement 128 bit READ_ONCE(), while strictly speaking it wouldn't be necessary, and _READ_ONCE() should also be sufficient; even though it isn't obvious for all converted locations that this is the case. Therefore use this implementation for for the sake of clarity and consistency for now.
- Fix ipl report address handling to avoid kdump failures/hangs.
- Fix misuse of #(el)if in kernel decompressor.
- Define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36, caused by the recently changed discard behaviour.
- Make sure _edata and _end symbols are always page aligned.
- The current header guard DEBUG_H in one of the s390 specific header files is too generic and conflicts with the ath9k wireless driver. Add an _ASM_S390_ prefix to the guard to make it unique.
- Update defconfigs.
----------------------------------------------------------------
Alexander Egorenkov (1):
s390/kexec: fix ipl report address for kdump
Alexander Gordeev (1):
s390: expicitly align _edata and _end symbols on page boundary
Heiko Carstens (4):
s390/cpum_sf: add READ_ONCE() semantics to compare and swap loops s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple()
KVM: s390: interrupt: use READ_ONCE() before cmpxchg()
s390: update defconfigs
Masahiro Yamada (2):
s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36
s390: fix -Wundef warning for CONFIG_KERNEL_ZSTD
Niklas Schnelle (1):
s390/debug: add _ASM_S390_ prefix to header guard
arch/s390/boot/decompressor.c | 4 +- arch/s390/configs/debug_defconfig | 7 ++- arch/s390/configs/defconfig | 6 +- arch/s390/configs/zfcpdump_defconfig | 2 +- arch/s390/include/asm/cpu_mf.h | 31 +++++------ arch/s390/include/asm/debug.h | 6 +- arch/s390/include/asm/percpu.h | 2 +- arch/s390/kernel/machine_kexec_file.c | 5 +- arch/s390/kernel/perf_cpum_sf.c | 101 +++++++++++++++++++++------------- arch/s390/kernel/vmlinux.lds.S | 4 ++ arch/s390/kvm/interrupt.c | 12 ++-- 11 files changed, 107 insertions(+), 73 deletions(-)
arch/s390/boot/decompressor.c +2 -2
@@ -23,9 +23,9 @@#define memmove memmove#define memzero (s, n) memset((s), 0, (n)) -#ifdef CONFIG_KERNEL_BZIP2 +#if defined(CONFIG_KERNEL_BZIP2 )#define BOOT_HEAP_SIZE 0x400000 -#elif CONFIG_KERNEL_ZSTD +#elif defined(CONFIG_KERNEL_ZSTD )#define BOOT_HEAP_SIZE 0x30000#else #define BOOT_HEAP_SIZE 0x10000
arch/s390/configs/debug_defconfig +4 -3
@@ -190,7 +190,6 @@ CONFIG_NFT_CT=m CONFIG_NFT_LOG=m CONFIG_NFT_LIMIT=m CONFIG_NFT_NAT=m -CONFIG_NFT_OBJREF=m CONFIG_NFT_REJECT=m CONFIG_NFT_COMPAT=m CONFIG_NFT_HASH=m
@@ -569,6 +568,7 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_LEGACY_PTY_COUNT=0 +# CONFIG_LEGACY_TIOCSTI is not set CONFIG_VIRTIO_CONSOLE=m CONFIG_HW_RANDOM_VIRTIO=m CONFIG_HANGCHECK_TIMER=m
@@ -660,6 +660,7 @@ CONFIG_CONFIGFS_FS=m CONFIG_ECRYPT_FS=m CONFIG_CRAMFS=m CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT=y CONFIG_SQUASHFS_XATTR=y CONFIG_SQUASHFS_LZ4=y CONFIG_SQUASHFS_LZO=y
@@ -705,6 +706,7 @@ CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y CONFIG_SECURITY_LANDLOCK=y CONFIG_INTEGRITY_SIGNATURE=y CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y +CONFIG_INTEGRITY_PLATFORM_KEYRING=y CONFIG_IMA=y CONFIG_IMA_DEFAULT_HASH_SHA256=y CONFIG_IMA_WRITE_POLICY=y
@@ -781,6 +783,7 @@ CONFIG_ZCRYPT=m CONFIG_PKEY=m CONFIG_CRYPTO_PAES_S390=m CONFIG_CRYPTO_DEV_VIRTIO=m +CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_CORDIC=m CONFIG_CRYPTO_LIB_CURVE25519=m CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m
@@ -848,7 +851,6 @@ CONFIG_PREEMPT_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_FTRACE_SYSCALLS=y CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_BPF_KPROBE_OVERRIDE=y CONFIG_HIST_TRIGGERS=y CONFIG_FTRACE_STARTUP_TEST=y # CONFIG_EVENT_TRACE_STARTUP_TEST is not set
@@ -870,7 +872,6 @@ CONFIG_FAIL_MAKE_REQUEST=y CONFIG_FAIL_IO_TIMEOUT=y CONFIG_FAIL_FUTEX=y CONFIG_FAULT_INJECTION_DEBUG_FS=y -CONFIG_FAIL_FUNCTION=y CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y CONFIG_LKDTM=m CONFIG_TEST_MIN_HEAP=y
arch/s390/configs/defconfig +4 -2
@@ -181,7 +181,6 @@ CONFIG_NFT_CT=m CONFIG_NFT_LOG=m CONFIG_NFT_LIMIT=m CONFIG_NFT_NAT=m -CONFIG_NFT_OBJREF=m CONFIG_NFT_REJECT=m CONFIG_NFT_COMPAT=m CONFIG_NFT_HASH=m
@@ -559,6 +558,7 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_LEGACY_PTY_COUNT=0 +# CONFIG_LEGACY_TIOCSTI is not set CONFIG_VIRTIO_CONSOLE=m CONFIG_HW_RANDOM_VIRTIO=m CONFIG_HANGCHECK_TIMER=m
@@ -645,6 +645,7 @@ CONFIG_CONFIGFS_FS=m CONFIG_ECRYPT_FS=m CONFIG_CRAMFS=m CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT=y CONFIG_SQUASHFS_XATTR=y CONFIG_SQUASHFS_LZ4=y CONFIG_SQUASHFS_LZO=y
@@ -688,6 +689,7 @@ CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y CONFIG_SECURITY_LANDLOCK=y CONFIG_INTEGRITY_SIGNATURE=y CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y +CONFIG_INTEGRITY_PLATFORM_KEYRING=y CONFIG_IMA=y CONFIG_IMA_DEFAULT_HASH_SHA256=y CONFIG_IMA_WRITE_POLICY=y
@@ -766,6 +768,7 @@ CONFIG_ZCRYPT=m CONFIG_PKEY=m CONFIG_CRYPTO_PAES_S390=m CONFIG_CRYPTO_DEV_VIRTIO=m +CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_CORDIC=m CONFIG_PRIME_NUMBERS=m CONFIG_CRYPTO_LIB_CURVE25519=m
@@ -798,7 +801,6 @@ CONFIG_STACK_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_FTRACE_SYSCALLS=y CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_BPF_KPROBE_OVERRIDE=y CONFIG_HIST_TRIGGERS=y CONFIG_SAMPLES=y CONFIG_SAMPLE_TRACE_PRINTK=m
arch/s390/configs/zfcpdump_defconfig +1 -1
@@ -13,7 +13,6 @@ CONFIG_TUNE_ZEC12=y # CONFIG_COMPAT is not set CONFIG_NR_CPUS=2 CONFIG_HZ_100=y -# CONFIG_RELOCATABLE is not set # CONFIG_CHSC_SCH is not set # CONFIG_SCM_BUS is not set CONFIG_CRASH_DUMP=y
@@ -50,6 +49,7 @@ CONFIG_ZFCP=y # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set +# CONFIG_LEGACY_TIOCSTI is not set # CONFIG_HVC_IUCV is not set # CONFIG_HW_RANDOM_S390 is not set # CONFIG_HMC_DRV is not set
arch/s390/include/asm/cpu_mf.h +15 -16
@@ -131,19 +131,21 @@ struct hws_combined_entry {struct hws_diag_entry diag;/* Diagnostic-sampling data entry */ } __packed; -struct hws_trailer_entry { -union { -struct { -unsigned int f:1 ;/* 0 - Block Full Indicator */ -unsigned int a:1 ;/* 1 - Alert request control */ -unsigned int t:1 ;/* 2 - Timestamp format */ - unsigned int :29; /* 3 - 31: Reserved */ -unsigned int bsdes:16 ;/* 32-47: size of basic SDE */ -unsigned int dsdes:16 ;/* 48-63: size of diagnostic SDE */ - }; -unsigned long long flags;/* 0 - 63: All indicators */ +union hws_trailer_header { +struct { +unsigned int f:1 ;/* 0 - Block Full Indicator */ +unsigned int a:1 ;/* 1 - Alert request control */ +unsigned int t:1 ;/* 2 - Timestamp format */ + unsigned int :29; /* 3 - 31: Reserved */ +unsigned int bsdes:16 ;/* 32-47: size of basic SDE */ +unsigned int dsdes:16 ;/* 48-63: size of diagnostic SDE */ +unsigned long long overflow;/* 64 - Overflow Count */ }; -unsigned long long overflow;/* 64 - sample Overflow count */ +__uint128_t val; +}; + +struct hws_trailer_entry { +union hws_trailer_header header;/* 0 - 15 Flags + Overflow Count */ unsigned char timestamp[16 ];/* 16 - 31 timestamp */ unsigned long long reserved1;/* 32 -Reserved */ unsigned long long reserved2;/* */
@@ -290,14 +292,11 @@ static inline unsigned long sample_rate_to_freq(struct hws_qsi_info_block *qsi,return USEC_PER_SEC * qsi->cpu_speed / rate; } -#define SDB_TE_ALERT_REQ_MASK 0x4000000000000000UL -#define SDB_TE_BUFFER_FULL_MASK 0x8000000000000000UL -/* Return TOD timestamp contained in an trailer entry */ static inline unsigned long long trailer_timestamp (struct hws_trailer_entry *te) {/* TOD in STCKE format */ -if (te->t) +if (te->header.t)return *((unsigned long long *) &te->timestamp[1 ]);/* TOD in STCK format */
arch/s390/include/asm/debug.h +3 -3
@@ -4,8 +4,8 @@* * Copyright IBM Corp. 1999, 2020 */ -#ifndef DEBUG_H -#define DEBUG_H +#ifndef _ASM_S390_DEBUG_H +#define _ASM_S390_DEBUG_H#include <linux/string.h> #include <linux/spinlock.h>
@@ -487,4 +487,4 @@ void debug_register_static(debug_info_t *id, int pages_per_area, int nr_areas);#endif /* MODULE */ -#endif /* DEBUG_H */ +#endif /* _ASM_S390_DEBUG_H */
arch/s390/include/asm/percpu.h +1 -1
@@ -31,7 +31,7 @@pcp_op_T__ *ptr__; \preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ - prev__ = *ptr__; \ + prev__ =READ_ONCE (*ptr__); \ do { \ old__ = prev__; \ new__ = old__ op (val); \
arch/s390/kernel/machine_kexec_file.c +3 -2
@@ -187,8 +187,6 @@ static int kexec_file_add_ipl_report(struct kimage *image, data->memsz =ALIGN (data->memsz,PAGE_SIZE ); buf.mem = data->memsz; -if (image->type ==KEXEC_TYPE_CRASH ) - buf.mem += crashk_res.start; ptr = (void *)ipl_cert_list_addr; end = ptr + ipl_cert_list_size;
@@ -225,6 +223,9 @@ static int kexec_file_add_ipl_report(struct kimage *image, data->kernel_buf + offsetof(struct lowcore , ipl_parmblock_ptr); *lc_ipl_parmblock_ptr = (__u32 )buf.mem; +if (image->type ==KEXEC_TYPE_CRASH ) + buf.mem += crashk_res.start; + ret =kexec_add_buffer (&buf); out:return ret;
arch/s390/kernel/perf_cpum_sf.c +62 -39
222 lines not on this page · raw message
arch/s390/kernel/vmlinux.lds.S +4 -0
@@ -17,6 +17,8 @@ /* Handle ro_after_init data on our own. */ #define RO_AFTER_INIT_DATA +#define RUNTIME_DISCARD_EXIT + #define EMITS_PT_NOTE #include <asm-generic/vmlinux.lds.h>
@@ -79,6 +81,7 @@ SECTIONS _end_amode31_refs = .; } + . = ALIGN(PAGE_SIZE); _edata = .; /* End of data section */ /* will be freed after init */
@@ -193,6 +196,7 @@ SECTIONS BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE) + . = ALIGN(PAGE_SIZE); _end = . ; /*
arch/s390/kvm/interrupt.c +8 -4
@@ -83,8 +83,9 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)struct esca_block *sca = vcpu->kvm->arch.sca;union esca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union esca_sigp_ctrl new_val = {0 }, old_val = *sigp_ctrl; +union esca_sigp_ctrl new_val = {0 }, old_val; + old_val =READ_ONCE (*sigp_ctrl); new_val.scn = src_id; new_val.c =1 ; old_val.c =0 ;
@@ -95,8 +96,9 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)struct bsca_block *sca = vcpu->kvm->arch.sca;union bsca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union bsca_sigp_ctrl new_val = {0 }, old_val = *sigp_ctrl; +union bsca_sigp_ctrl new_val = {0 }, old_val; + old_val =READ_ONCE (*sigp_ctrl); new_val.scn = src_id; new_val.c =1 ; old_val.c =0 ;
@@ -126,16 +128,18 @@ static void sca_clear_ext_call(struct kvm_vcpu *vcpu)struct esca_block *sca = vcpu->kvm->arch.sca;union esca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union esca_sigp_ctrl old = *sigp_ctrl; +union esca_sigp_ctrl old; + old =READ_ONCE (*sigp_ctrl); expect = old.value; rc =cmpxchg (&sigp_ctrl->value, old.value,0 ); }else {struct bsca_block *sca = vcpu->kvm->arch.sca;union bsca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union bsca_sigp_ctrl old = *sigp_ctrl; +union bsca_sigp_ctrl old; + old =READ_ONCE (*sigp_ctrl); expect = old.value; rc =cmpxchg (&sigp_ctrl->value, old.value,0 ); }
The pull request you sent on Thu, 12 Jan 2023 18:56:03 +0100:
The pull request you sent on Thu, 12 Jan 2023 18:56:03 +0100:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gittags/s390-6.2-2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5be413a6e2a16e08c8f0f1b59794a7203b5eca2c
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html