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

Kees Cook posted 2 patches 3 years, 5 months ago
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
[PATCH v2 0/2] Introduce flexible array struct helpers
Posted by Kees Cook 3 years, 5 months ago
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

-- 
2.34.1