<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/s390/kernel/entry.S, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-05-25T14:46:07Z</updated>
<entry>
<title>s390: move expoline assembler macros to a header</title>
<updated>2018-05-25T14:46:07Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2018-05-23T16:22:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0a844e8299879bc027110d8d21e5a698eb1dd54'/>
<id>urn:sha1:c0a844e8299879bc027110d8d21e5a698eb1dd54</id>
<content type='text'>
[ Upstream commit 6dd85fbb87d1d6b87a3b1f02ca28d7b2abd2e7ba ]

To be able to use the expoline branches in different assembler
files move the associated macros from entry.S to a new header
nospec-insn.h.

While we are at it make the macros a bit nicer to use.

Cc: stable@vger.kernel.org # 4.16
Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches")
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/entry.S: fix spurious zeroing of r0</title>
<updated>2018-03-06T08:19:35Z</updated>
<author>
<name>Christian Borntraeger</name>
</author>
<published>2018-03-05T19:18:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3f468963cd6fd6d2aa5e26aed8b24232096d0e1'/>
<id>urn:sha1:d3f468963cd6fd6d2aa5e26aed8b24232096d0e1</id>
<content type='text'>
when a system call is interrupted we might call the critical section
cleanup handler that re-does some of the operations. When we are between
.Lsysc_vtime and .Lsysc_do_svc we might also redo the saving of the
problem state registers r0-r7:

.Lcleanup_system_call:
[...]
0:      # update accounting time stamp
        mvc     __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER
        # set up saved register r11
        lg      %r15,__LC_KERNEL_STACK
        la      %r9,STACK_FRAME_OVERHEAD(%r15)
        stg     %r9,24(%r11)            # r11 pt_regs pointer
        # fill pt_regs
        mvc     __PT_R8(64,%r9),__LC_SAVE_AREA_SYNC
---&gt;    stmg    %r0,%r7,__PT_R0(%r9)

The problem is now, that we might have already zeroed out r0.
The fix is to move the zeroing of r0 after sysc_do_svc.

Reported-by: Farhan Ali &lt;alifm@linux.vnet.ibm.com&gt;
Fixes: 7041d28115e91 ("s390: scrub registers on kernel entry and KVM exit")
Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: do not bypass BPENTER for interrupt system calls</title>
<updated>2018-02-22T13:08:51Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2018-02-22T12:42:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5feec04fe578c8dbd9e2e1439afc2f0af761ed4'/>
<id>urn:sha1:d5feec04fe578c8dbd9e2e1439afc2f0af761ed4</id>
<content type='text'>
The system call path can be interrupted before the switch back to the
standard branch prediction with BPENTER has been done. The critical
section cleanup code skips forward to .Lsysc_do_svc and bypasses the
BPENTER. In this case the kernel and all subsequent code will run with
the limited branch prediction.

Fixes: eacf67eb9b32 ("s390: run user space and KVM guests with modified branch prediction")
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/clean-up: use CFI_* macros in entry.S</title>
<updated>2018-02-22T09:09:20Z</updated>
<author>
<name>Hendrik Brueckner</name>
</author>
<published>2018-02-19T10:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc24b7b49a53c7ee5502c877b133558acec0b3f8'/>
<id>urn:sha1:dc24b7b49a53c7ee5502c877b133558acec0b3f8</id>
<content type='text'>
Commit f19fbd5ed642 ("s390: introduce execute-trampolines for
branches") introduces .cfi_* assembler directives.  Instead of
using the directives directly, use the macros from asm/dwarf.h.
This also ensures that the dwarf debug information are created
in the .debug_frame section.

Fixes: f19fbd5ed642 ("s390: introduce execute-trampolines for branches")
Signed-off-by: Hendrik Brueckner &lt;brueckner@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: introduce execute-trampolines for branches</title>
<updated>2018-02-07T14:57:02Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2018-01-26T11:46:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f19fbd5ed642dc31c809596412dab1ed56f2f156'/>
<id>urn:sha1:f19fbd5ed642dc31c809596412dab1ed56f2f156</id>
<content type='text'>
Add CONFIG_EXPOLINE to enable the use of the new -mindirect-branch= and
-mfunction_return= compiler options to create a kernel fortified against
the specte v2 attack.

With CONFIG_EXPOLINE=y all indirect branches will be issued with an
execute type instruction. For z10 or newer the EXRL instruction will
be used, for older machines the EX instruction. The typical indirect
call

	basr	%r14,%r1

is replaced with a PC relative call to a new thunk

	brasl	%r14,__s390x_indirect_jump_r1

The thunk contains the EXRL/EX instruction to the indirect branch

__s390x_indirect_jump_r1:
	exrl	0,0f
	j	.
0:	br	%r1

The detour via the execute type instruction has a performance impact.
To get rid of the detour the new kernel parameter "nospectre_v2" and
"spectre_v2=[on,off,auto]" can be used. If the parameter is specified
the kernel and module code will be patched at runtime.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: run user space and KVM guests with modified branch prediction</title>
<updated>2018-02-05T13:48:50Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2018-01-16T06:36:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b73044b2b0081ee3dd1cd6eaab7dee552601efb'/>
<id>urn:sha1:6b73044b2b0081ee3dd1cd6eaab7dee552601efb</id>
<content type='text'>
Define TIF_ISOLATE_BP and TIF_ISOLATE_BP_GUEST and add the necessary
plumbing in entry.S to be able to run user space and KVM guests with
limited branch prediction.

To switch a user space process to limited branch prediction the
s390_isolate_bp() function has to be call, and to run a vCPU of a KVM
guest associated with the current task with limited branch prediction
call s390_isolate_bp_guest().

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: add options to change branch prediction behaviour for the kernel</title>
<updated>2018-02-05T12:49:17Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2018-01-16T06:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d768bd892fc8f066cd3aa000eb1867bcf32db0ee'/>
<id>urn:sha1:d768bd892fc8f066cd3aa000eb1867bcf32db0ee</id>
<content type='text'>
Add the PPA instruction to the system entry and exit path to switch
the kernel to a different branch prediction behaviour. The instructions
are added via CPU alternatives and can be disabled with the "nospec"
or the "nobp=0" kernel parameter. If the default behaviour selected
with CONFIG_KERNEL_NOBP is set to "n" then the "nobp=1" parameter can be
used to enable the changed kernel branch prediction.

Acked-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: scrub registers on kernel entry and KVM exit</title>
<updated>2018-02-05T06:34:54Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2018-01-16T12:27:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7041d28115e91f2144f811ffe8a195c696b1e1d0'/>
<id>urn:sha1:7041d28115e91f2144f811ffe8a195c696b1e1d0</id>
<content type='text'>
Clear all user space registers on entry to the kernel and all KVM guest
registers on KVM guest exit if the register does not contain either a
parameter or a result value.

Reviewed-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/syscalls: use generated syscall_table.h and unistd.h header files</title>
<updated>2018-01-23T06:36:52Z</updated>
<author>
<name>Hendrik Brueckner</name>
</author>
<published>2017-12-11T13:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4381f9f12e79436f90b14f326817cb1ed978940d'/>
<id>urn:sha1:4381f9f12e79436f90b14f326817cb1ed978940d</id>
<content type='text'>
Update the uapi/asm/unistd.h to include the generated compat and
64-bit version of the unistd.h and, as well as, the unistd_nr.h
header file.  Also remove the arch/s390/kernel/syscalls.S file
and use the generated system call table, syscall_table.h, instead.

Signed-off-by: Hendrik Brueckner &lt;brueckner@linux.vnet.ibm.com&gt;
Acked-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: rework __switch_to() to allow larger task_struct offsets</title>
<updated>2017-11-20T07:51:01Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2017-11-16T13:54:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3241d3eb7d9bb7a134bedf49db196cf98b58834d'/>
<id>urn:sha1:3241d3eb7d9bb7a134bedf49db196cf98b58834d</id>
<content type='text'>
If GCC_PLUGIN_RANDSTRUCT is enabled the members of task_struct will be
shuffled around. The offsets of the "pid" and "stack" members within
task_struct may not necessarily fit into 12 bits anymore, which causes
compile errors within __switch_to, since instructions are used, which
only have a 12 bit displacement field.

Therefore rework __switch_to, to allow for larger offsets.

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>
</feed>
