Skip to content

Commit aa98d7c

Browse files
author
KaiGai Kohei
committed
[JFFS2][XATTR] XATTR support on JFFS2 (version. 5)
This attached patches provide xattr support including POSIX-ACL and SELinux support on JFFS2 (version.5). There are some significant differences from previous version posted at last December. The biggest change is addition of EBS(Erase Block Summary) support. Currently, both kernel and usermode utility (sumtool) can recognize xattr nodes which have JFFS2_NODETYPE_XATTR/_XREF nodetype. In addition, some bugs are fixed. - A potential race condition was fixed. - Unexpected fail when updating a xattr by same name/value pair was fixed. - A bug when removing xattr name/value pair was fixed. The fundamental structures (such as using two new nodetypes and exclusion mechanism by rwsem) are unchanged. But most of implementation were reviewed and updated if necessary. Espacially, we had to change several internal implementations related to load_xattr_datum() to avoid a potential race condition. [1/2] xattr_on_jffs2.kernel.version-5.patch [2/2] xattr_on_jffs2.utils.version-5.patch Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
1 parent 4992a9e commit aa98d7c

29 files changed

Lines changed: 2800 additions & 15 deletions

‎fs/Kconfig‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,44 @@ config JFFS2_FS_DEBUG
10751075
If reporting bugs, please try to have available a full dump of the
10761076
messages at debug level 1 while the misbehaviour was occurring.
10771077

1078+
config JFFS2_FS_XATTR
1079+
bool "JFFS2 XATTR support"
1080+
depends on JFFS2_FS
1081+
default n
1082+
help
1083+
Extended attributes are name:value pairs associated with inodes by
1084+
the kernel or by users (see the attr(5) manual page, or visit
1085+
<http://acl.bestbits.at/> for details).
1086+
1087+
If unsure, say N.
1088+
1089+
config JFFS2_FS_POSIX_ACL
1090+
bool "JFFS2 POSIX Access Control Lists"
1091+
depends on JFFS2_FS_XATTR
1092+
default y
1093+
select FS_POSIX_ACL
1094+
help
1095+
Posix Access Control Lists (ACLs) support permissions for users and
1096+
groups beyond the owner/group/world scheme.
1097+
1098+
To learn more about Access Control Lists, visit the Posix ACLs for
1099+
Linux website <http://acl.bestbits.at/>.
1100+
1101+
If you don't know what Access Control Lists are, say N
1102+
1103+
config JFFS2_FS_SECURITY
1104+
bool "JFFS2 Security Labels"
1105+
depends on JFFS2_FS_XATTR
1106+
default y
1107+
help
1108+
Security labels support alternative access control models
1109+
implemented by security modules like SELinux. This option
1110+
enables an extended attribute handler for file security
1111+
labels in the jffs2 filesystem.
1112+
1113+
If you are not using a security module that requires using
1114+
extended attributes for file security labels, say N.
1115+
10781116
config JFFS2_FS_WRITEBUFFER
10791117
bool "JFFS2 write-buffering support"
10801118
depends on JFFS2_FS

‎fs/jffs2/Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jffs2-y += symlink.o build.o erase.o background.o fs.o writev.o
1212
jffs2-y += super.o debug.o
1313

1414
jffs2-$(CONFIG_JFFS2_FS_WRITEBUFFER) += wbuf.o
15+
jffs2-$(CONFIG_JFFS2_FS_XATTR) += xattr.o xattr_trusted.o xattr_user.o
16+
jffs2-$(CONFIG_JFFS2_FS_SECURITY) += security.o
17+
jffs2-$(CONFIG_JFFS2_FS_POSIX_ACL) += acl.o
1518
jffs2-$(CONFIG_JFFS2_RUBIN) += compr_rubin.o
1619
jffs2-$(CONFIG_JFFS2_RTIME) += compr_rtime.o
1720
jffs2-$(CONFIG_JFFS2_ZLIB) += compr_zlib.o

0 commit comments

Comments
 (0)