Date: Wed, 6 Dec 2017 11:15:42 -0700 From: Alan Somers <asomers@freebsd.org> To: Ravi Pokala <rpokala@mac.com> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r326624 - head/sys/cam/ata Message-ID: <CAOtMX2iF5qDDfNmKecU1P9FFdSrvy0kF70zh9dkTuECw-zEjHA@mail.gmail.com> In-Reply-To: <E4118711-5BEB-4BDB-A0D0-B35EC8ABBE5A@mac.com> References: <201712061701.vB6H1PDN011394@repo.freebsd.org> <E4118711-5BEB-4BDB-A0D0-B35EC8ABBE5A@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Nope. The ATA spec prohibited them, and nobody ever manufactured any. But you might be able to fake one with CTL or QEMU or something similar. On Wed, Dec 6, 2017 at 10:11 AM, Ravi Pokala <rpokala@mac.com> wrote: > > ... disks of >=1TiB that still use CHS addressing. > > Out of morbid curiosity, are there any such monstrosities? <barf> > > -Ravi (rpokala@) > > -----Original Message----- > From: <owner-src-committers@freebsd.org> on behalf of Alan Somers > <asomers@FreeBSD.org> > Date: 2017-12-06, Wednesday at 09:01 > To: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, < > svn-src-head@freebsd.org> > Subject: svn commit: r326624 - head/sys/cam/ata > > Author: asomers > Date: Wed Dec 6 17:01:25 2017 > New Revision: 326624 > URL: https://svnweb.freebsd.org/changeset/base/326624 > > Log: > cam: fix sign-extension error in adagetparams > > adagetparams contains a sign-extension error that will cause the sector > count to be incorrectly calculated for ATA disks of >=1TiB that still use > CHS addressing. Disks using LBA48 addressing are unaffected. > > Reported by: Coverity > CID: 1007296 > Reviewed by: ken > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > Differential Revision: https://reviews.freebsd.org/D13198 > > Modified: > head/sys/cam/ata/ata_da.c > > Modified: head/sys/cam/ata/ata_da.c > ============================================================ > ================== > --- head/sys/cam/ata/ata_da.c Wed Dec 6 14:53:53 2017 (r326623) > +++ head/sys/cam/ata/ata_da.c Wed Dec 6 17:01:25 2017 (r326624) > @@ -3377,7 +3377,8 @@ adagetparams(struct cam_periph *periph, struct > ccb_get > dp->heads = cgd->ident_data.heads; > dp->secs_per_track = cgd->ident_data.sectors; > dp->cylinders = cgd->ident_data.cylinders; > - dp->sectors = cgd->ident_data.cylinders * dp->heads * > dp->secs_per_track; > + dp->sectors = cgd->ident_data.cylinders * > + (u_int32_t)(dp->heads * dp->secs_per_track); > } > lbasize = (u_int32_t)cgd->ident_data.lba_size_1 | > ((u_int32_t)cgd->ident_data.lba_size_2 << 16); > > > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iF5qDDfNmKecU1P9FFdSrvy0kF70zh9dkTuECw-zEjHA>