Re: [RFC PATCH 1/2] quota: allow DQF_ROOT_SQUASH on all quota formats

[email protected]
Newsgroups org.kernel.vger.linux-ext4
Message-ID <[email protected]>
> ignore_hardlimit() exempts CAP_SYS_RESOURCE holders from enforcement of
> hard limits and of soft limits whose grace time expired.
> DQF_ROOT_SQUASH disables that exemption, but it has been confined to the
> old v1 quota format since the quota format abstraction was introduced,
> and commit ca6cb0918e87 ("quota: Verify flags passed to Q_SETINFO")
> later made Q_SETINFO reject it explicitly on other formats.
> 
> That confinement predates generic project quota support. Project limits
> bound the size of a directory tree rather than restrict a user, and are
> commonly used for capacity isolation of container volumes and NFS
> exports. There the exemption defeats the purpose: knfsd raises
> CAP_SYS_RESOURCE for requests mapped to root on no_root_squash exports
> (CAP_NFSD_SET), so any remote root write silently exceeds project hard
> limits. XFS enforces project limits regardless of capabilities.
> 
> Lift the format restriction so the flag can be set per quota type
> through Q_SETINFO on journaled quota as well. Existing setups keep their
> behaviour: the flag stays clear unless explicitly set, and setting it
> was previously rejected with -EINVAL on anything but QFMT_VFS_OLD -
> accepting it there is the user-visible ABI change this patch makes.
> 
> Signed-off-by: Kitae Yoo <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.