From owner-svn-src-head@freebsd.org Wed Dec 6 18:15:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4481FE880FA; Wed, 6 Dec 2017 18:15:46 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB66F7CF28; Wed, 6 Dec 2017 18:15:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22d.google.com with SMTP id x20so5293101lff.1; Wed, 06 Dec 2017 10:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FUBdHa+zIai9Hm9dMDNke1pRB9Xe5eTPNU7YOyX28xQ=; b=kQB47EN8TgrgGVAlJqBOGeB9MUpcnDlZ+DP/903oo4x+5zmNzG9k6I6ByyPw/2mD5D ogaq91BU4D7+lx2EVrOquQOAX59R4bVSByw0h5N/eEaIumZZJHtpYz4Q+LAm3OHxhEov xnwDX9bw6atVlnkgICWuiTiAH1JZhuBVeXwyL81XHCu3vus8ONh/1ulsqglQVVnQskNh dSfU3Npw9SRWqiIqHORo2RpEFm1VGOPhGXV6JkromuhZzKJemgFK8+mBfWURXM524AgZ QLVJkV+L40VQbwl4ghqNV/R/WL4xpGzZMk6QeIN1ROh4cT5tTOHzqoVPjDX/FsT1xqFU wTfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=FUBdHa+zIai9Hm9dMDNke1pRB9Xe5eTPNU7YOyX28xQ=; b=RANrjOao/vyZZtLpuxPuCV+CBpCF9KTvG4TI19rsSQziY1iNiqZYcGR8L11plPdi9h UnulgqgRmtAKXu4RJmPMCBEmnBFwiEVXKKZTevj/IqKLffxvyzzuzIO2cWzMzZyfTnYN +p8tv9kQwJ5H6U+lmFxK9DTJnb4xzcQ5wvGSX5R2ZXV67OwXAxi56v+bo6eu+dBHNKkN SppnLLdTSz5C/uFjYF9SuMRO+76KI3EWWTiFULbfdNiuZywn+6dtnkcaxLe0LM83XRU4 Nat6Nqtg2dkBYNvIuTgN1e/HpDBaVujpqFDW2MrX3mPjyHgT4Xq/LaYCGOedAyqKc/j8 lUNw== X-Gm-Message-State: AJaThX7KGFYrCRvt+00uJN1LgdaabdaiRvj3yKdWZNBP3ETcasPi8jDo o2LCZPgfCqBBMdZ25R1JKwMLZIMXuLKtrTDCgeI= X-Google-Smtp-Source: AGs4zMaGtJ4WaTEvtHZPBTqdGSvf3JOYr1tjIV07N7rYyprVlydC1IPwSLzSUWG9l0AN+lRKHOQbBb5zZNNP0pWrgJw= X-Received: by 10.46.41.25 with SMTP id u25mr14475177lje.130.1512584143360; Wed, 06 Dec 2017 10:15:43 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.76.19 with HTTP; Wed, 6 Dec 2017 10:15:42 -0800 (PST) In-Reply-To: References: <201712061701.vB6H1PDN011394@repo.freebsd.org> From: Alan Somers Date: Wed, 6 Dec 2017 11:15:42 -0700 X-Google-Sender-Auth: 4-M0yez-gVBFntNImCzaejLoIUk Message-ID: Subject: Re: svn commit: r326624 - head/sys/cam/ata To: Ravi Pokala Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 18:15:46 -0000 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 wrote: > > ... disks of >=1TiB that still use CHS addressing. > > Out of morbid curiosity, are there any such monstrosities? > > -Ravi (rpokala@) > > -----Original Message----- > From: on behalf of Alan Somers > > Date: 2017-12-06, Wednesday at 09:01 > To: , , < > 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); > > > > >