linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Frost <artusemrys@sbcglobal.net>
To: Jeff Garzik <jeff@garzik.org>
Cc: linux-ide@vger.kernel.org, "zhao,
	forrest" <forrest.zhao@intel.com>,
	htejun@gmail.com, randy_dunlap <rdunlap@xenotime.net>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] ATA host-protected area (HPA) device mapper?
Date: Thu, 08 Jun 2006 23:51:13 -0500	[thread overview]
Message-ID: <4488FE41.9010901@sbcglobal.net> (raw)
In-Reply-To: <4488EE68.9000605@garzik.org>

Jeff Garzik wrote:
> As I just mentioned on linux-ide in another email:
> libata should -- like drivers/ide -- call the ATA "set max" command to 
> fully address the hard drive, including the special "host-protected 
> area" (HPA).  We should do this because the Linux standard is to export 
> the raw hardware directly, making 100% of the hardware capability 
> available to the user (and, in this case, Linux-based BIOS and recovery 
> tools).
> 

Yay for exposing absolute potential functionality; yay for recognizing 
the havok possible, and proposing strategies for channeling that 
possibility.

> However, there are rare bug reports and general paranoia related to 
> presenting 100% of the ATA hard drive "native" space, rather than the 
> possibly-smaller space that the BIOS chose to present to the user.
> 

I've grepped through several old discussions of HPA handling, and it 
doesn't seem like everyone has the same idea of exactly what this will 
do, possibly because of the delta in BIOS behavior over original design 
restrictions.

> My thinking is that [someone] should create an optional, ATA-specific 
> device mapper module.  This module would layer on top of an ATA block 
> device, and present two block devices:  the BIOS-presented space, and 
> the HPA.
> 
> Such a module would make it trivial for users to ensure that partition 
> tables and RAID metadata formats know what the BIOS (rather than 
> underlying hard drive) considers to be end-of-disk.
> 
> Comments?  Questions?  Am I completely insane?  ;-)
> 

Tools with which to lay waste to systems, or save them.

What I like about your proposal is that it doesn't go back to "Do we 
blow away the HPA or reserve it?"; you suggest conserving both options. 
  Make the kernel aware of the existence of the HPA, and thereby the 
whole capacity of the disk, and simultaneously of what it should see and 
expose for usage 'safely'.  Doesn't sound insane to me; it sounds like 
you're planning on [having someone] teach the kernel to respect the 
actual disk limitations.

Whether the implementation will be sane ... 'nother story.  :)  Thence 
the question of teaching userspace to sanely use what is exposed, though 
if the 'old' (non-HPA) space is presented, it shouldn't be a hard 
reorientation.  Would we be talking about a new sysfs entry parallel to 
the existing information?  If I understand it right -- and I might not 
-- the HPA doesn't get included in the partitioning schemes, because it 
is protected.  Even nuking the disk will/should bypass it.  So the 
system will tend to ignore it under normal conditions, until you decide 
to get fancy and trip over its shadow.  So making the kernel aware that 
this disk has this spot that must be respected should be a no-brainer. 
What better way to make the kernel aware of it, than by acknowledging it 
as a block device among other block devices?  It just needs a good 
molly-guard to cover the respect portion of the problem.

Of course, I don't hack ATA, so my opinions may have limited validity 
after a certain level of specificity.  I can always be enlightened as to 
why you really are insane.  ;)

>     Jeff
> 

Matt

  reply	other threads:[~2006-06-09  4:50 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-08  7:30 [RFC] AHCI Command Completion Coalescing(CCC) proposal zhao, forrest
2006-06-08 15:01 ` Jeff Garzik
2006-06-09  2:27   ` zhao, forrest
2006-06-09  3:11     ` Another project for you... :) Jeff Garzik
2006-06-09  3:13       ` zhao, forrest
2006-06-09 22:29         ` Greg Freemyer
2006-06-09 23:44           ` Alan Cox
2006-06-09  3:43       ` [RFC] ATA host-protected area (HPA) device mapper? Jeff Garzik
2006-06-09  4:51         ` Matthew Frost [this message]
2006-06-14  8:01       ` Another project for you... :) zhao, forrest
2006-06-14 15:19         ` Randy.Dunlap
2006-06-15  7:59           ` zhao, forrest
2006-06-15 11:47             ` Jeff Garzik
2006-06-09  3:30     ` [RFC] AHCI Command Completion Coalescing(CCC) proposal Jeff Garzik
2006-06-09  3:39       ` zhao, forrest
2006-06-09  3:43       ` Tejun Heo
2006-06-09  3:47         ` Tejun Heo
2006-06-09  3:51           ` zhao, forrest
2006-06-09  4:12             ` Jeff Garzik
2006-06-09  5:24             ` Tejun Heo
2006-06-09 11:49               ` Jens Axboe
2006-06-09  3:53           ` Jeff Garzik
2006-06-09  3:52         ` Jeff Garzik
2006-06-09 11:49         ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2006-06-09 10:47 [RFC] ATA host-protected area (HPA) device mapper? Etienne Lorrain
2006-06-09 14:48 ` Jeff Garzik
2006-06-09 17:22 ` Alan Cox
2006-06-10 11:56   ` Etienne Lorrain
2006-06-11 15:48     ` Arjan van de Ven
2006-06-13 10:00   ` Etienne Lorrain
2006-06-09 20:41 Etienne Lorrain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4488FE41.9010901@sbcglobal.net \
    --to=artusemrys@sbcglobal.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=forrest.zhao@intel.com \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).