From: John Ericson This will be expanded upon in the next commit. Link: https://lore.kernel.org/all/a49ce818-f38d-41b0-bbf7-80b8aad998b1@app.fastmail.com/ Signed-off-by: John Ericson --- include/linux/fs_struct.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 0070764b790a..b5db5de9eb01 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h @@ -12,7 +12,21 @@ struct fs_struct { seqlock_t seq; int umask; int in_exec; - struct path root, pwd; + + /* + * The root directory for the task(s) that points to this + * `fs_struct`. The root directory also controls how `..` + * resolve; path traversal is not allowed to resolve upwards + * beyond the root directory. (It is for this latter reason that + * `chroot` is a privileged operation.) + */ + struct path root; + + /* + * The current working directory for the task(s) that points to + * this `fs_struct`. + */ + struct path pwd; } __randomize_layout; extern struct kmem_cache *fs_cachep; -- 2.51.2