android_kernel_samsung_msm8976/arch/s390
Ard Biesheuvel 396a61bef1 s390: fix normalization bug in exception table sorting
commit bcb7825a77f41c7dd91da6f7ac10b928156a322e upstream.

The normalization pass in the sorting routine of the relative exception
table serves two purposes:
- it ensures that the address fields of the exception table entries are
  fully ordered, so that no ambiguities arise between entries with
  identical instruction offsets (i.e., when two instructions that are
  exactly 8 bytes apart each have an exception table entry associated with
  them)
- it ensures that the offsets of both the instruction and the fixup fields
  of each entry are relative to their final location after sorting.

Commit eb608fb366 ("s390/exceptions: switch to relative exception table
entries") ported the relative exception table format from x86, but modified
the sorting routine to only normalize the instruction offset field and not
the fixup offset field. The result is that the fixup offset of each entry
will be relative to the original location of the entry before sorting,
likely leading to crashes when those entries are dereferenced.

Fixes: eb608fb366 ("s390/exceptions: switch to relative exception table entries")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-03 15:06:22 -08:00
..
appldata arch: s390: appldata: using strncpy() and strnlen() instead of sprintf() 2013-05-28 10:35:28 +02:00
boot
crypto crypto: s390/ghash - Fix incorrect ghash icv buffer handling. 2015-06-05 23:19:58 -07:00
hypfs aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -07:00
include s390/lowcore: reserve 96 bytes for IRB in lowcore 2014-06-30 20:09:42 -07:00
kernel s390/sclp: clear upper register halves in _sclp_print_early 2015-08-10 12:20:29 -07:00
kvm KVM: s390: Zero out current VMDB of STSI before including level3 data. 2015-05-06 21:56:21 +02:00
lib s390/uaccess: add missing page table walk range check 2013-12-04 10:57:16 -08:00
math-emu
mm s390: fix normalization bug in exception table sorting 2016-03-03 15:06:22 -08:00
net s390/bpf,jit: initialize A register if 1st insn is BPF_S_LDX_B_MSH 2014-05-13 13:59:42 +02:00
oprofile s390: add support for IBM zBC12 machine 2013-08-11 18:35:25 -07:00
pci s390/pci: Implement IRQ functions if !PCI 2013-06-10 16:06:04 +02:00
Kbuild
Kconfig futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test 2014-04-14 06:42:19 -07:00
Kconfig.debug Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS 2013-04-30 17:04:09 -07:00
Makefile s390: remove small stack config option 2013-04-26 09:07:08 +02:00
defconfig