linux/security
Gustavo A. R. Silva 08ae3e5f5f integrity: Use static_assert() to check struct sizes
Commit 38aa3f5ac6d2 ("integrity: Avoid -Wflex-array-member-not-at-end
warnings") introduced tagged `struct evm_ima_xattr_data_hdr` and
`struct ima_digest_data_hdr`. We want to ensure that when new members
need to be added to the flexible structures, they are always included
within these tagged structs.

So, we use `static_assert()` to ensure that the memory layout for
both the flexible structure and the tagged struct is the same after
any changes.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Tested-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2024-10-09 22:49:40 -04:00
..
2024-09-24 10:40:11 -07:00
2024-09-24 14:54:26 -07:00
2024-09-24 10:18:15 -07:00
2024-09-16 18:19:47 +02:00
2023-05-25 17:52:15 -04:00
2024-08-19 22:36:26 -04:00
2024-09-24 14:54:26 -07:00