[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211118231355.7a39d22f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 18 Nov 2021 23:13:55 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Kees Cook <keescook@...omium.org>
Cc: "Jason A. Donenfeld" <Jason@...c4.com>,
"Gustavo A . R . Silva" <gustavoars@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Alexander Lobakin <alobakin@...me>,
Jakub Sitnicki <jakub@...udflare.com>,
Marco Elver <elver@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
Eric Dumazet <edumazet@...gle.com>,
Cong Wang <cong.wang@...edance.com>,
Paolo Abeni <pabeni@...hat.com>,
Talal Ahmad <talalahmad@...gle.com>,
Kevin Hao <haokexin@...il.com>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Kumar Kartikeya Dwivedi <memxor@...il.com>,
Vasily Averin <vvs@...tuozzo.com>,
linux-kernel@...r.kernel.org, wireguard@...ts.zx2c4.com,
netdev@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] skbuff: Switch structure bounds to struct_group()
On Thu, 18 Nov 2021 10:36:15 -0800 Kees Cook wrote:
> 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(). This will allow memcpy() and sizeof()
> to more easily reason about sizes, and improve readability.
>
> "pahole" shows no size nor member offset changes to struct sk_buff.
> "objdump -d" shows no object code changes (outside of WARNs affected by
> source line number changes).
This adds ~27k of these warnings to W=1 gcc builds:
include/linux/skbuff.h:851:1: warning: directive in macro's argument list
Powered by blists - more mailing lists