Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efacae6d authored by Kees Cook's avatar Kees Cook Committed by Martin K. Petersen
Browse files

scsi: qedi: qedf: Use designated initializers



Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.

For these cases, terminate the list with { }, which will be zero-filled,
instead of undesignated NULLs.

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent daf0cd44
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -449,7 +449,7 @@ const struct file_operations qedf_dbg_fops[] = {
	qedf_dbg_fileops(qedf, clear_stats),
	qedf_dbg_fileops(qedf, clear_stats),
	qedf_dbg_fileops_seq(qedf, offload_stats),
	qedf_dbg_fileops_seq(qedf, offload_stats),
	/* This must be last */
	/* This must be last */
	{ NULL, NULL },
	{ },
};
};


#else /* CONFIG_DEBUG_FS */
#else /* CONFIG_DEBUG_FS */
+1 −1
Original line number Original line Diff line number Diff line
@@ -240,5 +240,5 @@ const struct file_operations qedi_dbg_fops[] = {
	qedi_dbg_fileops_seq(qedi, gbl_ctx),
	qedi_dbg_fileops_seq(qedi, gbl_ctx),
	qedi_dbg_fileops(qedi, do_not_recover),
	qedi_dbg_fileops(qedi, do_not_recover),
	qedi_dbg_fileops_seq(qedi, io_trace),
	qedi_dbg_fileops_seq(qedi, io_trace),
	{ NULL, NULL },
	{ },
};
};