original_kernel/arch/s390/kernel
Michael Holzheu 37e37c20ab [S390] Fix stfle() lowcore protection problem
The stfle() function writes into lowcore memory when stfl_fac_list
is initialized with "S390_lowcore.stfl_fac_list = 0". For older
compilers this triggers a lowcore exception. With newer compilers
and "-OXX" compile option the bug does not show up because
the "S390_lowcore.stfl_fac_list" initialization is removed by the
compiler. The reason for thatis the incorrect "=m"
(S390_lowcore.stfl_fac_list) constraint in the stfl inline assembly.

The following shows the disassembly of the stfle() optimized code
that is inlined in the lgr_info_get() function:

000000000011325c <lgr_info_get>:
  11325c:       eb 9f f0 60 00 24       stmg    %r9,%r15,96(%r15)
  113262:       c0 d0 00 29 0e 47       larl    %r13,634ef0 <servi..>
  113268:       a7 f1 3f c0             tml     %r15,16320
  11326c:       b9 04 00 ef             lgr     %r14,%r15
  113270:       a7 84 00 01             je      113272 <lgr_info_g..>
  113274:       a7 fb ff c0             aghi    %r15,-64
  113278:       b9 04 00 c2             lgr     %r12,%r2
  11327c:       a7 29 00 01             lghi    %r2,1
  113280:       e3 e0 f0 98 00 24       stg     %r14,152(%r15)
  113286:       d7 97 c0 00 c0 00       xc      0(152,%r12),0(%r12)
  11328c:       c0 e5 00 28 db 4c       brasl   %r14,62e924 <add_e..>
  113292:       b2 b1 00 00             stfl    0

To fix the problem we now clear the S390_lowcore.stfl_fac_list at
startup in "head.S" for all machine types before lowcore protection
is enabled.

In addition to that the "=m" constraint is replaced by "+m".

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-04-11 14:28:26 +02:00
..
vdso32
vdso64
Makefile [S390] perf: add support for s390x CPU counters 2012-03-23 11:13:25 +01:00
asm-offsets.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
audit.c
audit.h
base.S
bitmap.c
compat_audit.c
compat_exec_domain.c
compat_linux.c
compat_linux.h
compat_ptrace.h
compat_signal.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
compat_wrapper.S sys_poll: fix incorrect type for 'timeout' parameter 2012-02-21 17:24:20 -08:00
cpcmd.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
crash.c
crash_dump.c [S390] kernel: Add OS info memory interface 2012-03-11 11:59:29 -04:00
debug.c [S390] kernel: Add z/VM LGR detection 2012-03-11 11:59:29 -04:00
diag.c
dis.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
early.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
ebcdic.c
entry.S [S390] rework idle code 2012-03-11 11:59:28 -04:00
entry.h [S390] irq: external interrupt code passing 2012-03-11 11:59:29 -04:00
entry64.S [S390] rework idle code 2012-03-11 11:59:28 -04:00
ftrace.c
head.S [S390] Fix stfle() lowcore protection problem 2012-04-11 14:28:26 +02:00
head31.S
head64.S
head_kdump.S
init_task.c
ipl.c [S390] kernel: Add OS info memory interface 2012-03-11 11:59:29 -04:00
irq.c [S390] irq: simple coding style change 2012-04-11 14:28:25 +02:00
jump_label.c
kprobes.c
lgr.c [S390] Fix build errors (fallout from system.h disintegration) 2012-03-30 09:41:12 +02:00
machine_kexec.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
mcount.S
mcount64.S
mem_detect.c
module.c
nmi.c [S390] rework idle code 2012-03-11 11:59:28 -04:00
os_info.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
perf_cpum_cf.c [S390] cpum_cf: get rid of compile warnings 2012-04-11 14:28:25 +02:00
perf_event.c [S390] Fix build errors (fallout from system.h disintegration) 2012-03-30 09:41:12 +02:00
process.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
processor.c
ptrace.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
reipl.S
reipl64.S
relocate_kernel.S
relocate_kernel64.S
s390_ksyms.c
sclp.S
setup.c [S390] Fix build errors (fallout from system.h disintegration) 2012-03-30 09:41:12 +02:00
signal.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
smp.c [S390] Fix build errors (fallout from system.h disintegration) 2012-03-30 09:41:12 +02:00
stacktrace.c
suspend.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
swsusp_asm64.S [S390] kernel: Add z/VM LGR detection 2012-03-11 11:59:29 -04:00
sys_s390.c
syscalls.S
sysinfo.c
time.c [S390] irq: external interrupt code passing 2012-03-11 11:59:29 -04:00
topology.c [S390] rework smp code 2012-03-11 11:59:28 -04:00
traps.c Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
vdso.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
vmlinux.lds.S
vtime.c [S390] irq: external interrupt code passing 2012-03-11 11:59:29 -04:00