I found that when selinux is enabled when mksquashfs is run, it adds an extended attribute that the kernel squashfs shows (in an strace of attr -l) as security.selinux, but squashfuse shows it as trusted.selinux. That's because the extended attribute types for trusted and selinux as defined in squashfs_fs.h are defined as 1 & 2, respectively, but their names as listed in xattr.c are reversed. As a result, attempts to look at that attribute (for example with strace -l) returns an ENODATA error.
I found that when selinux is enabled when mksquashfs is run, it adds an extended attribute that the kernel squashfs shows (in an strace of attr -l) as
security.selinux
, but squashfuse shows it astrusted.selinux
. That's because the extended attribute types for trusted and selinux as defined in squashfs_fs.h are defined as 1 & 2, respectively, but their names as listed in xattr.c are reversed. As a result, attempts to look at that attribute (for example with strace -l) returns an ENODATA error.This corrects the order of the two prefixes.