summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_log_format.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-05-13 11:15:22 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-05-23 17:55:56 -0700
commitae5e4b656197ba95f564485aa0c21f91f8b062cb (patch)
tree8d84543ce84117aa46185bca45acd5a87729cf6d /fs/xfs/libxfs/xfs_log_format.h
parent3847fd046002590ede3b82c2264b9eec23e9233c (diff)
xfs: reject unknown xattri log item filter flags during recoveryattr-intent-fixes-5.19_2022-05-23
Make sure we screen the "attr flags" field of recovered xattr intent log items to reject flag bits that we don't know about. This is really the attr *filter* field from xfs_da_args, so rename the field and create a mask to make checking for invalid bits easier. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_log_format.h')
-rw-r--r--fs/xfs/libxfs/xfs_log_format.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h
index f7edd1ecf6d9..a9d08f3d4682 100644
--- a/fs/xfs/libxfs/xfs_log_format.h
+++ b/fs/xfs/libxfs/xfs_log_format.h
@@ -912,6 +912,14 @@ struct xfs_icreate_log {
#define XFS_ATTR_OP_FLAGS_TYPE_MASK 0xFF /* Flags type mask */
/*
+ * alfi_attr_filter captures the state of xfs_da_args.attr_filter, so it should
+ * never have any other bits set.
+ */
+#define XFS_ATTRI_FILTER_MASK (XFS_ATTR_ROOT | \
+ XFS_ATTR_SECURE | \
+ XFS_ATTR_INCOMPLETE)
+
+/*
* This is the structure used to lay out an attr log item in the
* log.
*/
@@ -924,7 +932,7 @@ struct xfs_attri_log_format {
uint32_t alfi_op_flags; /* marks the op as a set or remove */
uint32_t alfi_name_len; /* attr name length */
uint32_t alfi_value_len; /* attr value length */
- uint32_t alfi_attr_flags;/* attr flags */
+ uint32_t alfi_attr_filter;/* attr filter flags */
};
struct xfs_attrd_log_format {