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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 27 Jun 2012 08:49:49 +0100
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Cong Meng <mc@...ux.vnet.ibm.com>
Cc:	stefanha@...ux.vnet.ibm.com, linuxram@...ibm.com,
	linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH] SCSI: Fix BLKSECTGET ioctl of sg device caculation
 mistake.

On Wed, 2012-06-27 at 15:29 +0800, Cong Meng wrote:
> Fix BLKSECTGET ioctl of sg device caculation mistake.
> 
> Signed-off-by: Cong Meng <mc@...ux.vnet.ibm.com>
> ---
>  drivers/scsi/sg.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index eacd46b..c424602 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -1070,7 +1070,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
>  			return -ENODEV;
>  		return scsi_ioctl(sdp->device, cmd_in, p);
>  	case BLKSECTGET:
> -		return put_user(queue_max_sectors(sdp->device->request_queue) * 512,
> +		return put_user(queue_max_sectors(sdp->device->request_queue),

Really, no.  This would break all existing user of the ioctl.

Even if you can find a document somewhere that says BLKSECTGET should
return sectors instead of bytes, we have to go with the ABI we've been
exporting for decades and fix up the document.

James


--
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