lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] scsi: lpfc: Use struct_group() to initialize struct lpfc_cgn_info
From
On 12/8/2021 11:59 AM, 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 struct_group() to mark "stat" region of struct lpfc_cgn_info that
> should be initialized to zero, and refactor the "data" region memset()
> to wipe everything up to the cgn_stats region.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---


looks fine.

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james



\
 
 \ /
  Last update: 2021-12-09 15:51    [W:0.082 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site