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>] [day] [month] [year] [list]
Date:	Fri, 01 Jun 2012 03:00:20 +0200
From:	Vladimir 'φ-coder/phcoder' Serbinenko 
	<phcoder@...il.com>
To:	Christoph Hellwig <hch@...era.com>,
	Seth Forshee <seth.forshee@...onical.com>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH] Support HFS+ not filling its device completely

Hello, all. My HFS+ previously was on slightly smaller partition
and was subsequently dd'ed to its current location. Mac OS X doesn't
mind and I don't mind losing a little space. However Linux fails to
locate second superblock and hence to mount it. This patch uses
the size field from the first superblock to locate the second.


Signed-off-by: Vladimir Serbinenko <phcoder@...il.com>
---
 fs/hfsplus/wrapper.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 7daf4b8..a7e1268 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -206,6 +206,9 @@ reread:
 		set_bit(HFSPLUS_SB_HFSX, &sbi->flags);
 		/*FALLTHRU*/
 	case cpu_to_be16(HFSPLUS_VOLHEAD_SIG):
+		part_size = (((u64) be32_to_cpu(sbi->s_vhdr->blocksize)
+			      * (u64) be32_to_cpu(sbi->s_vhdr->total_blocks))
+			     >> HFSPLUS_SECTOR_SHIFT);
 		break;
 	case cpu_to_be16(HFSP_WRAP_MAGIC):
 		if (!hfsplus_read_mdb(sbi->s_vhdr, &wd))
-- 
1.7.10

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Download attachment "signature.asc" of type "application/pgp-signature" (295 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ