lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Jun 2023 11:01:15 +0800
From:   Sheng Yong <shengyong@...o.com>
To:     jaegeuk@...nel.org, chao@...nel.org
Cc:     linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org, ebiggers@...nel.org,
        Sheng Yong <shengyong@...o.com>
Subject: [PATCH v4 0/6] f2fs: add f2fs_ioc_[get|set]_extra_attr

This patchset introduces two ioctls to get or modify values in
f2fs_inode's extra attribute area:
  * f2fs_ioc_get_extra_attr
  * f2fs_ioc_set_extra_attr

The argument of these two ioctls is `struct f2fs_extra_attr', which has
three members:
  * field: indicates which field in extra attribute area is handled
  * attr: value or userspace pointer
  * attr_size: size of `attr'

The `field' member could help extend functionality of these two ioctls
without modify or add new interfaces, if more fields are added into
extra attributes ares in the feture.

In order to reuse existed functions, several helpers are added to:
  * read inode chksum from inode page
  * get compress blocks
  * verify compression level
And, a compress_option v2 is added to access compress level and flags.

Thanks,
shengyong

v4:
  * split into small commits
v3:
  * setting lz4(hc) level correctly
v2:
  * fix compiling error if CONFIG_F2FS_FS_ZSTD is disabled by adding a
    helper f2fs_is_compress_level_valid()
  * fix compiling warning for casting unsinged long long to pointer

Sheng Yong (6):
  f2fs: add helper to check compression level
  f2fs: cleanup MIN_INLINE_XATTR_SIZE
  f2fs: add helper to get inode chksum from inode page
  f2fs: add f2fs_ioc_get_compress_blocks
  f2fs: add f2fs_ioc_[get|set]_extra_attr
  f2fs: access compression level and flags by extra attr ioctls

 fs/f2fs/compress.c        |  31 +++++
 fs/f2fs/f2fs.h            |   4 +
 fs/f2fs/file.c            | 280 ++++++++++++++++++++++++++++++++++++--
 fs/f2fs/inode.c           |  21 +++
 fs/f2fs/super.c           |   6 +-
 fs/f2fs/xattr.h           |   1 +
 include/uapi/linux/f2fs.h |  33 +++++
 7 files changed, 359 insertions(+), 17 deletions(-)

-- 
2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ