commit | a8fc576d4af2f23a87a586424252df97f0ad0b06 | [log] [tgz] |
---|---|---|
author | Kees Cook <keescook@chromium.org> | Fri Jul 23 15:19:33 2021 -0700 |
committer | Kees Cook <keescook@chromium.org> | Sun Aug 22 00:21:36 2021 -0700 |
tree | c45776a6dadc7d4ac3ad12683a12c89ef3eb0d5a | |
parent | 1e2cd3084fff19e12bdf3c83ac1a8d64ef11aa63 [diff] |
lib/test_stackinit: Add assigned initializers Add whole-variable assignments of cast static initializers. These appear to currently behave like the direct initializers, but best to check them too. For example: struct test_big_hole var; var = (struct test_big_hole){ .one = arg->one, .two= arg->two, .three = arg->three, .four = arg->four }; Additionally adds a test for whole-object assignment, which is expected to fail since it usually falls back to a memcpy(): var = *arg; Suggested-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/lkml/CAK8P3a20SEoYCrp3jOK32oZc9OkiPv+1KTjNZ2GxLbHpY4WexQ@mail.gmail.com Cc: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210723221933.3431999-4-keescook@chromium.org