lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 1 Jun 2009 23:33:23 +0200
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	linux-ide@...r.kernel.org
Cc:	"Andries E. Brouwer" <Andries.Brouwer@....nl>,
	linux-kernel@...r.kernel.org,
	Robert Hancock <hancockrwd@...il.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Frans Pop <elendil@...net.nl>
Subject: Re: [PATCH 4/4] ide: preserve Host Protected Area by default

On Sunday 31 May 2009 16:39:39 Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
> Subject: [PATCH] ide: preserve Host Protected Area by default
> 
> From the perspective of most users of recent systems, disabling Host
> Protected Area (HPA) can break vendor RAID formats, GPT partitions and
> risks corrupting firmware or overwriting vendor system recovery tools.
> 
> Unfortunately the original (kernels < 2.6.30) behavior (unconditionally
> disabling HPA and using full disk capacity) was introduced at the time
> when the main use of HPA was to make the drive look small enough for the
> BIOS to allow the system to boot with large capacity drives.
> 
> Thus to allow the maximum compatibility with the existing setups (using
> HPA and partitioned with HPA disabled) we automatically disable HPA if
> any partitions overlapping HPA are detected.  Additionally HPA can also
> be disabled using the "nohpa" module parameter (i.e. "ide_core.nohpa=0.0"
> to disable HPA on /dev/hda).
> 
> While at it:
> - remove stale "idebus=" entry from Documentation/kernel-parameters.txt
> 
> Cc: Robert Hancock <hancockrwd@...il.com>
> Cc: Frans Pop <elendil@...net.nl>
> Cc: "Andries E. Brouwer" <Andries.Brouwer@....nl>
> Cc: Al Viro <viro@...iv.linux.org.uk>
> [patch description was based on input from Alan Cox and Frans Pop]
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>

v2 interdiff

v2:
Fix ->resume HPA support.
---
 ide-disk.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -u b/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
--- b/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -433,8 +433,11 @@
 		goto out;
 
 	set = ide_disk_hpa_set_capacity(drive, set, lba48);
-	if (set)
+	if (set) {
+		/* needed for ->resume to disable HPA */
+		drive->dev_flags |= IDE_DFLAG_NOHPA;
 		return set;
+	}
 out:
 	return drive->capacity64;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ