Re: [PATCH] powerpc/32: Clear volatile regs on syscall exit

2022-02-24 Thread Segher Boessenkool
Hi! On Thu, Feb 24, 2022 at 09:29:55AM +0100, Gabriel Paubert wrote: > On Wed, Feb 23, 2022 at 05:27:39PM -0600, Segher Boessenkool wrote: > > On Wed, Feb 23, 2022 at 09:48:09PM +0100, Gabriel Paubert wrote: > > > On Wed, Feb 23, 2022 at 06:11:36PM +0100, Christophe Leroy wrote: > > > > +

Re: [PATCH] powerpc/32: Clear volatile regs on syscall exit

2022-02-24 Thread Segher Boessenkool
On Wed, Feb 23, 2022 at 09:48:09PM +0100, Gabriel Paubert wrote: > On Wed, Feb 23, 2022 at 06:11:36PM +0100, Christophe Leroy wrote: > > + /* Zero volatile regs that may contain sensitive kernel data */ > > + li r0,0 > > + li r4,0 > > + li r5,0 > > + li r6,0 > > +

Re: [PATCH] powerpc/32: Clear volatile regs on syscall exit

2022-02-24 Thread Christophe Leroy
Le 23/02/2022 à 20:34, Kees Cook a écrit : > On Wed, Feb 23, 2022 at 06:11:36PM +0100, Christophe Leroy wrote: >> Commit a82adfd5c7cb ("hardening: Introduce CONFIG_ZERO_CALL_USED_REGS") >> added zeroing of used registers at function exit. >> >> At the time being, PPC64 clears volatile registers

Re: [PATCH] powerpc/32: Clear volatile regs on syscall exit

2022-02-24 Thread Gabriel Paubert
On Wed, Feb 23, 2022 at 05:27:39PM -0600, Segher Boessenkool wrote: > On Wed, Feb 23, 2022 at 09:48:09PM +0100, Gabriel Paubert wrote: > > On Wed, Feb 23, 2022 at 06:11:36PM +0100, Christophe Leroy wrote: > > > + /* Zero volatile regs that may contain sensitive kernel data */ > > > + li r0,0

Re: [PATCH] powerpc/32: Clear volatile regs on syscall exit

2022-02-24 Thread Christophe Leroy
Le 23/02/2022 à 21:48, Gabriel Paubert a écrit : > On Wed, Feb 23, 2022 at 06:11:36PM +0100, Christophe Leroy wrote: >> Commit a82adfd5c7cb ("hardening: Introduce CONFIG_ZERO_CALL_USED_REGS") >> added zeroing of used registers at function exit. >> >> At the time being, PPC64 clears volatile

Re: [PATCH] powerpc/32: Clear volatile regs on syscall exit

2022-02-23 Thread Gabriel Paubert
On Wed, Feb 23, 2022 at 06:11:36PM +0100, Christophe Leroy wrote: > Commit a82adfd5c7cb ("hardening: Introduce CONFIG_ZERO_CALL_USED_REGS") > added zeroing of used registers at function exit. > > At the time being, PPC64 clears volatile registers on syscall exit but > PPC32 doesn't do it for

Re: [PATCH] powerpc/32: Clear volatile regs on syscall exit

2022-02-23 Thread Kees Cook
On Wed, Feb 23, 2022 at 06:11:36PM +0100, Christophe Leroy wrote: > Commit a82adfd5c7cb ("hardening: Introduce CONFIG_ZERO_CALL_USED_REGS") > added zeroing of used registers at function exit. > > At the time being, PPC64 clears volatile registers on syscall exit but > PPC32 doesn't do it for