* Host protected area on suspend/resume
@ 2005-07-12 11:30 Matthew Garrett
2005-07-12 14:49 ` Tejun Heo
0 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2005-07-12 11:30 UTC (permalink / raw)
To: linux-ide, B.Zolnierkiewicz
On boot, Linux will attempt to disable the host protected area on a
disk. After a suspend/resume cycle, the BIOS may reenable it (seen on a
Thinkpad T40 and R40). As a result, the kernel is now unable to access
the HPA.
Is there any issue with just adding a call to idedisk_check_hpa() in the
IDE resume code?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Host protected area on suspend/resume
2005-07-12 11:30 Host protected area on suspend/resume Matthew Garrett
@ 2005-07-12 14:49 ` Tejun Heo
2005-07-12 15:07 ` Matthew Garrett
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Tejun Heo @ 2005-07-12 14:49 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-ide, B.Zolnierkiewicz
Matthew Garrett wrote:
> On boot, Linux will attempt to disable the host protected area on a
> disk. After a suspend/resume cycle, the BIOS may reenable it (seen on a
> Thinkpad T40 and R40). As a result, the kernel is now unable to access
> the HPA.
>
> Is there any issue with just adding a call to idedisk_check_hpa() in the
> IDE resume code?
This has come up several times now. One thing I'm curious about is
why we are disabling HPA on boot without consent from the user. AFAIK,
HPA is mostly used to implement hidden recovery/suspend storage areas
and disabling automatically on boot increases the likeliness of
destroying them. What do we gain by disabling HPA on boot? Are there
some dumb machines which unnecessarily sets HPA and reduces the capacity
of drives excessively? Even in such cases, wouldn't it be better to do
idedisk_check_hpa() only when kernel parameter explicitly says so?
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Host protected area on suspend/resume
2005-07-12 14:49 ` Tejun Heo
@ 2005-07-12 15:07 ` Matthew Garrett
2005-07-12 15:15 ` Tejun Heo
2005-07-12 15:23 ` Greg Freemyer
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2005-07-12 15:07 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide, B.Zolnierkiewicz
On Tue, Jul 12, 2005 at 11:49:35PM +0900, Tejun Heo wrote:
> This has come up several times now. One thing I'm curious about is
> why we are disabling HPA on boot without consent from the user. AFAIK,
> HPA is mostly used to implement hidden recovery/suspend storage areas
> and disabling automatically on boot increases the likeliness of
> destroying them. What do we gain by disabling HPA on boot? Are there
> some dumb machines which unnecessarily sets HPA and reduces the capacity
> of drives excessively? Even in such cases, wouldn't it be better to do
> idedisk_check_hpa() only when kernel parameter explicitly says so?
I'm not sure why we're doing it, but reverting this behaviour is likely
to make some systems unbootable (install with kernel which disables HPA,
format entire drive, put filesystem on it).
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Host protected area on suspend/resume
2005-07-12 15:07 ` Matthew Garrett
@ 2005-07-12 15:15 ` Tejun Heo
0 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2005-07-12 15:15 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-ide, B.Zolnierkiewicz
Matthew Garrett wrote:
> On Tue, Jul 12, 2005 at 11:49:35PM +0900, Tejun Heo wrote:
>
>
>> This has come up several times now. One thing I'm curious about is
>>why we are disabling HPA on boot without consent from the user. AFAIK,
>>HPA is mostly used to implement hidden recovery/suspend storage areas
>>and disabling automatically on boot increases the likeliness of
>>destroying them. What do we gain by disabling HPA on boot? Are there
>>some dumb machines which unnecessarily sets HPA and reduces the capacity
>>of drives excessively? Even in such cases, wouldn't it be better to do
>>idedisk_check_hpa() only when kernel parameter explicitly says so?
>
>
> I'm not sure why we're doing it, but reverting this behaviour is likely
> to make some systems unbootable (install with kernel which disables HPA,
> format entire drive, put filesystem on it).
Yeah... it will immediately make disks unusable. sad, sad.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Host protected area on suspend/resume
2005-07-12 14:49 ` Tejun Heo
2005-07-12 15:07 ` Matthew Garrett
@ 2005-07-12 15:23 ` Greg Freemyer
2005-07-13 4:28 ` Grant Coady
2005-07-13 11:25 ` Sergey Vlasov
3 siblings, 0 replies; 7+ messages in thread
From: Greg Freemyer @ 2005-07-12 15:23 UTC (permalink / raw)
To: Tejun Heo; +Cc: Matthew Garrett, linux-ide, B.Zolnierkiewicz
On 7/12/05, Tejun Heo wrote:
> Matthew Garrett wrote:
> > On boot, Linux will attempt to disable the host protected area on a
> > disk. After a suspend/resume cycle, the BIOS may reenable it (seen on a
> > Thinkpad T40 and R40). As a result, the kernel is now unable to access
> > the HPA.
> >
> > Is there any issue with just adding a call to idedisk_check_hpa() in the
> > IDE resume code?
>
> This has come up several times now. One thing I'm curious about is
> why we are disabling HPA on boot without consent from the user. AFAIK,
> HPA is mostly used to implement hidden recovery/suspend storage areas
> and disabling automatically on boot increases the likeliness of
> destroying them. What do we gain by disabling HPA on boot? Are there
> some dumb machines which unnecessarily sets HPA and reduces the capacity
> of drives excessively? Even in such cases, wouldn't it be better to do
> idedisk_check_hpa() only when kernel parameter explicitly says so?
>
> --
> tejun
Crawling out from under my rock, I agree with Tejun.
Always enabling access to HPA seems very strange.
It also eliminates the ability to use the IDE Offset feature. IIUC,
the offset feature is a boolean flag that, when true, basically tells
the drive that all LBA references are into the HPA area.
By using the HPA in conjunction with the Offset flag, one has the
ability to have two complete disk layouts. Each could have its own
boot sector, partition table, and partitions. I have never used this
feature, but I do have DOS based tools that supposidely control the
HPA config. and the state of the offset boolean.
I routinely perform "forensic image aquires". Normally that is a
simple "dd if=/dev/hdx.....".
For me the untlimate would be to have Linux support for something like:
disable offset
dd normal sectors
enable offset
dd hpa sectors
That way I capture the areas as seperate images and if 2 boot sectors,
partition tables, partitions etc. exist I can analyse them seperately.
Conclusion, automatically overriding HPA seems to be outside of the
normal Linux way of doing things. At a minimum, there should be a
flag to prevent it from happening. If it is needed there are existing
userspace linux tools that can modify the HPA config.
FYI: In addition to HPA potentially reducing usable disk size, the
size can also be artificially reduced via DCO. I am not aware of any
Linux tools for addressing/eliminating artificial DCO restrictions.
Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Host protected area on suspend/resume
2005-07-12 14:49 ` Tejun Heo
2005-07-12 15:07 ` Matthew Garrett
2005-07-12 15:23 ` Greg Freemyer
@ 2005-07-13 4:28 ` Grant Coady
2005-07-13 11:25 ` Sergey Vlasov
3 siblings, 0 replies; 7+ messages in thread
From: Grant Coady @ 2005-07-13 4:28 UTC (permalink / raw)
To: Tejun Heo; +Cc: Matthew Garrett, linux-ide, B.Zolnierkiewicz
On Tue, 12 Jul 2005 23:49:35 +0900, Tejun Heo <htejun@gmail.com> wrote:
>Matthew Garrett wrote:
>> On boot, Linux will attempt to disable the host protected area on a
>> disk. After a suspend/resume cycle, the BIOS may reenable it (seen on a
...
> This has come up several times now. One thing I'm curious about is
>why we are disabling HPA on boot without consent from the user. AFAIK,
>HPA is mostly used to implement hidden recovery/suspend storage areas
>and disabling automatically on boot increases the likeliness of
>destroying them. What do we gain by disabling HPA on boot?
It simply implies one _must_not_ use linux-kernel 2.6 to prepare IDE
drives, stay with 2.4 series for drive preparation until the bug is
fixed.
I'd noticed the issue but ignored it as I still setup systems with
2.4 prior to installing 2.6.
--Grant.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Host protected area on suspend/resume
2005-07-12 14:49 ` Tejun Heo
` (2 preceding siblings ...)
2005-07-13 4:28 ` Grant Coady
@ 2005-07-13 11:25 ` Sergey Vlasov
3 siblings, 0 replies; 7+ messages in thread
From: Sergey Vlasov @ 2005-07-13 11:25 UTC (permalink / raw)
To: Tejun Heo; +Cc: Matthew Garrett, linux-ide, B.Zolnierkiewicz
[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]
On Tue, 12 Jul 2005 23:49:35 +0900 Tejun Heo wrote:
> Matthew Garrett wrote:
> > On boot, Linux will attempt to disable the host protected area on a
> > disk. After a suspend/resume cycle, the BIOS may reenable it (seen on a
> > Thinkpad T40 and R40). As a result, the kernel is now unable to access
> > the HPA.
> >
> > Is there any issue with just adding a call to idedisk_check_hpa() in the
> > IDE resume code?
>
> This has come up several times now. One thing I'm curious about is
> why we are disabling HPA on boot without consent from the user. AFAIK,
> HPA is mostly used to implement hidden recovery/suspend storage areas
> and disabling automatically on boot increases the likeliness of
> destroying them. What do we gain by disabling HPA on boot? Are there
> some dumb machines which unnecessarily sets HPA and reduces the capacity
> of drives excessively? Even in such cases, wouldn't it be better to do
> idedisk_check_hpa() only when kernel parameter explicitly says so?
Support for disabling HPA during boot is needed mainly for old
machines with BIOS limitations. Some disks have jumpers which limit
capacity to 32 GB, so that such old BIOSes can recognize the disk
without hanging at boot; disabling HPA gives access to the whole
capacity.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-07-13 11:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 11:30 Host protected area on suspend/resume Matthew Garrett
2005-07-12 14:49 ` Tejun Heo
2005-07-12 15:07 ` Matthew Garrett
2005-07-12 15:15 ` Tejun Heo
2005-07-12 15:23 ` Greg Freemyer
2005-07-13 4:28 ` Grant Coady
2005-07-13 11:25 ` Sergey Vlasov
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).