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: <200808061805.01126.bzolnier@gmail.com>
Date:	Wed, 6 Aug 2008 18:05:00 +0200
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	petkovbb@...il.com
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ide-floppy: use scatterlists for pio transfers


Hi,

On Tuesday 05 August 2008, Borislav Petkov wrote:
> Hi Bart,
> 
> here's my first stab at using scatterlists in ide-floppy. I've adapted your
> ide-scsi version to fit in here. The change here is that i use pc->b_count as
> a sort-of completion counter to know when i'm at the end of the sg element and
> be able to switch to the next/finish transfer. I've tested the patch with the
> Iomega ZIP drive i have here - it works. We should do some more testing first
> though, before sending it upstream.

[...]

> @@ -569,7 +577,7 @@ static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy,
>  	memcpy(rq->cmd, pc->c, 12);
>  
>  	pc->rq = rq;
> -	pc->b_count = cmd == READ ? 0 : rq->bio->bi_size;
> +	pc->b_count = 0;
>  	if (rq->cmd_flags & REQ_RW)
>  		pc->flags |= PC_FLAG_WRITING;
>  	pc->buf = NULL;

Don't we also need to zero pc->b_count in idefloppy_blockpc_cmd()?

[ idefloppy_init_pc() clears whole pc so ->b_count assignment
  to zero is not strictly necessary ]

Except that it looks all good, thanks for working on it.
--
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