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]
Message-ID: <20161019083224.GE4469@mwanda>
Date:   Wed, 19 Oct 2016 11:32:24 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Ryan Swan <ryan@...nswan.com>, LinoSanfilippo@....de
Cc:     devel@...verdev.osuosl.org, amarjargal.gundjalam@...il.com,
        janani.rvchndrn@...il.com, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org, liodot@...il.com,
        kevin.m.wern@...il.com, LinoSanfilippo@....de,
        charrer@...critech.com, aquannie@...il.com
Subject: Re: [PATCH] staging: slicoss.ko: slicoss.c: Fixed incorrect argument
 type

On Tue, Oct 18, 2016 at 02:03:31PM -0400, Ryan Swan wrote:
> sparse produced
> warning: incorrect type in argument 2 (different address spaces)
> expected void const volatile [noderef] <asn:2>*src
> got struct slic_stats *stats
> 
> casting argument 2 to what is expected by memcpy_fromio() fixed this
> 
> Signed-off-by: Ryan Swan <ryan@...nswan.com>
> ---
>  drivers/staging/slicoss/slicoss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
> index 2802b90..7c6feb1 100644
> --- a/drivers/staging/slicoss/slicoss.c
> +++ b/drivers/staging/slicoss/slicoss.c
> @@ -1057,7 +1057,7 @@ static void slic_upr_request_complete(struct adapter *adapter, u32 isr)
>  		if (stats->rcv_drops > old->rcv_drops)
>  			adapter->rcv_drops += (stats->rcv_drops -
>  					       old->rcv_drops);
> -		memcpy_fromio(old, stats, sizeof(*stats));
> +		memcpy_fromio(old, (void __iomem *)stats, sizeof(*stats));

This should probably just be memcpy().  Introduced in commit fdb777751278
("staging: slicoss: improve implementation concerning the shared memory").

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ