Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 's390-5.9-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik:

- Fix order in trace_hardirqs_off_caller() to make locking state
consistent even if the IRQ tracer calls into lockdep again. Touches
common code. Acked-by Peter Zijlstra.

- Correctly handle secure storage violation exception to avoid kernel
panic triggered by user space misbehaviour.

- Switch the idle->seqcount over to using raw_write_*() to avoid
"suspicious RCU usage".

- Fix memory leaks on hard unplug in pci code.

- Use kvmalloc instead of kmalloc for larger allocations in zcrypt.

- Add few missing __init annotations to static functions to avoid
section mismatch complains when functions are not inlined.

* tag 's390-5.9-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390: add 3f program exception handler
lockdep: fix order in trace_hardirqs_off_caller()
s390/pci: fix leak of DMA tables on hard unplug
s390/init: add missing __init annotations
s390/zcrypt: fix kmalloc 256k failure
s390/idle: fix suspicious RCU usage

+39 -13
+1
arch/s390/kernel/entry.h
··· 26 26 void do_dat_exception(struct pt_regs *regs); 27 27 void do_secure_storage_access(struct pt_regs *regs); 28 28 void do_non_secure_storage_access(struct pt_regs *regs); 29 + void do_secure_storage_violation(struct pt_regs *regs); 29 30 30 31 void addressing_exception(struct pt_regs *regs); 31 32 void data_exception(struct pt_regs *regs);
+2 -3
arch/s390/kernel/idle.c
··· 39 39 local_irq_restore(flags); 40 40 41 41 /* Account time spent with enabled wait psw loaded as idle time. */ 42 - /* XXX seqcount has tracepoints that require RCU */ 43 - write_seqcount_begin(&idle->seqcount); 42 + raw_write_seqcount_begin(&idle->seqcount); 44 43 idle_time = idle->clock_idle_exit - idle->clock_idle_enter; 45 44 idle->clock_idle_enter = idle->clock_idle_exit = 0ULL; 46 45 idle->idle_time += idle_time; 47 46 idle->idle_count++; 48 47 account_idle_time(cputime_to_nsecs(idle_time)); 49 - write_seqcount_end(&idle->seqcount); 48 + raw_write_seqcount_end(&idle->seqcount); 50 49 } 51 50 NOKPROBE_SYMBOL(enabled_wait); 52 51
+1 -1
arch/s390/kernel/pgm_check.S
··· 80 80 PGM_CHECK_DEFAULT /* 3c */ 81 81 PGM_CHECK(do_secure_storage_access) /* 3d */ 82 82 PGM_CHECK(do_non_secure_storage_access) /* 3e */ 83 - PGM_CHECK_DEFAULT /* 3f */ 83 + PGM_CHECK(do_secure_storage_violation) /* 3f */ 84 84 PGM_CHECK(monitor_event_exception) /* 40 */ 85 85 PGM_CHECK_DEFAULT /* 41 */ 86 86 PGM_CHECK_DEFAULT /* 42 */
+3 -3
arch/s390/kernel/setup.c
··· 619 619 /* 620 620 * Make sure that the area behind memory_end is protected 621 621 */ 622 - static void reserve_memory_end(void) 622 + static void __init reserve_memory_end(void) 623 623 { 624 624 if (memory_end_set) 625 625 memblock_reserve(memory_end, ULONG_MAX); ··· 628 628 /* 629 629 * Make sure that oldmem, where the dump is stored, is protected 630 630 */ 631 - static void reserve_oldmem(void) 631 + static void __init reserve_oldmem(void) 632 632 { 633 633 #ifdef CONFIG_CRASH_DUMP 634 634 if (OLDMEM_BASE) ··· 640 640 /* 641 641 * Make sure that oldmem, where the dump is stored, is protected 642 642 */ 643 - static void remove_oldmem(void) 643 + static void __init remove_oldmem(void) 644 644 { 645 645 #ifdef CONFIG_CRASH_DUMP 646 646 if (OLDMEM_BASE)
+20
arch/s390/mm/fault.c
··· 859 859 } 860 860 NOKPROBE_SYMBOL(do_non_secure_storage_access); 861 861 862 + void do_secure_storage_violation(struct pt_regs *regs) 863 + { 864 + /* 865 + * Either KVM messed up the secure guest mapping or the same 866 + * page is mapped into multiple secure guests. 867 + * 868 + * This exception is only triggered when a guest 2 is running 869 + * and can therefore never occur in kernel context. 870 + */ 871 + printk_ratelimited(KERN_WARNING 872 + "Secure storage violation in task: %s, pid %d\n", 873 + current->comm, current->pid); 874 + send_sig(SIGSEGV, current, 0); 875 + } 876 + 862 877 #else 863 878 void do_secure_storage_access(struct pt_regs *regs) 864 879 { ··· 881 866 } 882 867 883 868 void do_non_secure_storage_access(struct pt_regs *regs) 869 + { 870 + default_trap_handler(regs); 871 + } 872 + 873 + void do_secure_storage_violation(struct pt_regs *regs) 884 874 { 885 875 default_trap_handler(regs); 886 876 }
+4
arch/s390/pci/pci.c
··· 668 668 int zpci_disable_device(struct zpci_dev *zdev) 669 669 { 670 670 zpci_dma_exit_device(zdev); 671 + /* 672 + * The zPCI function may already be disabled by the platform, this is 673 + * detected in clp_disable_fh() which becomes a no-op. 674 + */ 671 675 return clp_disable_fh(zdev); 672 676 } 673 677 EXPORT_SYMBOL_GPL(zpci_disable_device);
+2
arch/s390/pci/pci_event.c
··· 143 143 zpci_remove_device(zdev); 144 144 } 145 145 146 + zdev->fh = ccdf->fh; 147 + zpci_disable_device(zdev); 146 148 zdev->state = ZPCI_FN_STATE_STANDBY; 147 149 if (!clp_get_state(ccdf->fid, &state) && 148 150 state == ZPCI_FN_STATE_RESERVED) {
+4 -4
drivers/s390/crypto/zcrypt_ccamisc.c
··· 1692 1692 *nr_apqns = 0; 1693 1693 1694 1694 /* fetch status of all crypto cards */ 1695 - device_status = kmalloc_array(MAX_ZDEV_ENTRIES_EXT, 1696 - sizeof(struct zcrypt_device_status_ext), 1697 - GFP_KERNEL); 1695 + device_status = kvmalloc_array(MAX_ZDEV_ENTRIES_EXT, 1696 + sizeof(struct zcrypt_device_status_ext), 1697 + GFP_KERNEL); 1698 1698 if (!device_status) 1699 1699 return -ENOMEM; 1700 1700 zcrypt_device_status_mask_ext(device_status); ··· 1762 1762 verify = 0; 1763 1763 } 1764 1764 1765 - kfree(device_status); 1765 + kvfree(device_status); 1766 1766 return rc; 1767 1767 } 1768 1768 EXPORT_SYMBOL(cca_findcard2);
+2 -2
kernel/trace/trace_preemptirq.c
··· 102 102 103 103 __visible void trace_hardirqs_off_caller(unsigned long caller_addr) 104 104 { 105 + lockdep_hardirqs_off(CALLER_ADDR0); 106 + 105 107 if (!this_cpu_read(tracing_irq_cpu)) { 106 108 this_cpu_write(tracing_irq_cpu, 1); 107 109 tracer_hardirqs_off(CALLER_ADDR0, caller_addr); 108 110 if (!in_nmi()) 109 111 trace_irq_disable_rcuidle(CALLER_ADDR0, caller_addr); 110 112 } 111 - 112 - lockdep_hardirqs_off(CALLER_ADDR0); 113 113 } 114 114 EXPORT_SYMBOL(trace_hardirqs_off_caller); 115 115 NOKPROBE_SYMBOL(trace_hardirqs_off_caller);