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, 7 Mar 2017 00:38:16 -0500
From:   Oleg Drokin <oleg.drokin@...el.com>
To:     Mario Bambagini <mario.bambagini@...il.com>
Cc:     <devel@...verdev.osuosl.org>, <gregkh@...uxfoundation.org>,
        <linux-kernel@...r.kernel.org>, <lustre-devel@...ts.lustre.org>
Subject: Re: [lustre-devel] [PATCH] staging: lustre: fix sparse warning about different address spaces


On Mar 1, 2017, at 6:57 PM, Mario Bambagini wrote:

> fixed the following sparse warning by adding proper cast:
> drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: warning: incorrect type in argument 2 (different address spaces)
> drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74:    expected char const [noderef] <asn:1>*<noident>
> drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74:    got char *[assigned] sval
> 
> Signed-off-by: Mario Bambagini <mario.bambagini@...il.com>

The patch is fine, but just be advised this whole function is going away real soon now
per Al Viro request (and also because it no longer does what it should).

> ---
> drivers/staging/lustre/lustre/obdclass/obd_config.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c
> index 9ca84c7..8fce88f 100644
> --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
> +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
> @@ -1052,7 +1052,8 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
> 
> 					oldfs = get_fs();
> 					set_fs(KERNEL_DS);
> -					rc = var->fops->write(&fakefile, sval,
> +					rc = var->fops->write(&fakefile,
> +						(const char __user *)sval,
> 								vallen, NULL);
> 					set_fs(oldfs);
> 				}
> -- 
> 2.1.4
> 
> _______________________________________________
> lustre-devel mailing list
> lustre-devel@...ts.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ