Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-12-07 Thread Michael Ellerman
On Thu, 18 Nov 2021 12:36:04 -0800, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memset(), avoid intentionally writing across > neighboring fields. > > Add a struct_group() for the spe registers so that memset() can correctly

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-12-01 Thread Kees Cook
On Wed, Nov 24, 2021 at 11:08:25AM +1100, Michael Ellerman wrote: > Kees Cook writes: > > On Mon, Nov 22, 2021 at 04:43:36PM +1100, Michael Ellerman wrote: > >> LEROY Christophe writes: > >> > Le 18/11/2021 à 21:36, Kees Cook a écrit : > >> >> In preparation for FORTIFY_SOURCE performing compile-

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-23 Thread Michael Ellerman
Kees Cook writes: > On Mon, Nov 22, 2021 at 04:43:36PM +1100, Michael Ellerman wrote: >> LEROY Christophe writes: >> > Le 18/11/2021 à 21:36, Kees Cook a écrit : >> >> In preparation for FORTIFY_SOURCE performing compile-time and run-time >> >> field bounds checking for memset(), avoid intentiona

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-22 Thread Kees Cook
On Mon, Nov 22, 2021 at 04:43:36PM +1100, Michael Ellerman wrote: > LEROY Christophe writes: > > Le 18/11/2021 à 21:36, Kees Cook a écrit : > >> In preparation for FORTIFY_SOURCE performing compile-time and run-time > >> field bounds checking for memset(), avoid intentionally writing across > >> n

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-21 Thread Michael Ellerman
LEROY Christophe writes: > Le 18/11/2021 à 21:36, Kees Cook a écrit : >> In preparation for FORTIFY_SOURCE performing compile-time and run-time >> field bounds checking for memset(), avoid intentionally writing across >> neighboring fields. >> >> Add a struct_group() for the spe registers so that

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-19 Thread Kees Cook
On Fri, Nov 19, 2021 at 05:35:00PM +0100, Christophe Leroy wrote: > Neither do I. I was just scared by what I saw while reviewing your patch. A > cleanup is probably required but it can be another patch. Heh, understood! For my end, my objective with the fortify work is to either split cross-membe

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-19 Thread Christophe Leroy
Le 19/11/2021 à 17:28, Kees Cook a écrit : On Fri, Nov 19, 2021 at 08:46:27AM +, LEROY Christophe wrote: Le 18/11/2021 à 21:36, Kees Cook a écrit : In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing acr

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-19 Thread Kees Cook
On Fri, Nov 19, 2021 at 08:46:27AM +, LEROY Christophe wrote: > > > Le 18/11/2021 à 21:36, Kees Cook a écrit : > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > field bounds checking for memset(), avoid intentionally writing across > > neighboring fields. > > > >

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-19 Thread LEROY Christophe
Le 18/11/2021 à 21:36, Kees Cook a écrit : > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memset(), avoid intentionally writing across > neighboring fields. > > Add a struct_group() for the spe registers so that memset() can correctly > reas

[PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-18 Thread Kees Cook
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing across neighboring fields. Add a struct_group() for the spe registers so that memset() can correctly reason about the size: In function 'fortify_memset_chk',