[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231006173247.zn4l6mwhup4bjkrf@moria.home.lan>
Date: Fri, 6 Oct 2023 13:32:47 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Brian Foster <bfoster@...hat.com>,
Kees Cook <keescook@...omium.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-bcachefs@...r.kernel.org,
linux-hardening@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] bcachefs: Use struct_size()
On Sun, Oct 01, 2023 at 09:13:54AM +0200, Christophe JAILLET wrote:
> Use struct_size() instead of hand writing it.
> This is less verbose and more robust.
>
> While at it, prepare for the coming implementation by GCC and Clang of the
> __counted_by attribute. Flexible array members annotated with __counted_by
> can have their accesses bounds-checked at run-time checking via
> CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for
> strcpy/memcpy-family functions).
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Thanks! Applied.
Powered by blists - more mailing lists