linux/arch/s390/include/asm
Josh Poimboeuf 325cdacd03 debug: Fix WARN_ON_ONCE() for modules
Mike Galbraith reported a situation where a WARN_ON_ONCE() call in DRM
code turned into an oops.  As it turns out, WARN_ON_ONCE() seems to be
completely broken when called from a module.

The bug was introduced with the following commit:

  19d436268d ("debug: Add _ONCE() logic to report_bug()")

That commit changed WARN_ON_ONCE() to move its 'once' logic into the bug
trap handler.  It requires a writable bug table so that the BUGFLAG_DONE
bit can be written to the flags to indicate the first warning has
occurred.

The bug table was made writable for vmlinux, which relies on
vmlinux.lds.S and vmlinux.lds.h for laying out the sections.  However,
it wasn't made writable for modules, which rely on the ELF section
header flags.

Reported-by: Mike Galbraith <efault@gmx.de>
Tested-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 19d436268d ("debug: Add _ONCE() logic to report_bug()")
Link: http://lkml.kernel.org/r/a53b04235a65478dd9afc51f5b329fdc65c84364.1500095401.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-07-20 12:31:04 +02:00
..
fpu s390/fpu: improve kernel_fpu_[begin|end] 2016-08-29 11:05:01 +02:00
trace s390/zcrypt: tracepoint definitions for zcrypt device driver. 2016-12-14 16:33:40 +01:00
airq.h
appldata.h
archrandom.h s390/crypto: Provide s390 specific arch random functionality. 2017-04-26 13:41:35 +02:00
asm-prototypes.h s390/kbuild: enable modversions for symbols exported from asm 2016-12-20 15:22:56 +01:00
atomic_ops.h s390/spinlock: use atomic primitives for spinlocks 2017-04-12 08:43:33 +02:00
atomic.h s390/atomic: refactor atomic primitives 2016-11-11 16:37:33 +01:00
barrier.h
bitops.h s390/bitops: remove outdated comment 2017-03-22 08:29:05 +01:00
bug.h debug: Fix WARN_ON_ONCE() for modules 2017-07-20 12:31:04 +02:00
bugs.h
cache.h
ccwdev.h
ccwgroup.h
checksum.h Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
chpid.h
cio.h vfio: ccw: introduce support for ccw0 2017-03-31 12:55:12 +02:00
clp.h
cmb.h
cmpxchg.h
compat.h sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
cpacf.h Merge branch 's390forkvm' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into features 2017-04-27 07:34:07 +02:00
cpcmd.h
cpu_mf.h s390/cpu_mf: remove register variable in __ecctr() 2017-03-31 07:53:34 +02:00
cpu.h
cpufeature.h
cputime.h s390/cputime: provide archicture specific cputime_to_nsecs 2017-03-01 09:59:27 +01:00
crw.h
css_chars.h
ctl_reg.h s390: add missing "do {} while (0)" loop constructs to multiline macros 2017-02-17 07:41:11 +01:00
current.h
debug.h s390: convert debug_info.ref_count from atomic_t to refcount_t 2017-05-11 16:35:32 +02:00
delay.h
diag.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
dis.h s390/uprobes: fix compile for !KPROBES 2017-05-03 09:08:57 +02:00
dma-mapping.h treewide: Consolidate get_dma_ops() implementations 2017-01-24 12:23:35 -05:00
dma.h
eadm.h block: introduce new block status code type 2017-06-09 09:27:32 -06:00
ebcdic.h
elf.h s390/kvm: avoid global config of vm.alloc_pgste=1 2017-06-13 13:03:41 +02:00
exec.h
extable.h s390: switch to extable.h 2017-03-28 18:23:55 -04:00
extmem.h
facility.h s390/facilities: get rid of __ASSEMBLY__ in facility header file 2017-03-22 08:29:18 +01:00
fcx.h
ftrace.h s390/dumpstack: get rid of return_address again 2016-10-17 14:44:33 +02:00
futex.h
gmap.h KVM: s390: backup the currently enabled gmap when scheduled out 2016-06-20 09:55:24 +02:00
hardirq.h
hugetlb.h s390: get rid of MACHINE_HAS_PFMF and MACHINE_HAS_HPAGE 2017-02-17 07:41:01 +01:00
hw_irq.h
idals.h Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
idle.h
io.h s390: provide default ioremap and iounmap declaration 2017-06-12 16:26:00 +02:00
ipl.h s390: fix initrd corruptions with gcov/kcov instrumented kernels 2016-12-12 12:11:20 +01:00
irq.h
irqflags.h
isc.h vfio: ccw: basic implementation for vfio_ccw driver 2017-03-31 12:55:04 +02:00
itcw.h
jump_label.h
Kbuild s390: use two more generic header files 2017-06-12 16:25:57 +02:00
kdebug.h
kexec.h
kprobes.h s390/uprobes: fix compile for !KPROBES 2017-05-03 09:08:57 +02:00
kvm_host.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-07-03 15:39:36 -07:00
kvm_para.h
linkage.h
livepatch.h s390: Audit and remove any remaining unnecessary uses of module.h 2017-02-17 07:40:41 +01:00
lowcore.h s390: add a system call for guarded storage 2017-03-22 08:14:25 +01:00
mman.h s390/mm: make TASK_SIZE independent from the number of page table levels 2017-04-25 07:47:32 +02:00
mmu_context.h s390/kvm: avoid global config of vm.alloc_pgste=1 2017-06-13 13:03:41 +02:00
mmu.h s390/kvm: Add use_cmma field to mm_context_t 2017-04-20 13:33:09 +02:00
mmzone.h
module.h
nmi.h s390/nmi: s390: New low level handling for machine check happening in guest 2017-06-27 16:05:27 +02:00
numa.h
os_info.h
page-states.h s390/kvm: Add PGSTE manipulation functions 2017-04-20 13:33:08 +02:00
page.h s390/mm: implement 5 level pages tables 2017-06-12 16:25:54 +02:00
pci_clp.h s390/pci: use proper endianness annotations 2017-01-16 07:27:53 +01:00
pci_debug.h
pci_dma.h
pci_insn.h s390/pci: improve error handling during interrupt deregistration 2017-06-28 07:32:08 +02:00
pci_io.h
pci.h s390/pci: fix handling of PEC 306 2017-06-28 07:32:13 +02:00
percpu.h
perf_event.h s390/cpum_cf: update counter numbers to ecctr limits 2017-03-31 07:53:26 +02:00
pgalloc.h s390/mm: implement 5 level pages tables 2017-06-12 16:25:54 +02:00
pgtable.h s390/mm: add p?d_folded() helper functions 2017-06-12 16:26:00 +02:00
pkey.h s390/pkey: Introduce new API for secure key verification 2017-03-22 08:29:13 +01:00
preempt.h s390/preempt: move preempt_count to the lowcore 2016-11-11 16:37:40 +01:00
processor.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-07-03 15:39:36 -07:00
ptrace.h s390/kvm: avoid global config of vm.alloc_pgste=1 2017-06-13 13:03:41 +02:00
qdio.h
reset.h
runtime_instr.h
rwsem.h
schid.h
sclp.h s390/sclp: Detect KSS facility 2017-04-21 11:08:04 +02:00
scsw.h s390/dasd: channel path aware error recovery 2016-12-12 12:05:03 +01:00
seccomp.h
sections.h mm: fix section name for .data..ro_after_init 2017-03-31 17:13:30 -07:00
segment.h
serial.h
set_memory.h treewide: move set_memory_* functions away from cacheflush.h 2017-05-08 17:15:13 -07:00
setup.h s390/spinlock: remove compare and delay instruction 2017-04-12 08:43:33 +02:00
shmparam.h
signal.h
sigp.h s390/smp: use sigp condition code define 2017-06-12 16:25:58 +02:00
smp.h s390/smp: initialize cpu_present_mask in setup_arch 2016-12-07 07:23:07 +01:00
sparsemem.h s390: make MAX_PHYSMEM_BITS configurable 2017-03-28 16:55:10 +02:00
spinlock_types.h s390/spinlock: use atomic primitives for spinlocks 2017-04-12 08:43:33 +02:00
spinlock.h s390/spinlock: use atomic primitives for spinlocks 2017-04-12 08:43:33 +02:00
stp.h
string.h s390/lib: add missing memory barriers to string inline assemblies 2016-12-14 16:33:41 +01:00
switch_to.h s390: add a system call for guarded storage 2017-03-22 08:14:25 +01:00
syscall.h
sysinfo.h S390/sysinfo: use uuid_is_null instead of opencoding it 2017-06-05 16:59:06 +02:00
termios.h
thread_info.h s390/kvm: avoid global config of vm.alloc_pgste=1 2017-06-13 13:03:41 +02:00
timex.h s390/timex: micro optimization for tod_to_ns 2017-03-01 09:59:28 +01:00
tlb.h s390/mm: implement 5 level pages tables 2017-06-12 16:25:54 +02:00
tlbflush.h s390/mm,kvm: flush gmap address space with IDTE 2016-08-24 09:23:55 +02:00
topology.h s390/numa: establish cpu to node mapping early 2016-12-07 07:23:25 +01:00
types.h
uaccess.h Merge branch 'work.uaccess' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-05-01 14:41:04 -07:00
unaligned.h
unistd.h s390: ignore pkey system calls 2016-10-17 11:25:25 +02:00
uprobes.h uprobes: remove function declarations from arch/{mips,s390} 2016-10-07 18:46:30 -07:00
user.h
vdso.h s390/time: steer clocksource on STP sync events 2016-10-28 10:09:02 +02:00
vga.h
vtime.h
vtimer.h
vx-insn.h RAID/s390: add SIMD implementation for raid6 gen/xor 2016-08-29 11:05:04 +02:00
xor.h