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: <1382910886.2994.52.camel@deadeye.wl.decadent.org.uk>
Date:	Sun, 27 Oct 2013 21:54:46 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Anil Ravindranath <anil_ravindranath@...-sierra.com>,
	"James E.J. Bottomley" <JBottomley@...allels.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>
Subject: [PATCH 8/8] [SCSI] pmcraid: Pass pointers to access_ok(), not
 integers

Most architectures define access_ok() as a macro that casts its
argument such that an argument of type unsigned long will be accepted
without complaint.  However, the proper type is void *, and passing
unsigned long results in a warning on sparc64.

Compile-tested only.

Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
 drivers/scsi/pmcraid.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 1eb7b028..4e0a2f3 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -3794,7 +3794,8 @@ static long pmcraid_ioctl_passthrough(
 	}
 
 	if (request_size > 0) {
-		rc = access_ok(access, arg, request_offset + request_size);
+		rc = access_ok(access, (void *)arg,
+			       request_offset + request_size);
 
 		if (!rc) {
 			rc = -EFAULT;

-- 
Ben Hutchings
If at first you don't succeed, you're doing about average.

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ