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] [day] [month] [year] [list]
Date:	Wed, 18 Feb 2009 21:38:14 +0100
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	Sergei Shtylyov <sshtylyov@...mvista.com>
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
	Borislav Petkov <petkovbb@...il.com>
Subject: Re: [PATCH] ide-cd: document capacity hack

On Wednesday 18 February 2009, Sergei Shtylyov wrote:
> Hello.
> 
> Bartlomiej Zolnierkiewicz wrote:
> 
> > Just copy the comment from drivers/scsi/sr.c::sr_done()
> > (from which the capacity hack has been originated).
> 
> > Cc: Borislav Petkov <petkovbb@...il.com>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> 
> Acked-by: Sergei Shtylyov <sshtylyov@...mvista.com>
> 
> > Index: b/drivers/ide/ide-cd.c
> > ===================================================================
> > --- a/drivers/ide/ide-cd.c
> > +++ b/drivers/ide/ide-cd.c
> > @@ -189,6 +189,14 @@ static void cdrom_analyze_sense_data(ide
> >  			bio_sectors = max(bio_sectors(failed_command->bio), 4U);
> >  			sector &= ~(bio_sectors - 1);
> >  
> > +			/*
> > +			 * The SCSI specification allows for the value
> > +			 * returned by READ CAPACITY to be up to 75 2K
> > +			 * sectors past the last readable block.
> 
>     Oh horror... :-)
> 
> > +			 * Therefore, if we hit a medium error within the
> > +			 * last 75 2K sectors, we decrease the saved size
> > +			 * value.
> > +			 */
> >  			if (sector < get_capacity(info->disk) &&
> >  			    drive->probed_capacity - sector < 4 * 75)
> >  				set_capacity(info->disk, sector);
> 
>     Would be nice if the CHS capacity workround was finally documented too? ;-)

Send patches.  I have my hands full of work...
--
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