<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/s390/kernel/entry.S, branch linux-4.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-06-17T04:44:18Z</updated>
<entry>
<title>s390/kvm: do not rely on the ILC on kvm host protection fauls</title>
<updated>2017-06-17T04:44:18Z</updated>
<author>
<name>Christian Borntraeger</name>
</author>
<published>2017-05-15T12:11:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c094b10c3c19eb5f288a77490dee916f00f1b59b'/>
<id>urn:sha1:c094b10c3c19eb5f288a77490dee916f00f1b59b</id>
<content type='text'>
commit c0e7bb38c07cbd8269549ee0a0566021a3c729de upstream.

For most cases a protection exception in the host (e.g. copy
on write or dirty tracking) on the sie instruction will indicate
an instruction length of 4. Turns out that there are some corner
cases (e.g. runtime instrumentation) where this is not necessarily
true and the ILC is unpredictable.

Let's replace our 4 byte rewind_pad with 3 byte nops to prepare for
all possible ILCs.

Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>s390/cputime: fix incorrect system time</title>
<updated>2017-05-25T13:46:14Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2017-05-02T11:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82e31de01826459a8ea0829f3f520c95d3fe2b5e'/>
<id>urn:sha1:82e31de01826459a8ea0829f3f520c95d3fe2b5e</id>
<content type='text'>
commit 07a63cbe8bcb6ba72fb989dcab1ec55ec6c36c7e upstream.

git commit c5328901aa1db134 "[S390] entry[64].S improvements" removed
the update of the exit_timer lowcore field from the critical section
cleanup of the .Lsysc_restore/.Lsysc_done and .Lio_restore/.Lio_done
blocks. If the PSW is updated by the critical section cleanup to point to
user space again, the interrupt entry code will do a vtime calculation
after the cleanup completed with an exit_timer value which has *not* been
updated. Due to this incorrect system time deltas are calculated.

If an interrupt occured with an old PSW between .Lsysc_restore/.Lsysc_done
or .Lio_restore/.Lio_done update __LC_EXIT_TIMER with the system entry
time of the interrupt.

Tested-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>s390: fix in-kernel program checks</title>
<updated>2017-03-01T08:59:27Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2017-02-28T06:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9fcf2a1cbd1ff65d0109b1b400938808007fcd5'/>
<id>urn:sha1:d9fcf2a1cbd1ff65d0109b1b400938808007fcd5</id>
<content type='text'>
A program check inside the kernel takes a slightly different path in
entry.S compare to a normal user fault. A recent change moved the store
of the breaking event address into the path taken for in-kernel program
checks as well, but %r14 has not been setup to point to the correct
location. A wild store is the consequence.

Move the store of the breaking event address to the code path for
user space faults.

Fixes: 34525e1f7e8d ("s390: store breaking event address only for program checks")
Reported-by: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: restore address space when returning to user space</title>
<updated>2017-02-23T09:06:38Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2017-02-17T07:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5a882fcf146c87cb6b67c6df353e1c042b8773d'/>
<id>urn:sha1:b5a882fcf146c87cb6b67c6df353e1c042b8773d</id>
<content type='text'>
Unbalanced set_fs usages (e.g. early exit from a function and a
forgotten set_fs(USER_DS) call) may lead to a situation where the
secondary asce is the kernel space asce when returning to user
space. This would allow user space to modify kernel space at will.

This would only be possible with the above mentioned kernel bug,
however we can detect this and fix the secondary asce before returning
to user space.

Therefore a new TIF_ASCE_SECONDARY which is used within set_fs. When
returning to user space check if TIF_ASCE_SECONDARY is set, which
would indicate a bug. If it is set print a message to the console,
fixup the secondary asce, and then return to user space.

This is similar to what is being discussed for x86 and arm:
"[RFC] syscalls: Restore address limit after a syscall".

Reviewed-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: rename CIF_ASCE to CIF_ASCE_PRIMARY</title>
<updated>2017-02-23T09:06:38Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2017-02-17T07:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=606aa4aa0b2c6d7c4f5d2e459922675ea1d7e459'/>
<id>urn:sha1:606aa4aa0b2c6d7c4f5d2e459922675ea1d7e459</id>
<content type='text'>
This is just a preparation patch in order to keep the "restore address
space after syscall" patch small.
Rename CIF_ASCE to CIF_ASCE_PRIMARY to be unique and specific when
introducing a second CIF_ASCE_SECONDARY CIF flag.

Suggested-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/syscall: fix single stepped system calls</title>
<updated>2017-02-20T11:38:01Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2017-02-20T08:51:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d24b98e3a9c66b16ed029e1b2bcdf3c90e9d82d9'/>
<id>urn:sha1:d24b98e3a9c66b16ed029e1b2bcdf3c90e9d82d9</id>
<content type='text'>
Fix PER tracing of system calls after git commit 34525e1f7e8dc478
"s390: store breaking event address only for program checks"
broke it.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: add no-execute support</title>
<updated>2017-02-08T13:13:25Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2016-03-22T09:54:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57d7f939e7bdd746992f5c318a78697ba837c523'/>
<id>urn:sha1:57d7f939e7bdd746992f5c318a78697ba837c523</id>
<content type='text'>
Bit 0x100 of a page table, segment table of region table entry
can be used to disallow code execution for the virtual addresses
associated with the entry.

There is one tricky bit, the system call to return from a signal
is part of the signal frame written to the user stack. With a
non-executable stack this would stop working. To avoid breaking
things the protection fault handler checks the opcode that caused
the fault for 0x0a77 (sys_sigreturn) and 0x0aad (sys_rt_sigreturn)
and injects a system call. This is preferable to the alternative
solution with a stub function in the vdso because it works for
vdso=off and statically linked binaries as well.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: store breaking event address only for program checks</title>
<updated>2017-01-31T09:46:53Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2017-01-25T11:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34525e1f7e8dc47834b52d19b02c94b250df6f1f'/>
<id>urn:sha1:34525e1f7e8dc47834b52d19b02c94b250df6f1f</id>
<content type='text'>
The principles of operations specifies that the breaking event address
is stored to the address 0x110 in the prefix page only for program checks.
The last branch in user space is lost as soon as a branch in kernel space
is executed after e.g. an svc. This makes it impossible to accurately
maintain the breaking event address for a user space process.

Simplify the code, just copy the current breaking event address from
0x110 to the task structure for program checks from user space.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: remove unused labels from entry.S</title>
<updated>2016-12-12T11:04:26Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2016-12-07T09:16:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7df11604592b579bce2762783c21569d02272332'/>
<id>urn:sha1:7df11604592b579bce2762783c21569d02272332</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: fix machine check panic stack switch</title>
<updated>2016-12-07T06:22:13Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2016-12-02T12:29:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce4dda3f02aca959bdd18b596513791d77b8b7e1'/>
<id>urn:sha1:ce4dda3f02aca959bdd18b596513791d77b8b7e1</id>
<content type='text'>
For system damage machine checks or machine checks due to invalid PSW
fields the system will be stopped. In order to get an oops message out
before killing the system the machine check handler branches to
.Lmcck_panic, switches to the panic stack and then does the usual
machine check handling.

The switch to the panic stack is incomplete, the stack pointer in %r15
is replaced, but the pt_regs pointer in %r11 is not. The result is
a program check which will kill the system in a slightly different way.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
</feed>
