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: <20071027201700.GC22235@flint.arm.linux.org.uk>
Date:	Sat, 27 Oct 2007 21:17:00 +0100
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	Al Viro <viro@....linux.org.uk>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>, axboe@...nel.dk,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scatterlist fallout: drivers/scsi/arm/

On Sat, Oct 27, 2007 at 07:44:04PM +0100, Al Viro wrote:
> 
> Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> ---
> diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
> index 21ba571..2d09fef 100644
> --- a/drivers/scsi/arm/scsi.h
> +++ b/drivers/scsi/arm/scsi.h
> @@ -39,7 +39,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
>  		SCp->buffer++;
>  		SCp->buffers_residual--;
>  		SCp->ptr = (char *)
> -			 (page_address(SCp->buffer->page) +
> +			 (page_address(sg_page(SCp->buffer)) +
>  			  SCp->buffer->offset);
>  		SCp->this_residual = SCp->buffer->length;
>  	} else {
> @@ -77,7 +77,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
>  		SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
>  		SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
>  		SCpnt->SCp.ptr = (char *)
> -			 (page_address(SCpnt->SCp.buffer->page) +
> +			 (page_address(sg_page(SCpnt->SCp.buffer)) +
>  			  SCpnt->SCp.buffer->offset);
>  		SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
>  		SCpnt->SCp.phase = SCpnt->request_bufflen;

FYI, here's what I have queued (cut'n'pasted so probably won't apply):

diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
index 21ba571..bb6550e 100644
--- a/drivers/scsi/arm/scsi.h
+++ b/drivers/scsi/arm/scsi.h
@@ -38,9 +38,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
        if (ret) {
                SCp->buffer++;
                SCp->buffers_residual--;
-               SCp->ptr = (char *)
-                        (page_address(SCp->buffer->page) +
-                         SCp->buffer->offset);
+               SCp->ptr = sg_virt(SCp->buffer);
                SCp->this_residual = SCp->buffer->length;
        } else {
                SCp->ptr = NULL;
@@ -76,9 +74,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)

                SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
                SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
-               SCpnt->SCp.ptr = (char *)
-                        (page_address(SCpnt->SCp.buffer->page) +
-                         SCpnt->SCp.buffer->offset);
+               SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer);
                SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
                SCpnt->SCp.phase = SCpnt->request_bufflen;



-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
-
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