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-next>] [day] [month] [year] [list]
Date:	Sun,  8 Feb 2015 22:27:23 +0100
From:	Adrian Remonda <adrianremonda@...il.com>
To:	unlisted-recipients:; (no To-header on input)
Cc:	Adrian Remonda <adrianremonda@...il.com>,
	Oleg Drokin <oleg.drokin@...el.com>,
	Andreas Dilger <andreas.dilger@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Luca Ceresoli <luca@...aceresoli.net>,
	Anton Saraev <antonysaraev@...il.com>,
	HPDD-discuss@...ts.01.org (moderated list:STAGING - LUSTRE...),
	devel@...verdev.osuosl.org (open list:STAGING SUBSYSTEM),
	linux-kernel@...r.kernel.org (open list)
Subject: Question regarding sparse warning in staging/lustre

Hello,

I'm cleaning the drivers/staging/lustre driver.
I have got the next warning from sparse:

drivers/staging/lustre/lnet/selftest//conctl.c:918:30: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/lustre/lnet/selftest//conctl.c:918:30:    expected void [noderef] <asn:1>*to
drivers/staging/lustre/lnet/selftest//conctl.c:918:30:    got char *ioc_pbuf2

If I add the __user macro as next:

--- a/drivers/staging/lustre/lnet/selftest/conctl.c
+++ b/drivers/staging/lustre/lnet/selftest/conctl.c
@@ -46,7 +46,7 @@
 #include "console.h"
 
 static int
-lst_session_new_ioctl(lstio_session_new_args_t *args)
+lst_session_new_ioctl(lstio_session_new_args_t __user *args)
 {
 	char      *name;
 	int	rc;
 	
The warning turns to:

drivers/staging/lustre/lnet/selftest//conctl.c:825:13: warning: dereference of noderef expression

Now the question:
Is this right or it is just a false warning from sparse? 
Should the __user macro should be also inside the structure fields?

thanks in advance,

Adrian

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ