Do NOT disable HPA by default -> leads to data loss
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Andy Whitcroft |
Bug Description
Binary package hint: linux-image-
Unlocking HPA for everybody is bad because:
a) BIOS -> Bootloader can not access data behind the HPA -> will lead to bootloader problems when the Linux partition with the kernel/bootloader is behind the unlocked area.
b) In most cases HPA problems are caused by the user itself, There are jumpers on the hd, which can be used to activate HPA. That is not needed in most cases, usually a 32 GB limit called. Unskilled users place the jumpers mirror inverted and that often leads to that problem. Just tell the user to check jumpers.
c) Virtual BIOS solutions - like GigaByte motherboards use
This is absolutely CRITICAL. When the hd is unlocked and fully used new GigaByte boards tend to write 1.5 MB at the end of IDE or SATA drives in legacy mode as BIOS backup. Then HPA is activated, every OS has to respect this otherwise it will definitely overwrite data. That's usally not directly visable for the user, but it definitely happens. Depending of the filesystem used for the partition using that last mb will immediately kill data or it will take time till it is filled, but corruption is inevitable.
d) Fake RAID boot problems
Usually when one or more hd activated hpa because of c) or other reasons are used to create a RAID will fail after booting because the hpa unlock status is presistent after reboot. The only solution is to completely powerdown the system. That happens with my raid setup which could be accessed using dmraid without problems as long as HPA is NOT unlocked. I when you look at dmraid errors with HPA then you will read about users with GigaByte boards.
Even if you do not write anything onto the hd, next reboot fails just because a Ubuntu live image was booted Can you image what a person would think when you see RAID failed on next boot? I am sure it is nothing positive.
-> Leave the kernel default for libata and do NOT disable HPA. For the minority of users which are not in case 1 to 4 and which can not use a tool to disable HPA tell em the kernel option how to deactivate it.
Btw. if you wonder why there are systems out there with a 128 GB HPA limit, that's a Win2000 install restriction. If your hd would be bigger then you will get data corruption. Those users can use software tools to remove the HPA easyly if they do not want to install that old system again.
security vulnerability: | yes → no |
visibility: | private → public |
Changed in linux (Ubuntu): | |
assignee: | nobody → Andy Whitcroft (apw) |
status: | New → In Progress |
importance: | Undecided → Medium |
This report is referring to the commit below:
commit abc55974c570b03 7c04d33b32f269c d9e9f11bee
Author: Scott James Remnant <email address hidden>
Date: Tue Mar 3 14:20:01 2009 +0000
UBUNTU: SAUCE: libata: Ignore HPA by default.
This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated. This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.
In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.
Signed-off-by: Scott James Remnant <email address hidden>
Signed-off-by: Tim Gardner <email address hidden>