From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 3 20:07:02 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 862D216A4F5 for ; Thu, 3 Aug 2006 20:07:02 +0000 (UTC) (envelope-from rik@inse.ru) Received: from mail.inse.ru (inse.ru [144.206.128.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F7BE43D76 for ; Thu, 3 Aug 2006 20:07:01 +0000 (GMT) (envelope-from rik@inse.ru) Received: from [127.0.0.1] (www.inse.ru [144.206.128.1]) by mail.inse.ru (Postfix) with ESMTP id 9924833C66 for ; Fri, 4 Aug 2006 00:06:59 +0400 (MSD) Message-ID: <44D2590A.7020100@inse.ru> Date: Fri, 04 Aug 2006 00:14:02 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.12) Gecko/20060103 ASPLinux/1.7.12-1.5.1.1asp X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 03 Aug 2006 23:24:24 +0000 Cc: Subject: [Fwd: bsdlabel: potential bug and/or question about it] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 20:07:02 -0000 Forwarded to hackers since no reply on geom@ Hi, I am trying to understand filesystem structure to extract data from half-broken hard drive and I've started to read sources of bsdlabel (if someone know any articles about bsdlabel and/or ufs2 structure please let me know). My question is what for mbroffset and what is it? I have only some surmises about it, but it looks that this code could lead to filesystem corruption. But I hope I am wrong :-) http://cvsup.pt.freebsd.org/cgi-bin/cvsweb/cvsweb.cgi/src/sbin/bsdlabel/bsdlabel.c.diff?r1=1.89&r2=1.90 My train of thought was that in case we have the mbroffset not equal to offset of c (raw) partition we wouldn't substruct mbroffset from all offsets. Lets also assume that this case we meet while we started to edit such slice. We've finished editing and started to write results. In case of write we would add mbroffset unconditionally and thus we get wrong offsets and corrupted partition table. Best regards, rik _______________________________________________ freebsd-geom@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-geom To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org"