[OpenWrt-Devel] Why default of XATTR in kernel but not userspace?

Maxim Storchak m.storchak at gmail.com
Wed Dec 23 04:08:49 EST 2015


Hi Daniel,

When I added attr and acl initially, I enabled xattr and acl support for
filesystems, but then that part was removed, possibly because dependency
logic didn't conform standards (just in case, I'm not blaming anyone,
that was one of my first patches submitted), see
https://github.com/openwrt/packages/commit/c43ecd25564391d518039971a86cd692e5a685fb.
I like your idea of having single place to control ACL and XATTR
support, but that may mean that attr and acl have to become core
components, not packages.

On 12/20/15 10:18, Daniel Dickinson wrote:
> Hi all,
> 
> I've been working on a patch for making POSIX ACL support and userspace
> support of POSIX ACL and XATTR (extended attributes) a configuration
> option at compile time and noticed something rather wonky:
> 
> While for POSIX ACL the default is disabled both at the kernel
> level and in userpace (i.e. filesystem modules by default do
> not support POSIX ACL and programs don't use libacl).
> 
> OTOH for XATTR support the default is for kernel modules and built-ins
> to support XATTR, but block mount does not support XATTR so I'm not sure
> any filesystems are actually mounted with xattr support enabled, and, in
> addition, no programs are compiled with xattr support (that is the
> default is not support xattr in userspace by default).
> 
> I'm a little puzzled as to why this is and what is acommplished by
> having XATTR support by filesystem modules, when it doesn't appear
> anything uses that support (unless overlayfs uses with jffs2 and/or
> tmpfs uses it via procd, but the support would fail for anything not
> mounted by procd).
> 
> What is exactly is logic/reason for this configuration and what is
> actually going on here?  Is xattr used at all?  If it is, why the mixed
> bag of support vs. lack of support depending on how a filesystem
> is mounted?
> 
> My plan is to make a config option that, when enabled, makes POSIX ACL
> support in both kernel and userpace the default (with certain exceptions
> like JFFS2 and TMPFS), along with userpace xattr support.
> In addition I add to the build options menu (if the above option is
> enabled), the ability to turn on and off POSIX ACL support for each
> filesystem.
> 
> (The option if enabled also manages (on by default) NFSv4 (and off by
> default) old NFS ACL support).
> 
> In addition I have a patch to fstools that lets block mount mount with
> posix acl and xattr support enabled.
> 
> (I make this an ifdef since it's pointless without the appropriate
> kernel support).
> 
> 
> Regards,
> 
> Daniel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



-- 
Best regards,
Maxim Storchak
mailto:m.storchak at gmail.com
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list