History log of /linux-master/fs/squashfs/xattr.c
Revision Date Author Comments
# c08a831c 29-Sep-2023 Wedson Almeida Filho <walmeida@microsoft.com>

squashfs: move squashfs_xattr_handlers to .rodata

This makes it harder for accidental or malicious changes to
squashfs_xattr_handlers at runtime.

Cc: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20230930050033.41174-25-wedsonaf@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>


# 68252eb5 20-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 35

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 or at your option any
later version this program is distributed in the hope that it will
be useful but without any warranty without even the implied warranty
of merchantability or fitness for a particular purpose see the gnu
general public license for more details you should have received a
copy of the gnu general public license along with this program if
not write to the free software foundation 51 franklin street fifth
floor boston ma 02110 1301 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 23 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520170857.458548087@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b296821a 10-Apr-2016 Al Viro <viro@zeniv.linux.org.uk>

xattr_handler: pass dentry and inode as separate arguments of ->get()

... and do not assume they are already attached to each other

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 764a5c6b 02-Dec-2015 Andreas Gruenbacher <agruenba@redhat.com>

xattr handlers: Simplify list operation

Change the list operation to only return whether or not an attribute
should be listed. Copying the attribute names into the buffer is moved
to the callers.

Since the result only depends on the dentry and not on the attribute
name, we do not pass the attribute name to list operations.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 98e9cb57 02-Dec-2015 Andreas Gruenbacher <agruenba@redhat.com>

vfs: Distinguish between full xattr names and proper prefixes

Add an additional "name" field to struct xattr_handler. When the name
is set, the handler matches attributes with exactly that name. When the
prefix is set instead, the handler matches attributes with the given
prefix and with a non-empty suffix.

This patch should avoid bugs like the one fixed in commit c361016a in
the future.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 0ddaf72c 04-Oct-2015 Andreas Gruenbacher <agruenba@redhat.com>

squashfs: xattr simplifications

Now that the xattr handler is passed to the xattr handler operations, we
have access to the attribute name prefix, so simplify the squashfs xattr
handlers a bit.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# d9a82a04 04-Oct-2015 Andreas Gruenbacher <agruenba@redhat.com>

xattr handlers: Pass handler to operations instead of flags

The xattr_handler operations are currently all passed a file system
specific flags value which the operations can use to disambiguate between
different handlers; some file systems use that to distinguish the xattr
namespace, for example. In some oprations, it would be useful to also have
access to the handler prefix. To allow that, pass a pointer to the handler
to operations instead of the flags value alone.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 2b0143b5 17-Mar-2015 David Howells <dhowells@redhat.com>

VFS: normal filesystems (and lustre): d_inode() annotations

that's the bulk of filesystem drivers dealing with inodes of their own

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# d7f2ff67 26-May-2011 Phillip Lougher <phillip@lougher.demon.co.uk>

Squashfs: update email address

My existing email address may stop working in a month or two, so update
email to one that will continue working.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>


# 07724586 24-Oct-2010 Phillip Lougher <phillip@lougher.demon.co.uk>

Squashfs: fix use of __le64 annotated variable

This fixes a sparse with endian checking warning.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>


# 4690148f 31-May-2010 Phillip Lougher <phillip@lougher.demon.co.uk>

squashfs: fix filename in header comment

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>


# a02956e4 31-May-2010 Phillip Lougher <phillip@lougher.demon.co.uk>

squashfs: fix compiler inline warning

Fix compiler warning where inline conflicts with non-inline
prototype.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>


# 5c80f5aa 23-May-2010 Phillip Lougher <phillip@lougher.demon.co.uk>

squashfs: fix name reading in squashfs_xattr_get

Only read potentially matching names into the target buffer, all
obviously non matching names don't need to be read into the
target buffer.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>


# f6db25a8 22-May-2010 Phillip Lougher <phillip@lougher.demon.co.uk>

squashfs: constify xattr handlers

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>


# 0f87ee08 13-May-2010 Stephen Hemminger <shemminger@vyatta.com>

squashfs: xattr fix sparse warnings

Sparse does not like inline function declared without body,
because it is not part of the standard kernel practice.

The xattr_handler tables can be declared static.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>


# f41d207cb 16-May-2010 Phillip Lougher <phillip@lougher.demon.co.uk>

squashfs: add support for xattr reading

Add support for listxattr and getxattr. Also add xattr definitions.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>