On 18.08.21 г. 9:05, 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. > > Use memset_startat() so memset() doesn't get confused about writing > beyond the destination member that is intended to be the starting point > of zeroing through the end of the struct. > > Cc: Chris Mason <c...@fb.com> > Cc: Josef Bacik <jo...@toxicpanda.com> > Cc: David Sterba <dste...@suse.com> > Cc: linux-bt...@vger.kernel.org > Signed-off-by: Kees Cook <keesc...@chromium.org> Reviewed-by: Nikolay Borisov <nbori...@suse.com>
- [PATCH v2 38/63] xfrm: Use memset_after() to clear padding Kees Cook
- [PATCH v2 20/63] drm/mga/mga_ioc32: Use struct_group() for... Kees Cook
- [PATCH v2 26/63] lib/string: Move helper functions out of ... Kees Cook
- Re: [PATCH v2 26/63] lib/string: Move helper function... Andy Shevchenko
- [PATCH v2 25/63] compiler_types.h: Remove __compiletime_ob... Kees Cook
- [PATCH v2 50/63] tracing: Use memset_startat() to zero str... Kees Cook
- [PATCH v2 49/63] btrfs: Use memset_startat() to clear end ... Kees Cook
- Re: [PATCH v2 49/63] btrfs: Use memset_startat() to c... Nikolay Borisov
- Re: [PATCH v2 49/63] btrfs: Use memset_startat() to c... David Sterba
- [PATCH v2 54/63] dm integrity: Use struct_group() to zero ... Kees Cook
- [PATCH v2 52/63] cm4000_cs: Use struct_group() to zero str... Kees Cook
- [PATCH v2 55/63] HID: roccat: Use struct_group() to zero k... Kees Cook
- Re: [PATCH v2 55/63] HID: roccat: Use struct_group() ... Jiri Kosina
- Re: [PATCH v2 55/63] HID: roccat: Use struct_grou... Kees Cook
- Re: [PATCH v2 55/63] HID: roccat: Use struct_... Jiri Kosina
- Re: [PATCH v2 55/63] HID: roccat: Use str... Kees Cook
- Re: [PATCH v2 55/63] HID: roccat: Use str... Kees Cook
- Re: [PATCH v2 55/63] HID: roccat: Us... Jiri Kosina