lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b1f3981-639b-83ea-a691-b919f9838644@huawei.com>
Date:   Sat, 7 Oct 2023 09:39:25 +0800
From:   Zhihao Cheng <chengzhihao1@...wei.com>
To:     Wedson Almeida Filho <wedsonaf@...il.com>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Christian Brauner <brauner@...nel.org>,
        <linux-fsdevel@...r.kernel.org>
CC:     <linux-kernel@...r.kernel.org>,
        Wedson Almeida Filho <walmeida@...rosoft.com>,
        Richard Weinberger <richard@....at>,
        <linux-mtd@...ts.infradead.org>
Subject: Re: [PATCH 25/29] ubifs: move ubifs_xattr_handlers to .rodata

在 2023/9/30 13:00, Wedson Almeida Filho 写道:
> From: Wedson Almeida Filho <walmeida@...rosoft.com>
> 
> This makes it harder for accidental or malicious changes to
> ubifs_xattr_handlers at runtime.
> 
> Cc: Richard Weinberger <richard@....at>
> Cc: linux-mtd@...ts.infradead.org
> Signed-off-by: Wedson Almeida Filho <walmeida@...rosoft.com>
> ---
>   fs/ubifs/ubifs.h | 2 +-
>   fs/ubifs/xattr.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Zhihao Cheng <chengzhihao1@...wei.com>

> 
> diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
> index 4c36044140e7..8a9a66255e7e 100644
> --- a/fs/ubifs/ubifs.h
> +++ b/fs/ubifs/ubifs.h
> @@ -2043,7 +2043,7 @@ ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
>   			size_t size);
>   
>   #ifdef CONFIG_UBIFS_FS_XATTR
> -extern const struct xattr_handler *ubifs_xattr_handlers[];
> +extern const struct xattr_handler * const ubifs_xattr_handlers[];
>   ssize_t ubifs_listxattr(struct dentry *dentry, char *buffer, size_t size);
>   void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum);
>   int ubifs_purge_xattrs(struct inode *host);
> diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
> index 349228dd1191..5e17e9591e6e 100644
> --- a/fs/ubifs/xattr.c
> +++ b/fs/ubifs/xattr.c
> @@ -735,7 +735,7 @@ static const struct xattr_handler ubifs_security_xattr_handler = {
>   };
>   #endif
>   
> -const struct xattr_handler *ubifs_xattr_handlers[] = {
> +const struct xattr_handler * const ubifs_xattr_handlers[] = {
>   	&ubifs_user_xattr_handler,
>   	&ubifs_trusted_xattr_handler,
>   #ifdef CONFIG_UBIFS_FS_SECURITY
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ