kernel-ark/arch/s390/mm
Ard Biesheuvel bcb7825a77 s390: fix normalization bug in exception table sorting
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-01-11 13:02:28 +01:00
..
cmm.c s390: convert use of typedef ctl_table to struct ctl_table 2013-10-28 08:36:25 +01:00
dump_pagetables.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
extable.c s390: fix normalization bug in exception table sorting 2016-01-11 13:02:28 +01:00
extmem.c s390/extmem: remove unused variable 2015-12-18 14:59:29 +01:00
fault.c s390/fault: remove unused variable 2015-12-18 14:59:28 +01:00
gup.c s390: get_user_pages_fast() might sleep 2015-11-27 09:24:15 +01:00
hugetlbpage.c s390/mm: implement soft-dirty bits for user memory change tracking 2015-10-14 14:32:05 +02:00
init.c s390: avoid cache aliasing under z/VM and KVM 2015-11-16 12:04:18 +01:00
maccess.c s390: rename struct _lowcore to struct lowcore 2016-01-11 12:27:15 +01:00
Makefile s390/mem_detect: move memory detection code to mm folder 2013-05-02 15:50:22 +02:00
mem_detect.c s390/mem_detect: use unsigned longs 2016-01-11 12:27:11 +01:00
mmap.c s390: avoid cache aliasing under z/VM and KVM 2015-11-16 12:04:18 +01:00
page-states.c s390/cmma: remove "cmma disable" code in case of dump again 2014-05-20 08:58:42 +02:00
pageattr.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
pgtable.c s390/mm: simplify page table alloc/free code 2015-08-19 10:41:19 +02:00
vmem.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00