linux/arch/s390/include/asm
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
..
airq.h
appldata.h
asm-offsets.h
atomic.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
auxvec.h
barrier.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
bitops.h asm-generic: add another generic ext2 atomic bitops 2011-07-26 16:49:46 -07:00
bitsperlong.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h module: undo module RONX protection correctly. 2011-05-19 16:55:26 +09:30
ccwdev.h [S390] fix mismatch in summation of I/O IRQ statistics 2011-10-30 15:16:15 +01:00
ccwgroup.h
checksum.h
chpid.h UAPI: Alter the S390 asm include guards to be recognisable by the UAPI splitter 2011-12-13 09:26:45 +00:00
chsc.h
cio.h Fix common misspellings 2011-03-31 11:26:23 -03:00
cmb.h
cmpxchg.h [S390] percpu: implement arch specific irqsafe_cpu_ops 2011-05-23 10:24:29 +02:00
compat.h compat: fix compile breakage on s390 2012-02-27 07:54:27 -08:00
cpcmd.h
cpu_mf.h [S390] Fix build errors (fallout from system.h disintegration) 2012-03-30 09:41:12 +02:00
cpu.h
cputime.h [S390] rework idle code 2012-03-11 11:59:28 -04:00
crw.h
ctl_reg.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
current.h
dasd.h
debug.h [S390] kernel: Add z/VM LGR detection 2012-03-11 11:59:29 -04:00
delay.h [S390] delay: implement ndelay 2011-05-26 09:48:25 +02:00
device.h
diag.h [S390] replace diag10() with diag10_range() function 2011-05-10 17:13:43 +02:00
div64.h
dma.h
ebcdic.h
elf.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
emergency-restart.h
errno.h
etr.h
exec.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
extmem.h
facility.h [S390] Fix stfle() lowcore protection problem 2012-04-11 14:28:26 +02:00
fb.h
fcntl.h
fcx.h
ftrace.h ftrace/s390: mcount offset calculation 2011-05-16 15:05:06 -04:00
futex.h
hardirq.h [S390] irq: set __ARCH_IRQ_EXIT_IRQS_DISABLED 2012-03-11 11:59:28 -04:00
hugetlb.h [S390] Remove data execution protection 2011-05-23 10:24:28 +02:00
idals.h
io.h
ioctl.h
ioctls.h
ipcbuf.h
ipl.h [S390] kernel: Add z/VM LGR detection 2012-03-11 11:59:29 -04:00
irq_regs.h
irq.h [S390] oprofile: Allow multiple users of the measurement alert interrupt 2012-03-23 11:13:24 +01:00
irqflags.h [S390] irqs: Do not trace arch_local_{*,irq_*} functions 2011-07-24 10:48:00 +02:00
isc.h
itcw.h UAPI: Alter the S390 asm include guards to be recognisable by the UAPI splitter 2011-12-13 09:26:45 +00:00
jump_label.h static keys: Introduce 'struct static_key', static_key_true()/false() and static_key_slow_[inc|dec]() 2012-02-24 10:05:59 +01:00
Kbuild
kdebug.h [S390] cleanup trap handling 2011-12-27 11:27:12 +01:00
kexec.h kdump: define KEXEC_NOTE_BYTES arch specific for s390x 2012-01-23 08:38:48 -08:00
kmap_types.h
kprobes.h
kvm_host.h KVM: Introduce kvm_memory_slot::arch and move lpage_info into it 2012-03-08 14:10:22 +02:00
kvm_para.h
kvm_virtio.h
kvm.h KVM: s390: provide control registers via kvm_run 2012-03-08 14:10:18 +02:00
linkage.h [S390] fix s390 assembler code alignments 2011-07-24 10:48:21 +02:00
local64.h
local.h
lowcore.h [S390] Ensure that vmcore_info pointer is never accessed directly 2012-03-11 11:59:30 -04:00
mathemu.h
mman.h UAPI: Split trivial #if defined(__KERNEL__) && X conditionals 2011-12-13 15:07:49 +00:00
mmu_context.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
mmu.h [S390] Fix build errors (fallout from system.h disintegration) 2012-03-30 09:41:12 +02:00
module.h
monwriter.h
msgbuf.h
mutex.h
nmi.h
os_info.h [S390] kernel: Add OS info memory interface 2012-03-11 11:59:29 -04:00
page.h [S390] sparse: fix sparse warnings about missing prototypes 2011-10-30 15:16:46 +01:00
param.h
pci.h
percpu.h percpu: Remove irqsafe_cpu_xxx variants 2011-12-22 10:40:20 -08:00
perf_event.h [S390] perf: add support for s390x CPU counters 2012-03-23 11:13:25 +01:00
pgalloc.h [S390] fix tlb flushing for page table pages 2012-04-11 14:28:24 +02:00
pgtable.h [S390] add support for physical memory > 4TB 2011-12-27 11:27:10 +01:00
poll.h
posix_types.h s390: Use generic posix_types.h 2012-02-14 12:01:29 -08:00
processor.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
ptrace.h Audit: push audit success and retcode into arch ptrace.h 2012-01-17 16:16:56 -05:00
qdio.h [S390] qdio: fix kernel panic for zfcp 31-bit 2011-12-27 11:27:14 +01:00
qeth.h qeth: add query OSA address table support 2012-02-08 18:50:20 -05:00
reset.h [S390] kdump backend code 2011-10-30 15:16:42 +01:00
resource.h
rwsem.h
scatterlist.h
schid.h
sclp.h
scsw.h
seccomp.h
sections.h
segment.h
sembuf.h
setup.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
sfp-machine.h
sfp-util.h [S390] sparse: fix sparse warnings in math-emu 2011-10-30 15:16:46 +01:00
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
socket.h net: Add framework to allow sending packets with customized CRC. 2012-02-24 01:37:35 -08:00
sockios.h
sparsemem.h [S390] add support for physical memory > 4TB 2011-12-27 11:27:10 +01:00
spinlock_types.h
spinlock.h [S390] sparse: fix sparse warnings about missing prototypes 2011-10-30 15:16:46 +01:00
stat.h
statfs.h
string.h
swab.h
switch_to.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
syscall.h [S390] cleanup trap handling 2011-12-27 11:27:12 +01:00
sysinfo.h
tape390.h
termbits.h
termios.h
thread_info.h freezer: remove now unused TIF_FREEZE 2011-11-21 12:32:25 -08:00
timer.h [S390] rework idle code 2012-03-11 11:59:28 -04:00
timex.h [S390] avoid STCKF if running in ESA mode 2011-11-14 11:19:09 +01:00
tlb.h [S390] fix tlb flushing for page table pages 2012-04-11 14:28:24 +02:00
tlbflush.h [S390] add missing __tlb_flush_global() for !CONFIG_SMP 2011-10-30 15:16:47 +01:00
topology.h [S390] topology: increase poll frequency if change is anticipated 2011-12-27 11:27:12 +01:00
types.h consolidate umode_t declarations 2012-01-03 22:55:17 -05:00
uaccess.h Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
ucontext.h
unaligned.h
unistd.h [S390] ipc: call generic sys_ipc demultiplexer 2011-12-27 11:27:13 +01:00
user.h
vdso.h [S390] rework smp code 2012-03-11 11:59:28 -04:00
vtoc.h
xor.h
zcrypt.h