Date: Sat, 19 Sep 2009 13:22:11 +0900 (JST) From: Takahashi Yoshihiro <nyan@jp.FreeBSD.org> To: lulf@FreeBSD.org, marcel@FreeBSD.org Cc: current@freebsd.org Subject: Sanitizing a geometry in libdisk Message-ID: <20090919.132211.27814754.nyan@jp.FreeBSD.org>
next in thread | raw e-mail | index | archive | help
----Next_Part(Sat_Sep_19_13_22_11_2009_575)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit The Sanitize_Bios_Geom() is always called after r188408. But the function has a problem of checking a disk size. So it causes to using incorrect geometry. I think that it's the same problem in g_part_bsd_read()@g_part_bsd.c The attached patch is useful for pc98 at least so it should be in 8.0. Please review it. --- TAKAHASHI Yoshihiro <nyan@jp.FreeBSD.org> ----Next_Part(Sat_Sep_19_13_22_11_2009_575)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="l.diff" Index: change.c =================================================================== --- change.c (revision 197322) +++ change.c (working copy) @@ -47,9 +47,11 @@ Sanitize_Bios_Geom(struct disk *disk) if (disk->bios_sect > 63) sane = 0; #endif +#if 0 /* Disable a check on a disk size. It's too strict. */ if (disk->bios_cyl * disk->bios_hd * disk->bios_sect != disk->chunks->size) sane = 0; +#endif if (sane) return; ----Next_Part(Sat_Sep_19_13_22_11_2009_575)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090919.132211.27814754.nyan>