[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20231016092916.289194-1-miquel.raynal@bootlin.com>
Date: Mon, 16 Oct 2023 11:29:16 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Heiko Stuebner <heiko@...ech.de>,
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>
Cc: linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
linux-mtd@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org,
linux-hardening@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH] mtd: rawnand: rockchip: Use struct_size()
On Sun, 2023-10-01 at 07:44:04 UTC, 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).
>
> Also remove a useless comment about the position of a flex-array in a
> structure.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> Reviewed-by: Gustavo A. R. Silva <gustavoars@...nel.org>
> Reviewed-by: Kees Cook <keescook@...omium.org>
> Acked-by: Heiko Stuebner <heiko@...ech.de>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
Powered by blists - more mailing lists