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: <200905102332.35931.bzolnier@gmail.com>
Date:	Sun, 10 May 2009 23:32:35 +0200
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	Borislav Petkov <petkovbb@...glemail.com>
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/14] ide-atapi: add a buffer-arg to ide_queue_pc_tail

On Saturday 09 May 2009 09:45:25 Borislav Petkov wrote:
> This is in preparation of removing ide_atapi_pc. Expose the buffer as an
> argument to ide_queue_pc_tail with later replacing it with local buffer
> or even kmalloc'ed one if needed due to stack usage constraints.
> 
> Also, add the possibility of passing a NULL-ptr buffer for cmds which
> don't transfer data besides the cdb.
> 
> There should be no functional change resulting from this patch.
> 
> Signed-off-by: Borislav Petkov <petkovbb@...il.com>
> ---
>  drivers/ide/ide-atapi.c        |   12 ++++++------
>  drivers/ide/ide-floppy.c       |   17 ++++++++---------
>  drivers/ide/ide-floppy_ioctl.c |   16 ++++++++--------
>  drivers/ide/ide-tape.c         |   37 ++++++++++++++++++-------------------
>  include/linux/ide.h            |    2 +-
>  5 files changed, 41 insertions(+), 43 deletions(-)

[...]

> @@ -1637,11 +1636,11 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive)
>  {
>  	idetape_tape_t *tape = drive->driver_data;
>  	struct ide_atapi_pc pc;
> -	u8 *caps;
> +	u8 buf[24], *caps;
>  	u8 speed, max_speed;
>  
>  	idetape_create_mode_sense_cmd(&pc, IDETAPE_CAPABILITIES_PAGE);
> -	if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.req_xfer)) {
> +	if (ide_queue_pc_tail(drive, tape->disk, &pc, buf, pc.req_xfer)) {
>  		printk(KERN_ERR "ide-tape: Can't get tape parameters - assuming"
>  				" some default values\n");
>  		tape->blk_size = 512;
> @@ -1650,7 +1649,7 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive)
>  		put_unaligned(6*52, (u16 *)&tape->caps[16]);
>  		return;
>  	}
> -	caps = pc.buf + 4 + pc.buf[3];
> +	caps = buf + 4 + buf[3];

Ideally the above change should also be in the separate patch
(or at least documented in the description of this patch).
--
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