projects/linux·commit 375d5d57

Merge tag 's390-7.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

375d5d57 · Linus Torvalds <[email protected]> · 2026-10-20 14:28:32 -10:00

Pull s390 updates from Heiko Carstens:

 - Add support for sclp-vt220 terminal resize events e.g. for QEMU

 - Warn if kernel command line contains non-printable EBCDIC characters

 - Improve show_code() disassembly output by using reliable markers for
   the instruction address and faulting instruction

 - Rework exception handling to require only a single exception table
   entry per faulting instruction: convert all inline assemblies from
   EX_TABLE to the new EX_TABLE_INSN macros. The previous exception
   handling was error prone since it usually required two EX_TABLE
   entries: one pointing at the instruction, and one pointing behind it

 - Disallow kprobes on instructions with exception table entries to
   avoid exception handlers decoding a breakpoint instead of the
   original instruction

 - Preemptible percpu ops changes:

    - Simplify percpu_entry() and percpu_exit() by encoding the percpu
      base, offset, and pointer registers into the lowcore marker,
      allowing percpu_exit() to update the percpu pointer on CPU
      migration without comparing the interrupted instruction

    - Convert this_cpu_cmpxchg(), this_cpu_xchg(), and
      this_cpu_cmpxchg128() to preemptible percpu ops; provide
      this_cpu_try_cmpxchg()

 - Emulate virtual timer in appldata via delayed work and remove the
   s390 specific vtimer infrastructure

 - Add lock contention tracepoints to rwlock slowpath

 - Fix incorrect return address in signal frame setup

 - Fix cpum_cf CPU hotplug handling

 - Convert various __get_free_pages() / get_zeroed_page() users to
   kmalloc() / kzalloc()

 - PCI:

    - Improve RPCIT instruction tracing

    - Fix double-free, use-after-free, and resource leaks in zPCI MSI
      and IRQ setup / cleanup paths

 - Crypto and zcrypt:

    - Improve reply message and length verification checks for CCA,
      EP11, and ICA messages to prevent out-of-bounds reads

    - Add missing array_index_nospec() for domain index uses in zcrypt
      to prevent speculative execution bypass

    - Fix out-of-bounds read in cca_query_crypto_facility()

 - Various other small fixes and improvements

* tag 's390-7.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (102 commits)
  s390/signal: Cleanup coding style
  s390/signal: Fix incorrect return address in signal frame
  s390/probes: Fix wrong mnemonic comment for clgib
  s390/probes: Add missing fixup for bctgr and bic
  s390/probes: Fix wrong opcode for cgrb fixup
  s390: Select ARCH_MEMORY_ORDER_TSO
  s390/mm: Cleanup pXXp_flush_lazy() routines
  s390/pci: Add function handle to RPCIT insn trace
  s390/pci: Use 32-bit fh outside of inline asm
  s390/pci: Adjust alignment in insn trace
  s390/sclp: Remove redundant memset after memblock_alloc_low()
  s390/entry: Save lowcore on invalid kernel stack
  s390/entry: Last breaking event vs invalid kernel stack
  s390/percpu: ImplemenHeiko Carstenst this_cpu_try_cmpxchg()
  s390/percpu: Drop unused output register from arch_this_cpu_to_op()
  s390/percpu: Drop unused output register from arch_this_cpu_add()
  s390/percpu: Use asm_inline for arch_this_cpu_add()
  s390/extable: Remove EX_TABLE macros and fallback extable search
  s390/bpf: Simplify exception table entry handling
  s390/sclp: Convert inline assembly to EX_TABLE_INSN
  ...
Commit
375d5d57545f53d2bc3e15ada0e9da360fc68bea
Parents
ae3af2d1 · 3e30b96f

Merge commit. Changes below are compared with the first parent: ae3af2d1.

Changes

90 files changed · +1680 −1451

FileStatusAddDelContent
arch/s390/Kconfigmodified+1−0View file
arch/s390/appldata/appldata_base.cmodified+108−65View file
arch/s390/boot/ipl_parm.cmodified+15−4View file
arch/s390/boot/pgm_check.cmodified+13−1View file
arch/s390/boot/physmem_info.cmodified+9−9View file
arch/s390/boot/startup.cmodified+6−6View file
arch/s390/configs/debug_defconfigmodified+14−0View file
arch/s390/configs/defconfigmodified+14−0View file
arch/s390/hypfs/hypfs_vm.cmodified+3−3View file
arch/s390/include/asm/Kbuildmodified+1−0View file
arch/s390/include/asm/ap.hmodified+6−6View file
arch/s390/include/asm/asm-extable.hmodified+19−9View file
arch/s390/include/asm/cpu_mf.hmodified+9−9View file
arch/s390/include/asm/diag.hmodified+2−3View file
arch/s390/include/asm/diag288.hmodified+3−3View file
arch/s390/include/asm/ebcdic.hmodified+6−0View file
arch/s390/include/asm/entry-percpu.hmodified+17−54View file
arch/s390/include/asm/extable.hmodified+7−18View file
arch/s390/include/asm/fpu-insn.hmodified+3−3View file
arch/s390/include/asm/futex.hmodified+7−10View file
arch/s390/include/asm/idals.hmodified+6−3View file
arch/s390/include/asm/lowcore.hmodified+4−1View file
arch/s390/include/asm/pci_insn.hmodified+1−1View file
arch/s390/include/asm/percpu.hmodified+265−138View file
arch/s390/include/asm/ptrace.hmodified+6−0View file
arch/s390/include/asm/uaccess.hmodified+15−30View file
arch/s390/include/asm/vtime.hmodified+2−0View file
arch/s390/include/asm/vtimer.hdeleted+0−30View before deletion
arch/s390/include/asm/word-at-a-time.hmodified+2−3View file
arch/s390/kernel/cert_store.cmodified+3−3View file
arch/s390/kernel/diag/diag.cmodified+6−6View file
arch/s390/kernel/dis.cmodified+20−17View file
arch/s390/kernel/dumpstack.cmodified+5−2View file
arch/s390/kernel/early.cmodified+21−5View file
arch/s390/kernel/ebcdic.cmodified+39−1View file
arch/s390/kernel/entry.Smodified+16−1View file
arch/s390/kernel/entry.hmodified+4−0View file
arch/s390/kernel/hiperdispatch.cmodified+1−1View file
arch/s390/kernel/ipl.cmodified+3−3View file
arch/s390/kernel/irq.cmodified+4−6View file
arch/s390/kernel/kprobes.cmodified+3−0View file
arch/s390/kernel/nmi.cmodified+1−3View file
arch/s390/kernel/perf_cpum_cf.cmodified+12−7View file
arch/s390/kernel/process.cmodified+6−7View file
arch/s390/kernel/ptrace.cmodified+4−5View file
arch/s390/kernel/signal.cmodified+95−135View file
arch/s390/kernel/smp.cmodified+1−1View file
arch/s390/kernel/text_amode31.Smodified+14−20View file
arch/s390/kernel/time.cmodified+1−1View file
arch/s390/kernel/traps.cmodified+27−15View file
arch/s390/kernel/uprobes.cmodified+1−1View file
arch/s390/kernel/vtime.cmodified+8−204View file
arch/s390/kvm/s390/gaccess.cmodified+5−6View file
arch/s390/lib/probes.cmodified+14−6View file
arch/s390/lib/spinlock.cmodified+4−0View file
arch/s390/lib/uaccess.cmodified+12−17View file
arch/s390/mm/extable.cmodified+3−3View file
arch/s390/mm/pfault.cmodified+6−6View file
arch/s390/mm/pgtable.cmodified+2−2View file
arch/s390/net/bpf_jit_comp.cmodified+21−57View file
arch/s390/pci/pci_clp.cmodified+6−6View file
arch/s390/pci/pci_insn.cmodified+53−25View file
arch/s390/pci/pci_irq.cmodified+67−42View file
arch/s390/pci/pci_mmio.cmodified+15−13View file
arch/s390/tools/.gitignoremodified+1−0View file
arch/s390/tools/Makefilemodified+11−5View file
arch/s390/tools/gen_facilities.c → arch/s390/tools/gen_bitmaps.crenamed+84−19View file
arch/s390/tools/gen_opcode_table.cmodified+4−19View file
drivers/iommu/s390-iommu.cmodified+3−5View file
drivers/s390/block/dasd_diag.cmodified+3−3View file
drivers/s390/char/diag_ftp.cmodified+3−3View file
drivers/s390/char/fs3270.cmodified+3−0View file
drivers/s390/char/keyboard.cmodified+4−2View file
drivers/s390/char/sclp.hmodified+3−4View file
drivers/s390/char/sclp_early.cmodified+0−1View file
drivers/s390/char/sclp_vt220.cmodified+74−13View file
drivers/s390/char/vmcp.cmodified+1−3View file
drivers/s390/cio/chsc.cmodified+10−10View file
drivers/s390/cio/chsc_sch.cmodified+106−194View file
drivers/s390/cio/cmf.cmodified+6−5View file
drivers/s390/cio/ioasm.cmodified+12−12View file
drivers/s390/cio/qdio.hmodified+1−1View file
drivers/s390/cio/qdio_main.cmodified+10−13View file
drivers/s390/cio/qdio_setup.cmodified+7−7View file
drivers/s390/cio/qdio_thinint.cmodified+1−1View file
drivers/s390/cio/scm.cmodified+3−4View file
drivers/s390/crypto/zcrypt_api.cmodified+25−10View file
drivers/s390/crypto/zcrypt_ccamisc.cmodified+20−2View file
drivers/s390/crypto/zcrypt_msgtype50.cmodified+68−27View file
drivers/s390/crypto/zcrypt_msgtype6.cmodified+150−52View file

Only the first 600 diff lines are shown. Download the complete patch.

arch/s390/Kconfig

View file
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 2682a2b..10ada55 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -145,6 +145,7 @@ config S390
select ARCH_INLINE_WRITE_UNLOCK_BH
select ARCH_INLINE_WRITE_UNLOCK_IRQ
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
+ select ARCH_MEMORY_ORDER_TSO
select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
select ARCH_STACKWALK
select ARCH_SUPPORTS_ATOMIC_RMW

arch/s390/appldata/appldata_base.c

View file
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 9cba463..836c51d 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -28,19 +28,14 @@
#include <linux/workqueue.h>
#include <linux/uaccess.h>
#include <linux/io.h>
+#include <linux/kernel_stat.h>
#include <asm/appldata.h>
-#include <asm/vtimer.h>
#include <asm/smp.h>
#include "appldata.h"
-
-#define APPLDATA_CPU_INTERVAL 10000 /* default (CPU) time for
- sampling interval in
- milliseconds */
-
-#define TOD_MICRO 0x01000 /* nr. of TOD clock units
- for 1 microsecond */
+/* Default CPU time for sampling interval */
+#define APPLDATA_CPU_INTERVAL (10 * NSEC_PER_SEC)
/*
* /proc entries (sysctl)
@@ -64,22 +59,14 @@ static const struct ctl_table appldata_table[] = {
},
};
-/*
- * Timer
- */
-static struct vtimer_list appldata_timer;
+static void appldata_work_fn(struct work_struct *work);
+static DECLARE_DELAYED_WORK(appldata_work, appldata_work_fn);
-static DEFINE_SPINLOCK(appldata_timer_lock);
-static int appldata_interval = APPLDATA_CPU_INTERVAL;
+static DEFINE_MUTEX(appldata_timer_lock);
+static u64 appldata_interval = APPLDATA_CPU_INTERVAL;
static int appldata_timer_active;
-/*
- * Work queue
- */
-static struct workqueue_struct *appldata_wq;
-static void appldata_work_fn(struct work_struct *work);
-static DECLARE_WORK(appldata_work, appldata_work_fn);
-
+static u64 appldata_cputime_start;
/*
* Ops list
@@ -89,14 +76,34 @@ static LIST_HEAD(appldata_ops_list);
/*************************** timer, work, DIAG *******************************/
-/*
- * appldata_timer_function()
- *
- * schedule work and reschedule timer
- */
-static void appldata_timer_function(unsigned long data)
+static u64 appldata_total_cpu_time_ns(void)
{
- queue_work(appldata_wq, (struct work_struct *) data);
+ u64 total = 0;
+ int cpu;
+
+ for_each_possible_cpu(cpu) {
+ total += kcpustat_cpu(cpu).cpustat[CPUTIME_USER];
+ total += kcpustat_cpu(cpu).cpustat[CPUTIME_NICE];
+ total += kcpustat_cpu(cpu).cpustat[CPUTIME_SYSTEM];
+ total += kcpustat_cpu(cpu).cpustat[CPUTIME_IRQ];
+ total += kcpustat_cpu(cpu).cpustat[CPUTIME_SOFTIRQ];
+ }
+ return total;
+}
+
+static void appldata_schedule_work(u64 remaining)
+{
+ unsigned int ncpus = num_online_cpus();
+ unsigned long delay = HZ / 10;
+
+ /*
+ * At most ncpus CPUs consume CPU time simultaneously, so the
+ * minimum wall-clock time until the remaining CPU time elapses
+ * is remaining / ncpus.
+ * Make sure the work is not scheduled more than once per 100ms.
+ */
+ delay = max(delay, nsecs_to_jiffies(remaining / ncpus));
+ mod_delayed_work(system_percpu_wq, &appldata_work, delay);
}
/*
@@ -106,9 +113,27 @@ static void appldata_timer_function(unsigned long data)
*/
static void appldata_work_fn(struct work_struct *work)
{
- struct list_head *lh;
+ u64 now, elapsed, interval;
struct appldata_ops *ops;
-
+ struct list_head *lh;
+ bool expired = false;
+
+ now = appldata_total_cpu_time_ns();
+ mutex_lock(&appldata_timer_lock);
+ if (appldata_timer_active) {
+ interval = appldata_interval;
+ elapsed = now - appldata_cputime_start;
+ if (elapsed < interval) {
+ appldata_schedule_work(interval - elapsed);
+ } else {
+ appldata_cputime_start = now;
+ appldata_schedule_work(interval);
+ expired = true;
+ }
+ }
+ mutex_unlock(&appldata_timer_lock);
+ if (!expired)
+ return;
mutex_lock(&appldata_ops_mutex);
list_for_each(lh, &appldata_ops_list) {
ops = list_entry(lh, struct appldata_ops, list);
@@ -162,33 +187,52 @@ int appldata_diag(char record_nr, u16 function, unsigned long buffer,
#define APPLDATA_MOD_TIMER 2
/*
- * __appldata_vtimer_setup()
+ * __appldata_timer_setup()
*
- * Add, delete or modify virtual timers on all online cpus.
- * The caller needs to get the appldata_timer_lock spinlock.
+ * Add, delete or modify the appldata delayed work.
*/
-static void __appldata_vtimer_setup(int cmd)
+static void __appldata_timer_setup(int cmd)
{
- u64 timer_interval = (u64) appldata_interval * 1000 * TOD_MICRO;
+ static DEFINE_MUTEX(appldata_cancel_lock);
+ u64 now, elapsed, remaining;
switch (cmd) {
case APPLDATA_ADD_TIMER:
- if (appldata_timer_active)
- break;
- appldata_timer.expires = timer_interval;
- add_virt_timer_periodic(&appldata_timer);
- appldata_timer_active = 1;
+ mutex_lock(&appldata_cancel_lock);
+ mutex_lock(&appldata_timer_lock);
+ if (!appldata_timer_active) {
+ appldata_cputime_start = appldata_total_cpu_time_ns();
+ appldata_schedule_work(appldata_interval);
+ appldata_timer_active = 1;
+ }
+ mutex_unlock(&appldata_timer_lock);
+ mutex_unlock(&appldata_cancel_lock);
break;
case APPLDATA_DEL_TIMER:
- del_virt_timer(&appldata_timer);
- if (!appldata_timer_active)
+ mutex_lock(&appldata_cancel_lock);
+ mutex_lock(&appldata_timer_lock);
+ if (!appldata_timer_active) {
+ mutex_unlock(&appldata_timer_lock);
+ mutex_unlock(&appldata_cancel_lock);
break;
+ }
appldata_timer_active = 0;
+ mutex_unlock(&appldata_timer_lock);
+ cancel_delayed_work_sync(&appldata_work);
+ mutex_unlock(&appldata_cancel_lock);
break;
case APPLDATA_MOD_TIMER:
- if (!appldata_timer_active)
- break;
- mod_virt_timer_periodic(&appldata_timer, timer_interval);
+ mutex_lock(&appldata_timer_lock);
+ if (appldata_timer_active) {
+ now = appldata_total_cpu_time_ns();
+ elapsed = now - appldata_cputime_start;
+ remaining = appldata_interval - elapsed;
+ if (elapsed >= appldata_interval)
+ remaining = 1;
+ appldata_schedule_work(remaining);
+ }
+ mutex_unlock(&appldata_timer_lock);
+ break;
}
}
@@ -215,12 +259,10 @@ appldata_timer_handler(const struct ctl_table *ctl, int write,
if (rc < 0 || !write)
return rc;
- spin_lock(&appldata_timer_lock);
if (timer_active)
- __appldata_vtimer_setup(APPLDATA_ADD_TIMER);
+ __appldata_timer_setup(APPLDATA_ADD_TIMER);
else
- __appldata_vtimer_setup(APPLDATA_DEL_TIMER);
- spin_unlock(&appldata_timer_lock);
+ __appldata_timer_setup(APPLDATA_DEL_TIMER);
return 0;
}
@@ -234,7 +276,7 @@ static int
appldata_interval_handler(const struct ctl_table *ctl, int write,
void *buffer, size_t *lenp, loff_t *ppos)
{
- int interval = appldata_interval;
+ int interval = appldata_interval / NSEC_PER_MSEC;
int rc;
struct ctl_table ctl_entry = {
.procname = ctl->procname,
@@ -247,10 +289,10 @@ appldata_interval_handler(const struct ctl_table *ctl, int write,
if (rc < 0 || !write)
return rc;
- spin_lock(&appldata_timer_lock);
- appldata_interval = interval;
- __appldata_vtimer_setup(APPLDATA_MOD_TIMER);
- spin_unlock(&appldata_timer_lock);
+ mutex_lock(&appldata_timer_lock);
+ appldata_interval = interval * NSEC_PER_MSEC;
+ mutex_unlock(&appldata_timer_lock);
+ __appldata_timer_setup(APPLDATA_MOD_TIMER);
return 0;
}
@@ -392,19 +434,20 @@ void appldata_unregister_ops(struct appldata_ops *ops)
/******************************* init / exit *********************************/
-/*
- * appldata_init()
- *
- * init timer, register /proc entries
- */
+static int appldata_cpu_online(unsigned int cpu)
+{
+ __appldata_timer_setup(APPLDATA_MOD_TIMER);
+ return 0;
+}
+
static int __init appldata_init(void)
{
- init_virt_timer(&appldata_timer);
- appldata_timer.function = appldata_timer_function;
- appldata_timer.data = (unsigned long) &appldata_work;
- appldata_wq = alloc_ordered_workqueue("appldata", 0);
- if (!appldata_wq)
- return -ENOMEM;
+ int rc;
+
+ rc = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "s390/appldata:online",
+ appldata_cpu_online, NULL);
+ if (rc < 0)
+ return rc;
register_sysctl(appldata_proc_name, appldata_table);
return 0;
}

arch/s390/boot/ipl_parm.c

View file
diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c
index c1b43e5..8bbd102 100644
--- a/arch/s390/boot/ipl_parm.c
+++ b/arch/s390/boot/ipl_parm.c
@@ -40,9 +40,9 @@ static inline int __diag308(unsigned long subcode, void *addr)
union register_pair r1 = { .even = (unsigned long)addr, .odd = 0 };
asm_inline volatile(
- " diag %[r1],%[subcode],0x308\n"
- "0:\n"
- EX_TABLE(0b, 0b)
+ "0: diag %[r1],%[subcode],0x308\n"
+ "1:\n"
+ EX_TABLE_INSN(0b, 1b)
: [r1] "+d" (r1.pair)
: [subcode] "d" (subcode)
: "cc", "memory");
@@ -172,12 +172,23 @@ static inline int has_ebcdic_char(const char *str)
return 0;
}
+static inline bool has_nonprintable_ebcdic_char(const char *str)
+{
+ for (; *str; str++)
+ if (!isprint_ebc_asc(*str) && !isspace_ebc_asc(*str))
+ return true;
+ return false;
+}
+
void setup_boot_command_line(void)
{
parmarea.command_line[COMMAND_LINE_SIZE - 1] = 0;
/* convert arch command line to ascii if necessary */
- if (has_ebcdic_char(parmarea.command_line))
+ if (has_ebcdic_char(parmarea.command_line)) {
+ if (has_nonprintable_ebcdic_char(parmarea.command_line))
+ boot_warn("Kernel command line was treated as EBCDIC, but contains non-printable characters\n");
EBCASC(parmarea.command_line, COMMAND_LINE_SIZE);
+ }
/* copy arch command line */
strscpy(early_command_line, strim(parmarea.command_line));

arch/s390/boot/pgm_check.c

View file
diff --git a/arch/s390/boot/pgm_check.c b/arch/s390/boot/pgm_check.c
index fa621fa..e5a454b 100644
--- a/arch/s390/boot/pgm_check.c
+++ b/arch/s390/boot/pgm_check.c
@@ -3,9 +3,11 @@
#include <linux/stdarg.h>
#include <linux/string.h>
#include <linux/ctype.h>
+#include <asm/pgmcheck-defs.h>
#include <asm/stacktrace.h>
#include <asm/boot_data.h>
#include <asm/lowcore.h>
+#include <asm/processor.h>
#include <asm/setup.h>
#include <asm/sclp.h>
#include <asm/uv.h>
@@ -40,12 +42,22 @@ static inline unsigned long extable_insn(const struct exception_table_entry *x)
return (unsigned long)&x->insn + x->insn;
}
+static unsigned long boot_get_trap_ip(struct pt_regs *regs)
+{
+ static const unsigned long nullified[2] = { PGM_CHECKS_NULLIFIED };
+
+ if (test_bit(regs->int_code & PGM_INT_CODE_MASK, nullified))
+ return regs->psw.addr;
+ return __rewind_psw(regs->psw, regs->int_code >> 16);
+}
+
static bool ex_handler(struct pt_regs *regs)
{
const struct exception_table_entry *ex;
+ unsigned long ip = boot_get_trap_ip(regs);
for (ex = __start___ex_table; ex < __stop___ex_table; ex++) {
- if (extable_insn(ex) != regs->psw.addr)
+ if (extable_insn(ex) != ip)
continue;
if (ex->type != EX_TYPE_FIXUP)
return false;

arch/s390/boot/physmem_info.c

View file
diff --git a/arch/s390/boot/physmem_info.c b/arch/s390/boot/physmem_info.c
index 0ebb217..e5248b6 100644
--- a/arch/s390/boot/physmem_info.c
+++ b/arch/s390/boot/physmem_info.c
@@ -68,11 +68,11 @@ static int __diag260(unsigned long rx1, unsigned long rx2)
ry = 0x10; /* storage configuration */
exception = 1;
asm_inline volatile(
- " diag %[rx],%[ry],0x260\n"
- "0: lhi %[exc],0\n"
+ "0: diag %[rx],%[ry],0x260\n"
+ " lhi %[exc],0\n"
"1:\n"
CC_IPM(cc)
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: CC_OUT(cc, cc), [exc] "+d" (exception), [ry] "+d" (ry)
: [rx] "d" (rx.pair)
: CC_CLOBBER_LIST("memory"));
@@ -108,9 +108,9 @@ static int diag500_storage_limit(unsigned long *max_physmem_end)
asm_inline volatile(
" lghi %%r1,%[subcode]\n"
" lghi %%r2,0\n"
- " diag %%r2,%%r4,0x500\n"
- "0: lgr %[slimit],%%r2\n"
- EX_TABLE(0b, 0b)
+ "0: diag %%r2,%%r4,0x500\n"
+ "1: lgr %[slimit],%%r2\n"
+ EX_TABLE_INSN(0b, 1b)
: [slimit] "=d" (storage_limit)
: [subcode] "i" (DIAG500_SC_STOR_LIMIT)
: "memory", "1", "2");
@@ -127,11 +127,11 @@ static int tprot(unsigned long addr)
exception = 1;
asm_inline volatile(
- " tprot 0(%[addr]),0\n"
- "0: lhi %[exc],0\n"
+ "0: tprot 0(%[addr]),0\n"
+ " lhi %[exc],0\n"
"1:\n"
CC_IPM(cc)
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: CC_OUT(cc, cc), [exc] "+d" (exception)
: [addr] "a" (addr)
: CC_CLOBBER_LIST("memory"));

arch/s390/boot/startup.c

View file
diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index c1dcf8b..5eb7a3e 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -89,10 +89,10 @@ static void detect_diag9c(void)
cpu = stap();
asm_inline volatile(
- " diag %[cpu],%%r0,0x9c\n"
- "0: lhi %[rc],0\n"
+ "0: diag %[cpu],%%r0,0x9c\n"
+ " lhi %[rc],0\n"
"1:\n"
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: [rc] "+d" (rc)
: [cpu] "d" (cpu)
: "cc", "memory");
@@ -150,10 +150,10 @@ static int cmma_test_essa(void)
/* Test ESSA_GET_STATE */
asm_inline volatile(
- " .insn rrf,0xb9ab0000,%[tmp],%[tmp],%[cmd],0\n"
- "0: lhi %[rc],0\n"
+ "0: .insn rrf,0xb9ab0000,%[tmp],%[tmp],%[cmd],0\n"
+ " lhi %[rc],0\n"
"1:\n"
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: [rc] "+d" (rc), [tmp] "+d" (tmp)
: [cmd] "i" (ESSA_GET_STATE)
: "cc", "memory");

arch/s390/configs/debug_defconfig

View file
diff --git a/arch/s390/configs/debug_defconfig b/arch/s390/configs/debug_defconfig
index 3dae714..3892d9d 100644
--- a/arch/s390/configs/debug_defconfig
+++ b/arch/s390/configs/debug_defconfig
@@ -451,6 +451,20 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
CONFIG_VIRTIO_BLK=y
CONFIG_BLK_DEV_RBD=m
CONFIG_BLK_DEV_NVME=m
+CONFIG_NVME_MULTIPATH=y
+CONFIG_NVME_VERBOSE_ERRORS=y
+CONFIG_NVME_RDMA=m
+CONFIG_NVME_TCP=m
+CONFIG_NVME_TCP_TLS=y
+CONFIG_NVME_HOST_AUTH=y
+CONFIG_NVME_TARGET=m
+CONFIG_NVME_TARGET_DEBUGFS=y
+CONFIG_NVME_TARGET_PASSTHRU=y
+CONFIG_NVME_TARGET_LOOP=m
+CONFIG_NVME_TARGET_RDMA=m
+CONFIG_NVME_TARGET_TCP=m
+CONFIG_NVME_TARGET_TCP_TLS=y
+CONFIG_NVME_TARGET_AUTH=y
CONFIG_BLK_DEV_NULL_BLK=m
CONFIG_ENCLOSURE_SERVICES=m
CONFIG_GENWQE=m

arch/s390/configs/defconfig

View file
diff --git a/arch/s390/configs/defconfig b/arch/s390/configs/defconfig
index 6f57226..95720e8 100644
--- a/arch/s390/configs/defconfig
+++ b/arch/s390/configs/defconfig
@@ -441,6 +441,20 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
CONFIG_VIRTIO_BLK=y
CONFIG_BLK_DEV_RBD=m
CONFIG_BLK_DEV_NVME=m
+CONFIG_NVME_MULTIPATH=y
+CONFIG_NVME_VERBOSE_ERRORS=y
+CONFIG_NVME_RDMA=m
+CONFIG_NVME_TCP=m
+CONFIG_NVME_TCP_TLS=y
+CONFIG_NVME_HOST_AUTH=y
+CONFIG_NVME_TARGET=m
+CONFIG_NVME_TARGET_DEBUGFS=y
+CONFIG_NVME_TARGET_PASSTHRU=y
+CONFIG_NVME_TARGET_LOOP=m
+CONFIG_NVME_TARGET_RDMA=m
+CONFIG_NVME_TARGET_TCP=m
+CONFIG_NVME_TARGET_TCP_TLS=y
+CONFIG_NVME_TARGET_AUTH=y
CONFIG_BLK_DEV_NULL_BLK=m
CONFIG_ENCLOSURE_SERVICES=m
CONFIG_GENWQE=m

arch/s390/hypfs/hypfs_vm.c

View file
diff --git a/arch/s390/hypfs/hypfs_vm.c b/arch/s390/hypfs/hypfs_vm.c
index 4db2895..bd47fce 100644
--- a/arch/s390/hypfs/hypfs_vm.c
+++ b/arch/s390/hypfs/hypfs_vm.c
@@ -42,9 +42,9 @@ static int diag2fc(int size, char* query, void *addr)
diag_stat_inc(DIAG_STAT_X2FC);
asm volatile(
- " diag %0,%1,0x2fc\n"
- "0: nopr %%r7\n"
- EX_TABLE(0b,0b)
+ "0: diag %0,%1,0x2fc\n"
+ "1:\n"
+ EX_TABLE_INSN(0b, 1b)
: "=d" (residual_cnt), "+d" (rc) : "0" (&parm_list) : "memory");
if ((rc != 0 ) && (rc != -2))

arch/s390/include/asm/Kbuild

View file
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index 0c1fc47..d13dd7e 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
generated-y += dis-defs.h
generated-y += facility-defs.h
+generated-y += pgmcheck-defs.h
generated-y += syscall_table.h
generated-y += unistd_nr.h

arch/s390/include/asm/ap.h

View file
diff --git a/arch/s390/include/asm/ap.h b/arch/s390/include/asm/ap.h
index c91b6ac..b0f8e39 100644
--- a/arch/s390/include/asm/ap.h
+++ b/arch/s390/include/asm/ap.h
@@ -91,10 +91,10 @@ static inline bool ap_instructions_available(void)
" lgr 0,%[reg0]\n" /* qid into gr0 */
" lghi 1,0\n" /* 0 into gr1 */
" lghi 2,0\n" /* 0 into gr2 */
- " .insn rre,0xb2af0000,0,0\n" /* PQAP(TAPQ) */
- "0: la %[reg1],1\n" /* 1 into reg1 */
+ "0: .insn rre,0xb2af0000,0,0\n" /* PQAP(TAPQ) */
+ " la %[reg1],1\n" /* 1 into reg1 */
"1:\n"
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: [reg1] "+&d" (reg1)
: [reg0] "d" (reg0)
: "cc", "0", "1", "2");
@@ -272,10 +272,10 @@ static inline int ap_qci(struct ap_config_info *config)
asm volatile(
" lgr 0,%[reg0]\n" /* QCI fc into gr0 */
" lgr 2,%[reg2]\n" /* ptr to config into gr2 */
- " .insn rre,0xb2af0000,0,0\n" /* PQAP(QCI) */
- "0: la %[reg1],0\n" /* good case, QCI fc available */
+ "0: .insn rre,0xb2af0000,0,0\n" /* PQAP(QCI) */
+ " la %[reg1],0\n" /* good case, QCI fc available */
"1:\n"
- EX_TABLE(0b, 1b)
+ EX_TABLE_INSN(0b, 1b)
: [reg1] "+&d" (reg1)
: [reg0] "d" (reg0), [reg2] "d" (reg2)
: "cc", "memory", "0", "2");

arch/s390/include/asm/asm-extable.h

View file
diff --git a/arch/s390/include/asm/asm-extable.h b/arch/s390/include/asm/asm-extable.h
index d23ea0c..fd43ecd 100644
--- a/arch/s390/include/asm/asm-extable.h
+++ b/arch/s390/include/asm/asm-extable.h
@@ -65,31 +65,41 @@
stringify_in_c(.purgem extable_reg;) \
stringify_in_c(.previous)
-#define EX_TABLE(_fault, _target) \
+/*
+ * EX_TABLE_INSN usage rules:
+ *
+ * _fault must point to the faulting instruction, never behind it.
+ *
+ * This differs from the former EX_TABLE convention, where usually two entries
+ * were needed. One that pointed to the faulting instruction (for nullifying
+ * exceptions), and a second one that pointed behind the instruction (for
+ * suppressing, completing, and terminating exceptions).
+ */
+#define EX_TABLE_INSN(_fault, _target) \
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_FIXUP, __stringify(%%r0), __stringify(%%r0), 0)
-#define EX_TABLE_AMODE31(_fault, _target) \
+#define EX_TABLE_INSN_AMODE31(_fault, _target) \
__EX_TABLE(.amode31.ex_table, _fault, _target, EX_TYPE_FIXUP, __stringify(%%r0), __stringify(%%r0), 0)
-#define EX_TABLE_UA_FAULT(_fault, _target, _regerr) \
+#define EX_TABLE_INSN_UA_FAULT(_fault, _target, _regerr) \
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_FAULT, _regerr, _regerr, 0)
-#define EX_TABLE_UA_LOAD_REG(_fault, _target, _regerr, _regzero) \
+#define EX_TABLE_INSN_UA_LOAD_REG(_fault, _target, _regerr, _regzero) \
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_REG, _regerr, _regzero, 0)
-#define EX_TABLE_UA_LOAD_REGPAIR(_fault, _target, _regerr, _regzero) \
+#define EX_TABLE_INSN_UA_LOAD_REGPAIR(_fault, _target, _regerr, _regzero) \
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_LOAD_REGPAIR, _regerr, _regzero, 0)
-#define EX_TABLE_ZEROPAD(_fault, _target, _regdata, _regaddr) \
+#define EX_TABLE_INSN_ZEROPAD(_fault, _target, _regdata, _regaddr) \
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_ZEROPAD, _regdata, _regaddr, 0)
-#define EX_TABLE_FPC(_fault, _target) \
+#define EX_TABLE_INSN_FPC(_fault, _target) \
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_FPC, __stringify(%%r0), __stringify(%%r0), 0)
-#define EX_TABLE_UA_MVCOS_TO(_fault, _target) \
+#define EX_TABLE_INSN_UA_MVCOS_TO(_fault, _target) \
__EX_TABLE(__ex_table, _fault, _target, EX_TYPE_UA_MVCOS_TO, __stringify(%%r0), __stringify(%%r0), 0)

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/cpu_mf.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/diag.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/diag288.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/ebcdic.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/entry-percpu.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/extable.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/fpu-insn.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/futex.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/idals.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/lowcore.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/pci_insn.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/percpu.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/ptrace.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/uaccess.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/vtime.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/vtimer.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/s390/include/asm/word-at-a-time.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/cert_store.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/diag/diag.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/dis.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/dumpstack.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/early.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/ebcdic.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/entry.S

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/entry.h

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/hiperdispatch.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/ipl.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/irq.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/kprobes.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/nmi.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/perf_cpum_cf.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/process.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/ptrace.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/signal.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/text_amode31.S

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/time.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/traps.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/uprobes.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kernel/vtime.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/kvm/s390/gaccess.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/lib/probes.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/lib/spinlock.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/lib/uaccess.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/mm/extable.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/mm/pfault.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/mm/pgtable.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/net/bpf_jit_comp.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/pci/pci_clp.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/pci/pci_insn.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/pci/pci_irq.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/pci/pci_mmio.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/tools/.gitignore

View file

This diff is incomplete. Download the complete patch.

arch/s390/tools/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/s390/tools/gen_bitmaps.c

View file

This diff is incomplete. Download the complete patch.

arch/s390/tools/gen_opcode_table.c

View file

This diff is incomplete. Download the complete patch.

drivers/iommu/s390-iommu.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/block/dasd_diag.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/diag_ftp.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/fs3270.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/keyboard.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/sclp.h

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/sclp_early.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/sclp_vt220.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/char/vmcp.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/chsc.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/chsc_sch.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/cmf.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/ioasm.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/qdio.h

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/qdio_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/qdio_setup.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/qdio_thinint.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/scm.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/crypto/zcrypt_api.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/crypto/zcrypt_ccamisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/crypto/zcrypt_msgtype50.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/crypto/zcrypt_msgtype6.c

View file

This diff is incomplete. Download the complete patch.