summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2012-04-11 14:28:11 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-04-11 14:28:26 +0200
commit37e37c20ab2dbccdc7a7fa5922e182a51adf50f6 (patch)
tree920637cfbaecb8b999216d262ff8941f9fb5264c /arch/mips
parentaf0ee94e541e366ee4b84c6d476c88fd633fe80a (diff)
downloadblackbird-op-linux-37e37c20ab2dbccdc7a7fa5922e182a51adf50f6.tar.gz
blackbird-op-linux-37e37c20ab2dbccdc7a7fa5922e182a51adf50f6.zip
[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>
Diffstat (limited to 'arch/mips')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud