mbox series

[v2,0/2] Introduce flexible array struct helpers

Message ID 20221024171848.never.522-kees@kernel.org (mailing list archive)
Headers show
Series Introduce flexible array struct helpers | expand

Message

Kees Cook Oct. 24, 2022, 5:20 p.m. UTC
Hi,

Here's a trimmed-down version of my original proposal, which just includes
flex_cpy(), as this is needed by XFS.

-Kees

v2: only include flex_cpy(), leaving remaining helpers for the future
v1: https://lore.kernel.org/all/20220504014440.3697851-1-keescook@chromium.org/

Kees Cook (2):
  Introduce flexible array struct helpers
  xfs: Use flex_cpy() to check extent copying

 fs/xfs/xfs_bmap_item.c      |   7 +-
 include/linux/flex_array.h  | 325 ++++++++++++++++++++++++++++++++++++
 include/linux/string.h      |   1 +
 include/uapi/linux/stddef.h |  14 ++
 4 files changed, 344 insertions(+), 3 deletions(-)
 create mode 100644 include/linux/flex_array.h