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
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -7,6 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | Copyright (C) 2001 by Andreas Gruenbacher <a.gruenbacher@computer.org> |
| 8 | 8 | Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. |
| 9 | 9 | Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com> |
| 10 | + Copyright (c) 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | |
| 10 | 11 | */ |
| 11 | 12 | |
| 12 | 13 | #include <linux/libc-compat.h> |
| @@ -31,6 +32,9 @@ · 18 unmodified lines | ||
| 31 | 32 | #define XATTR_BTRFS_PREFIX "btrfs." |
| 32 | 33 | #define XATTR_BTRFS_PREFIX_LEN (sizeof(XATTR_BTRFS_PREFIX) - 1) |
| 33 | 34 | |
| 35 | +#define XATTR_HURD_PREFIX "gnu." | |
| 36 | +#define XATTR_HURD_PREFIX_LEN (sizeof(XATTR_HURD_PREFIX) - 1) | |
| 37 | + | |
| 34 | 38 | #define XATTR_SECURITY_PREFIX "security." |
| 35 | 39 | #define XATTR_SECURITY_PREFIX_LEN (sizeof(XATTR_SECURITY_PREFIX) - 1) |
| 36 | 40 | |