[PATCH v2 net-next 1/2] skbuff: Move conditional preprocessor directives out of struct sk_buff

2021-11-20 Thread Kees Cook
In preparation for using the struct_group() macro in struct sk_buff, move the conditional preprocessor directives out of the region of struct sk_buff that will be enclosed by struct_group(). While GCC and Clang are happy with conditional preprocessor directives here, sparse is not, even under -Wno-

[PATCH v2 net-next 2/2] skbuff: Switch structure bounds to struct_group()

2021-11-20 Thread Kees Cook
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Replace the existing empty member position markers "headers_start" and "headers_end" with a struct_group(). Thi

[PATCH v2 net-next 0/2] skbuff: Switch structure bounds to struct_group()

2021-11-20 Thread Kees Cook
Hi, This is a pair of patches to add struct_group() to struct sk_buff. The first is needed to work around sparse-specific complaints, and is new for v2. The second patch is the same as originally sent as v1. -Kees Kees Cook (2): skbuff: Move conditional preprocessor directives out of struct sk