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] [day] [month] [year] [list]
Date: Tue, 18 Jun 2024 21:37:37 +0800
From: Zizhi Wo <wozizhi@...wei.com>
To: <dhowells@...hat.com>, <steved@...hat.com>, <Trond.Myklebust@...app.com>,
	<viro@...iv.linux.org.uk>
CC: <netfs@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
	<yangerkun@...wei.com>, Gao Xiang <hsiangkao@...ux.alibaba.com>,
	<jefflexu@...ux.alibaba>, <zhujia.zj@...edance.com>, <libaokun1@...wei.com>,
	<houtao1@...wei.com>, Yu Kuai <yukuai3@...wei.com>
Subject: Re: [PATCH] cachefiles: modify inappropriate error return value in
 cachefiles_daemon_secctx

friendly ping

在 2024/6/4 15:13, Zizhi Wo 写道:
> In cachefiles_daemon_secctx(), if it is detected that secctx has been
> written to the cache, the error code returned is -EINVAL, which is
> inappropriate and does not distinguish the situation well.
> 
> Like cachefiles_daemon_dir(), fix this issue by return -EEXIST to the user
> if it has already been defined once.
> 
> Fixes: 9ae326a69004 ("CacheFiles: A cache that backs onto a mounted filesystem")
> Signed-off-by: Zizhi Wo <wozizhi@...wei.com>
> ---
>   fs/cachefiles/daemon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
> index 6465e2574230..1b14849804f3 100644
> --- a/fs/cachefiles/daemon.c
> +++ b/fs/cachefiles/daemon.c
> @@ -586,7 +586,7 @@ static int cachefiles_daemon_secctx(struct cachefiles_cache *cache, char *args)
>   
>   	if (cache->secctx) {
>   		pr_err("Second security context specified\n");
> -		return -EINVAL;
> +		return -EEXIST;
>   	}
>   
>   	secctx = kstrdup(args, GFP_KERNEL);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ