History

ext4: support xattr gnu.* namespace for the Hurd

The Hurd gained[0] support for moving the translator and author fields out of the inode and into the "gnu.*" xattr namespace. In anticipation of that, an xattr INDEX was reserved[1]. The Hurd has now been brought into compliance[2] with that. This patch adds support for reading and writing such attributes from Linux; you can now do something like mkdir -p hurd-root/servers/socket touch hurd-root/servers/socket/1 setfattr --name=gnu.translator --value='"/hurd/pflocal\0"' \ hurd-root/servers/socket/1 getfattr --name=gnu.translator hurd-root/servers/socket/1 # file: 1 gnu.translator="/hurd/pflocal" to setup a pipe translator, which is being used to create[3] a vm-image for the Hurd from GNU Guix. [0] https://summerofcode.withgoogle.com/projects/#5869799859027968 [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3980bd3b406addb327d858aebd19e229ea340b9a [2] https://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=a04c7bf83172faa7cb080fbe3b6c04a8415ca645 [3] https://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-hurd-vm

Jan (janneke) Nieuwenhuizen committed 6 years ago

Commit 88ee9d51 parent 81198535 files · +60 −1Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/xattr.h+4−0
@@ -7,6 +7,7 @@ · 6 unmodified lines
77 Copyright (C) 2001 by Andreas Gruenbacher <a.gruenbacher@computer.org>
88 Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
99 Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
10+ Copyright (c) 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
1011 */
1112
1213 #include <linux/libc-compat.h>
@@ -31,6 +32,9 @@ · 18 unmodified lines
3132 #define XATTR_BTRFS_PREFIX "btrfs."
3233 #define XATTR_BTRFS_PREFIX_LEN (sizeof(XATTR_BTRFS_PREFIX) - 1)
3334
35+#define XATTR_HURD_PREFIX "gnu."
36+#define XATTR_HURD_PREFIX_LEN (sizeof(XATTR_HURD_PREFIX) - 1)
37+
3438 #define XATTR_SECURITY_PREFIX "security."
3539 #define XATTR_SECURITY_PREFIX_LEN (sizeof(XATTR_SECURITY_PREFIX) - 1)
3640