Re: [RFC PATCH 2/2] quota_v2: persist DQF_ROOT_SQUASH

[email protected]
Newsgroups org.kernel.vger.linux-ext4
Message-ID <[email protected]>
> Commit c119c5b9749e ("quota: Don't store flags for v2 quota format")
> stopped persisting dqi_flags because no v2 flag was supported and
> on-disk flags could contain unvalidated garbage. Now that
> DQF_ROOT_SQUASH is settable on v2, losing it across quotaoff/quotaon or
> remount would silently re-enable the CAP_SYS_RESOURCE exemption - a poor
> property for an enforcement policy.
> 
> Store the flag in the existing on-disk dqi_flags field and mask on read
> so only the supported flag is ever accepted from disk, which also keeps
> pre-existing garbage bits out of the in-memory flags.
> 
> An older kernel rewriting quota info still clears the stored flag;
> strict enforcement then needs to be set up again after booting back.
> 
> 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=2
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.