mbox series

[PATCHSET,0/3] xfs: ubsan fixes for 6.5-rc2

Message ID 168934573961.3353217.18139786322840965874.stgit@frogsfrogsfrogs (mailing list archive)
Headers show
Series xfs: ubsan fixes for 6.5-rc2 | expand

Message

Darrick J. Wong July 14, 2023, 2:42 p.m. UTC
Hi all,

Fix some UBSAN complaints, since apparently they don't allow flex array
declarations with array[1] anymore.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=ubsan-fixes-6.5
---
 fs/xfs/libxfs/xfs_da_format.h |   75 ++++++++++++++++++++++++++++++++++++-----
 fs/xfs/libxfs/xfs_fs.h        |    4 +-
 fs/xfs/xfs_ondisk.h           |    5 ++-
 3 files changed, 71 insertions(+), 13 deletions(-)

Comments

Kees Cook July 14, 2023, 9:11 p.m. UTC | #1
On Fri, Jul 14, 2023 at 07:42:19AM -0700, Darrick J. Wong wrote:
> Hi all,
> 
> Fix some UBSAN complaints, since apparently they don't allow flex array
> declarations with array[1] anymore.

Thanks for finding the best way to do this! Everything looks sane to me,
and the changes in sizes look correctly identified/checked.

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

> 
> If you're going to start using this mess, you probably ought to just
> pull from my git trees, which are linked below.
> 
> This is an extraordinary way to destroy everything.  Enjoy!
> Comments and questions are, as always, welcome.
> 
> --D
> 
> kernel git tree:
> https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=ubsan-fixes-6.5
> ---
>  fs/xfs/libxfs/xfs_da_format.h |   75 ++++++++++++++++++++++++++++++++++++-----
>  fs/xfs/libxfs/xfs_fs.h        |    4 +-
>  fs/xfs/xfs_ondisk.h           |    5 ++-
>  3 files changed, 71 insertions(+), 13 deletions(-)
>