Re: [PATCH v2] statx: don't leak STATX_ATTR_CHANGE_MONOTONIC in stx_attributes_mask
From: Christoph Hellwig
Date: Tue Nov 03 2026 - 09:22:53 EST
On Tue, Nov 03, 2026 at 07:04:00AM -0500, Jeff Layton wrote:
> STATX_ATTR_CHANGE_MONOTONIC is kernel-internal. cp_statx() strips it
> from stx_attributes but copies attributes_mask verbatim, so it leaks to
> userland on filesystems that advertise it (nfs, ceph), e.g.
> stx_attributes_mask = 0x8000000000303000 on NFS.
>
> Add a new mask constant and apply it to both fields.
Looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>