]> www.infradead.org Git - users/jedix/linux-maple.git/commit
randstruct: Fix gcc-plugin performance mode to stay in group
authorKees Cook <keescook@chromium.org>
Sat, 7 Oct 2023 04:09:28 +0000 (21:09 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 9 Oct 2023 05:46:05 +0000 (22:46 -0700)
commit381fdb73d1e2a48244de7260550e453d1003bb8e
tree5b3232b1b4bcc7b561960a833228671d5a8e6f9f
parentc5225cd073c65a6d7e8e311ec0114792a671982a
randstruct: Fix gcc-plugin performance mode to stay in group

The performance mode of the gcc-plugin randstruct was shuffling struct
members outside of the cache-line groups. Limit the range to the
specified group indexes.

Cc: linux-hardening@vger.kernel.org
Cc: stable@vger.kernel.org
Reported-by: Lukas Loidolt <e1634039@student.tuwien.ac.at>
Closes: https://lore.kernel.org/all/f3ca77f0-e414-4065-83a5-ae4c4d25545d@student.tuwien.ac.at
Fixes: 313dd1b62921 ("gcc-plugins: Add the randstruct plugin")
Signed-off-by: Kees Cook <keescook@chromium.org>
scripts/gcc-plugins/randomize_layout_plugin.c