mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2026-01-27 12:35:36 +01:00
gcc-plugins: randstruct: Update code comment in relayout_struct()
commitd71f22365aupstream. Update code comment to clarify that the only element whose layout is not randomized is a proper C99 flexible-array member. This update is complementary to commit1ee60356c2("gcc-plugins: randstruct: Only warn about true flexible arrays") Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org> Link: https://lore.kernel.org/r/ZWJr2MWDjXLHE8ap@work Fixes:1ee60356c2("gcc-plugins: randstruct: Only warn about true flexible arrays") Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ba6e4b9971
commit
b79210fa10
|
|
@ -339,8 +339,7 @@ static int relayout_struct(tree type)
|
|||
|
||||
/*
|
||||
* enforce that we don't randomize the layout of the last
|
||||
* element of a struct if it's a 0 or 1-length array
|
||||
* or a proper flexible array
|
||||
* element of a struct if it's a proper flexible array
|
||||
*/
|
||||
if (is_flexible_array(newtree[num_fields - 1])) {
|
||||
has_flexarray = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user