<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 20, 2021, 6:01 AM Jiri Kosina <<a href="mailto:jikos@kernel.org">jikos@kernel.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 17 Aug 2021, Kees Cook wrote:<br>
<br>
> In preparation for FORTIFY_SOURCE performing compile-time and run-time<br>
> field bounds checking for memcpy(), memmove(), and memset(), avoid<br>
> intentionally writing across neighboring fields.<br>
> <br>
> Use struct_group() in struct cp2112_string_report around members report,<br>
> length, type, and string, so they can be referenced together. This will<br>
> allow memcpy() and sizeof() to more easily reason about sizes, improve<br>
> readability, and avoid future warnings about writing beyond the end of<br>
> report.<br>
> <br>
> "pahole" shows no size nor member offset changes to struct<br>
> cp2112_string_report. "objdump -d" shows no meaningful object<br>
> code changes (i.e. only source line number induced differences.)<br>
> <br>
> Cc: Jiri Kosina <<a href="mailto:jikos@kernel.org" target="_blank" rel="noreferrer">jikos@kernel.org</a>><br>
> Cc: Benjamin Tissoires <<a href="mailto:benjamin.tissoires@redhat.com" target="_blank" rel="noreferrer">benjamin.tissoires@redhat.com</a>><br>
> Cc: <a href="mailto:linux-input@vger.kernel.org" target="_blank" rel="noreferrer">linux-input@vger.kernel.org</a><br>
> Signed-off-by: Kees Cook <<a href="mailto:keescook@chromium.org" target="_blank" rel="noreferrer">keescook@chromium.org</a>><br>
<br>
Applied, thanks.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Same for this one: it's part of the larger series.</div><div dir="auto"><br></div><div dir="auto">-Kees</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>