]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/log
ceph.git
5 months agoclient: Only used known fields when comparing policies 66288/head
Christopher Hoffman [Fri, 14 Nov 2025 19:18:13 +0000 (19:18 +0000)]
client: Only used known fields when comparing policies

In set fscrypt policy, only use known fields when comparing if an
existing policy matches provided policy.

This is needed as struct fscrypt_policy_v2 has a reserved field.
Since this is a value managed in the kernel, it can change without
notice. A field was recently added: log2_data_unit_size. This can
cause issues with comparing existing policies during set policy.
When fields are added, reserved size changes and we can run into
trying to compare the same policies that compare uninitialized
memory regions or regions we do not yet support.

Fixes: https://tracker.ceph.com/issues/73825
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
5 months agotest: Add set fscrypt policy test initialized padding
Christopher Hoffman [Thu, 13 Nov 2025 19:54:47 +0000 (19:54 +0000)]
test: Add set fscrypt policy test initialized padding

Add an fscrypt policy test where in the policy struct, we
assume it will be zeroed out but instead returns initialized
values for all the reserve space.

Fixes: https://tracker.ceph.com/issues/73825
Signed-off-by: Christopher Hoffman <choffman@redhat.com>