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: <20160213214932.GE32153@mwanda>
Date:	Sun, 14 Feb 2016 00:49:32 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Niranjan Dighe <niranjan.dighe@...il.com>
Cc:	Oleg Drokin <oleg.drokin@...el.com>,
	Andreas Dilger <andreas.dilger@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Shivani Bhardwaj <shivanib134@...il.com>,
	Dmitry Eremin <dmitry.eremin@...el.com>,
	Mike Rapoport <mike.rapoport@...il.com>,
	Shraddha Barke <shraddha.6596@...il.com>,
	Frank Zago <fzago@...y.com>,
	Hatice ERTÜRK <haticeerturk27@...il.com>,
	Mike Shuey <shuey@...due.edu>, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org, lustre-devel@...ts.lustre.org
Subject: Re: [PATCH] staging: lustre/lnet: Fix wrong type casting warning
 generated by sparse

On Sat, Feb 13, 2016 at 11:34:35PM +0530, Niranjan Dighe wrote:
> diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c
> index 366211e..64b6a70 100644
> --- a/drivers/staging/lustre/lnet/selftest/console.c
> +++ b/drivers/staging/lustre/lnet/selftest/console.c
> @@ -1461,9 +1461,9 @@ lstcon_statrpc_readent(int transop, srpc_msg_t *msg,
>  
>  	sfwk_stat = (sfw_counters_t __user *)&ent_up->rpe_payload[0];
>  	srpc_stat = (srpc_counters_t __user *)
> -				      ((char *)sfwk_stat + sizeof(*sfwk_stat));
> +				((char __user *)sfwk_stat + sizeof(*sfwk_stat));

This is uglier than necessary.  Do it either like this:

	srpc_stat = (void __user *)sfwk_stat + sizeof(*sfwk_stat);

Or probably it's actually nicer to say:

	srpc_stat = sfwk_stat + 1;

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ