Re: [PATCH 48/64] drbd: Use struct_group() to zero algs

2021-07-30 Thread Lars Ellenberg
On Thu, Jul 29, 2021 at 07:57:47PM -0700, Bart Van Assche wrote: > On 7/29/21 7:31 PM, Kees Cook wrote: > > On Wed, Jul 28, 2021 at 02:45:55PM -0700, Bart Van Assche wrote: > >> On 7/27/21 1:58 PM, Kees Cook wrote: > >>> In preparation for FORTIFY_SOURCE performing compile-time and run-time > >>> f

Re: [PATCH 48/64] drbd: Use struct_group() to zero algs

2021-07-29 Thread Bart Van Assche
On 7/29/21 7:31 PM, Kees Cook wrote: > On Wed, Jul 28, 2021 at 02:45:55PM -0700, Bart Van Assche wrote: >> On 7/27/21 1:58 PM, Kees Cook wrote: >>> In preparation for FORTIFY_SOURCE performing compile-time and run-time >>> field bounds checking for memset(), avoid intentionally writing across >>> n

Re: [PATCH 48/64] drbd: Use struct_group() to zero algs

2021-07-29 Thread Kees Cook
On Wed, Jul 28, 2021 at 02:45:55PM -0700, Bart Van Assche wrote: > On 7/27/21 1:58 PM, 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

Re: [PATCH 48/64] drbd: Use struct_group() to zero algs

2021-07-28 Thread Bart Van Assche
On 7/27/21 1:58 PM, 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 algs so that memset() can correctly reason about the size. Signed-o

[PATCH 48/64] drbd: Use struct_group() to zero algs

2021-07-27 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 algs so that memset() can correctly reason about the size. Signed-off-by: Kees Cook --- drivers/block/dr