<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/head_booke.h, branch linux-5.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-06-15T14:03:38Z</updated>
<entry>
<title>powerpc/32: fix build failure on book3e with KVM</title>
<updated>2019-06-15T14:03:38Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2019-05-23T08:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82f6e266f8123d7938713c0e10c03aa655b3e68a'/>
<id>urn:sha1:82f6e266f8123d7938713c0e10c03aa655b3e68a</id>
<content type='text'>
Build failure was introduced by the commit identified below,
due to missed macro expension leading to wrong called function's name.

arch/powerpc/kernel/head_fsl_booke.o: In function `SystemCall':
arch/powerpc/kernel/head_fsl_booke.S:416: undefined reference to `kvmppc_handler_BOOKE_INTERRUPT_SYSCALL_SPRN_SRR1'
Makefile:1052: recipe for target 'vmlinux' failed

The called function should be kvmppc_handler_8_0x01B(). This patch fixes it.

Reported-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Fixes: 1a4b739bbb4f ("powerpc/32: implement fast entry for syscalls on BOOKE")
Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/booke: fix fast syscall entry on SMP</title>
<updated>2019-06-15T13:44:41Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2019-06-13T13:52:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8732ffa2e096d433c3f2349b871d43ed0d39f5c'/>
<id>urn:sha1:e8732ffa2e096d433c3f2349b871d43ed0d39f5c</id>
<content type='text'>
Use r10 instead of r9 to calculate CPU offset as r9 contains
the value from SRR1 which is used later.

Fixes: 1a4b739bbb4f ("powerpc/32: implement fast entry for syscalls on BOOKE")
Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/32: implement fast entry for syscalls on BOOKE</title>
<updated>2019-05-02T15:20:27Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2019-04-30T12:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a4b739bbb4f8857d1b4feb46d6b3ec72269c111'/>
<id>urn:sha1:1a4b739bbb4f8857d1b4feb46d6b3ec72269c111</id>
<content type='text'>
This patch implements a fast entry for syscalls.

Syscalls don't have to preserve non volatile registers except LR.

This patch then implement a fast entry for syscalls, where
volatile registers get clobbered.

As this entry is dedicated to syscall it always sets MSR_EE
and warns in case MSR_EE was previously off

It also assumes that the call is always from user, system calls are
unexpected from kernel.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/32: get rid of COPY_EE in exception entry</title>
<updated>2019-05-02T15:20:27Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2019-04-30T12:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ae99b4b924ab10452da653baed29d3883705519'/>
<id>urn:sha1:1ae99b4b924ab10452da653baed29d3883705519</id>
<content type='text'>
EXC_XFER_TEMPLATE() is not called with COPY_EE anymore so
we can get rid of copyee parameters and related COPY_EE and NOCOPY
macros.

Suggested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
[splited out from benh RFC patch]

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/32: Enter exceptions with MSR_EE unset</title>
<updated>2019-05-02T15:20:27Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2019-04-30T12:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=642770dd96cb04e7cf8f7677e35cd528cda0a97b'/>
<id>urn:sha1:642770dd96cb04e7cf8f7677e35cd528cda0a97b</id>
<content type='text'>
All exceptions handlers know when to reenable interrupts, so
it is safer to enter all of them with MSR_EE unset, except
for syscalls.

Suggested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
[splited out from benh RFC patch]

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/32: enter syscall with MSR_EE inconditionaly set</title>
<updated>2019-05-02T15:20:27Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2019-04-30T12:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f97dec21a306967edbc49ce46f3ecefa3cd16907'/>
<id>urn:sha1:f97dec21a306967edbc49ce46f3ecefa3cd16907</id>
<content type='text'>
syscalls are expected to be entered with MSR_EE set. Lets
make it inconditional by forcing MSR_EE on syscalls.

This patch adds EXC_XFER_SYS for that.

Suggested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
[splited out from benh RFC patch]

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc: Activate CONFIG_THREAD_INFO_IN_TASK</title>
<updated>2019-02-23T11:31:40Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2019-01-31T10:08:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ed1cd6deb013a11959d17a94e35ce159197632da'/>
<id>urn:sha1:ed1cd6deb013a11959d17a94e35ce159197632da</id>
<content type='text'>
This patch activates CONFIG_THREAD_INFO_IN_TASK which
moves the thread_info into task_struct.

Moving thread_info into task_struct has the following advantages:
  - It protects thread_info from corruption in the case of stack
    overflows.
  - Its address is harder to determine if stack addresses are leaked,
    making a number of attacks more difficult.

This has the following consequences:
  - thread_info is now located at the beginning of task_struct.
  - The 'cpu' field is now in task_struct, and only exists when
    CONFIG_SMP is active.
  - thread_info doesn't have anymore the 'task' field.

This patch:
  - Removes all recopy of thread_info struct when the stack changes.
  - Changes the CURRENT_THREAD_INFO() macro to point to current.
  - Selects CONFIG_THREAD_INFO_IN_TASK.
  - Modifies raw_smp_processor_id() to get -&gt;cpu from current without
    including linux/sched.h to avoid circular inclusion and without
    including asm/asm-offsets.h to avoid symbol names duplication
    between ASM constants and C constants.
  - Modifies klp_init_thread_info() to take a task_struct pointer
    argument.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Reviewed-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Add task_stack.h to livepatch.h to fix build fails]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc: Rename THREAD_INFO to TASK_STACK</title>
<updated>2019-02-23T11:31:40Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2019-01-31T10:08:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c1fc5abdccfb36102fa9647084eeb8c70e32562'/>
<id>urn:sha1:8c1fc5abdccfb36102fa9647084eeb8c70e32562</id>
<content type='text'>
This patch renames THREAD_INFO to TASK_STACK, because it is in fact
the offset of the pointer to the stack in task_struct so this pointer
will not be impacted by the move of THREAD_INFO.

Also make it available on 64-bit, as we'll need it there when we
activate THREAD_INFO_IN_TASK.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Reviewed-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Make available on 64-bit]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup'</title>
<updated>2018-12-30T03:00:47Z</updated>
<author>
<name>Diana Craciun</name>
</author>
<published>2018-12-23T20:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=039daac5526932ec731e4499613018d263af8b3e'/>
<id>urn:sha1:039daac5526932ec731e4499613018d263af8b3e</id>
<content type='text'>
Fixed the following build warning:
powerpc-linux-gnu-ld: warning: orphan section `__btb_flush_fixup' from
`arch/powerpc/kernel/head_44x.o' being placed in section
`__btb_flush_fixup'.

Signed-off-by: Diana Craciun &lt;diana.craciun@nxp.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit)</title>
<updated>2018-12-20T11:59:03Z</updated>
<author>
<name>Diana Craciun</name>
</author>
<published>2018-12-12T14:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7fef436295bf6c05effe682c8797dfcb0deb112a'/>
<id>urn:sha1:7fef436295bf6c05effe682c8797dfcb0deb112a</id>
<content type='text'>
In order to protect against speculation attacks on
indirect branches, the branch predictor is flushed at
kernel entry to protect for the following situations:
- userspace process attacking another userspace process
- userspace process attacking the kernel
Basically when the privillege level change (i.e.the kernel
is entered), the branch predictor state is flushed.

Signed-off-by: Diana Craciun &lt;diana.craciun@nxp.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
