From owner-freebsd-geom@FreeBSD.ORG Mon Dec 27 10:34:30 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3106C16A4CF for ; Mon, 27 Dec 2004 10:34:30 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id B796543D5A for ; Mon, 27 Dec 2004 10:34:29 +0000 (GMT) (envelope-from abelousov@gmail.com) Received: by rproxy.gmail.com with SMTP id c16so202324rne for ; Mon, 27 Dec 2004 02:34:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=UmW2m7FawS0oxkkCgd/LhTL3Y4knExfbd/20/oAj6naRwf5Q105eG0VkskjeJo3ZVCLP9hXgIu2xILQmXfRfdp7is2CGYdGNRTVEgX0/WhwdjQ98IboU993rvK5gKQD/JhhXu9u/NMjuP69TdZYX+6LKt4lWNH19VSGCSzfnkk4= Received: by 10.38.151.48 with SMTP id y48mr466222rnd; Mon, 27 Dec 2004 02:34:29 -0800 (PST) Received: by 10.38.151.70 with HTTP; Mon, 27 Dec 2004 02:34:29 -0800 (PST) Message-ID: <2ff9b55d0412270234634d2e96@mail.gmail.com> Date: Mon, 27 Dec 2004 15:34:29 +0500 From: Alexey Belousov To: freebsd-qa@freebsd.org, freebsd-geom@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: 5.3 LiveCD fixit shell geom(8) environment broken? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: c0x@daemon.pp.ru List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Dec 2004 10:34:30 -0000 hi All, recently, I played with geom in fixit shell and found some oddity: Fixit# geom mirror load Command 'load' not available. Fixit# sysctl kern.module_path kern.module_path: /boot/kernel;/boot/modules Fixit# ls -la /boot/kernel/ ls: /boot/kernel/: No such file or directory Fixit# ln -s /mnt2/boot/kernel /boot/ Fixit# geom mirror load -v Module available. Done. Fixit# geom mirror dump da0 Unknown command: dump usage: geom mirror help geom mirror list geom mirror load [-v] geom mirror unload [-v] Fixit# ldd `which geom` /mnt2/sbin/geom: libgeom.so.2 => /mnt2/lib/libgeom.so.2 (0x28078000) libsbuf.so.2 => /mnt2/lib/libsbuf.so.2 (0x2807c000) libbsdxml.so.1 => /mnt2/lib/libbsdxml.so.1 (0x2807e000) libutil.so.4 => /mnt2/lib/libutil.so.4 (0x2809d000) libc.so.5 => /mnt2/lib/libc.so.5 (0x280a9000) Fixit# ln -s /mnt2/lib / Fixit# geom mirror dump da0 Metadata on da0: magic: GEOM::MIRROR version: 1 <---snip---> Fixit# Summary: 1. missing geom_*.ko / invalid kern.module_path fix: sysctl kern.module_path=`sysctl -n kern.module_path`\;/mnt2/boot/kernel or simply ln -s /mnt2/boot/kernel /boot/ 2. missing necessary libs in /lib (hardcoded path?) fix: ln -s /mnt2/lib / ----------- cheers, From owner-freebsd-geom@FreeBSD.ORG Wed Dec 29 04:30:11 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6008516A4CE; Wed, 29 Dec 2004 04:30:11 +0000 (GMT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A7FB43D49; Wed, 29 Dec 2004 04:30:11 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id EF76472DD4; Tue, 28 Dec 2004 20:30:10 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id EDB0A72DCB; Tue, 28 Dec 2004 20:30:10 -0800 (PST) Date: Tue, 28 Dec 2004 20:30:10 -0800 (PST) From: Doug White To: c0x@daemon.pp.ru In-Reply-To: <2ff9b55d0412270234634d2e96@mail.gmail.com> Message-ID: <20041228202524.M49504@carver.gumbysoft.com> References: <2ff9b55d0412270234634d2e96@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-geom@freebsd.org cc: freebsd-qa@freebsd.org Subject: Re: 5.3 LiveCD fixit shell geom(8) environment broken? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 04:30:11 -0000 On Mon, 27 Dec 2004, Alexey Belousov wrote: > hi All, > > recently, I played with geom in fixit shell and found some oddity: > > Fixit# geom mirror load > Command 'load' not available. > Fixit# sysctl kern.module_path > kern.module_path: /boot/kernel;/boot/modules > Fixit# ls -la /boot/kernel/ > ls: /boot/kernel/: No such file or directory > Fixit# ln -s /mnt2/boot/kernel /boot/ > Fixit# geom mirror load -v > Module available. > Done. This is making a rather dangerous assumption -- that the installed kernel in /mnt2/boot/kernel is binary-compatible with the GENERIC kernel from the CD you started the fixit enviornment from. Its not something that could be enabled in the general case. Of course if you know they are compatible (i.e., 5.3-RELEASE CD for a 5.3-RELEASE system) you could have just loaded the module manually: kldload /mnt2/boot/kernel/geom_mirror.ko instead of the symlink fiddling. Or updated the module path even. > Fixit# geom mirror dump da0 > Unknown command: dump > usage: geom mirror help > geom mirror list > geom mirror load [-v] > geom mirror unload [-v] > Fixit# ldd `which geom` > /mnt2/sbin/geom: > libgeom.so.2 => /mnt2/lib/libgeom.so.2 (0x28078000) > libsbuf.so.2 => /mnt2/lib/libsbuf.so.2 (0x2807c000) > libbsdxml.so.1 => /mnt2/lib/libbsdxml.so.1 (0x2807e000) > libutil.so.4 => /mnt2/lib/libutil.so.4 (0x2809d000) > libc.so.5 => /mnt2/lib/libc.so.5 (0x280a9000) > Fixit# ln -s /mnt2/lib / > Fixit# geom mirror dump da0 > Metadata on da0: > magic: GEOM::MIRROR > version: 1 > <---snip---> > Fixit# > > Summary: > 1. missing geom_*.ko / invalid kern.module_path > fix: sysctl kern.module_path=`sysctl -n kern.module_path`\;/mnt2/boot/kernel > or simply ln -s /mnt2/boot/kernel /boot/ The sysctl change is preferred. > 2. missing necessary libs in /lib (hardcoded path?) > fix: ln -s /mnt2/lib / or preferably 'ldconfig -m /mnt2/lib'. Again there is a compatibility issue that would make this unsafe to do automatically. Were you able to test if the geom command works properly, without any sysctl or symlink fiddling, if you choose to mount disc #2? That should provide all the necessary pieces without having to pick them out of the installed system. -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org From owner-freebsd-geom@FreeBSD.ORG Wed Dec 29 09:51:09 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 783BD16A4CE; Wed, 29 Dec 2004 09:51:09 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0941C43D2D; Wed, 29 Dec 2004 09:51:09 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 10C0FACB34; Wed, 29 Dec 2004 10:51:02 +0100 (CET) Date: Wed, 29 Dec 2004 10:51:02 +0100 From: Pawel Jakub Dawidek To: Doug White Message-ID: <20041229095102.GA2846@darkness.comp.waw.pl> References: <2ff9b55d0412270234634d2e96@mail.gmail.com> <20041228202524.M49504@carver.gumbysoft.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <20041228202524.M49504@carver.gumbysoft.com> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-qa@freebsd.org cc: c0x@daemon.pp.ru cc: freebsd-geom@freebsd.org Subject: Re: 5.3 LiveCD fixit shell geom(8) environment broken? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 09:51:09 -0000 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 28, 2004 at 08:30:10PM -0800, Doug White wrote: +> > 2. missing necessary libs in /lib (hardcoded path?) +> > fix: ln -s /mnt2/lib / +>=20 +> or preferably 'ldconfig -m /mnt2/lib'. Again there is a compatibility +> issue that would make this unsafe to do automatically. This won't help, because geom(8) use dlopen(3) to load class-specific library and the path is hardcoded. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB0n4FForvXbEpPzQRAnXLAKCLN/uHRwZfnC+FZPB5YTzucPxqhgCgqbQX +Hp9PfnCX8AjEePDf/1scso= =wBx0 -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk-- From owner-freebsd-geom@FreeBSD.ORG Wed Dec 29 10:21:57 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FD4916A4CE for ; Wed, 29 Dec 2004 10:21:57 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1579E43D46 for ; Wed, 29 Dec 2004 10:21:57 +0000 (GMT) (envelope-from abelousov@gmail.com) Received: by rproxy.gmail.com with SMTP id c16so388345rne for ; Wed, 29 Dec 2004 02:21:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=G4sBW6uEoQrda1pWf8rYsJ65j3+6toq86WNjyNq8L0QNc+PQE1QcC83XgrmMo7a+a/n+cLnjwm/g7N71Drqs0cvqPdWzFzdsGiaDU3t9Kt8KtgTfLIdpVUyerZg3x1ldBffbyL67BqARGfAAQ5UhGVSa0T48hlHB8kT4GxL9RXw= Received: by 10.38.86.65 with SMTP id j65mr85715rnb; Wed, 29 Dec 2004 02:21:56 -0800 (PST) Received: by 10.38.151.70 with HTTP; Wed, 29 Dec 2004 02:21:56 -0800 (PST) Message-ID: <2ff9b55d04122902217c620769@mail.gmail.com> Date: Wed, 29 Dec 2004 15:21:56 +0500 From: Alexey Belousov To: Doug White In-Reply-To: <20041228202524.M49504@carver.gumbysoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <2ff9b55d0412270234634d2e96@mail.gmail.com> <20041228202524.M49504@carver.gumbysoft.com> cc: freebsd-qa@freebsd.org cc: freebsd-geom@freebsd.org Subject: Re: 5.3 LiveCD fixit shell geom(8) environment broken? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: c0x@daemon.pp.ru List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 10:21:57 -0000 On Tue, 28 Dec 2004 20:30:10 -0800 (PST), Doug White wrote: > On Mon, 27 Dec 2004, Alexey Belousov wrote: > > > hi All, > > > > recently, I played with geom in fixit shell and found some oddity: > > > > Fixit# geom mirror load > > Command 'load' not available. > > Fixit# sysctl kern.module_path > > kern.module_path: /boot/kernel;/boot/modules > > Fixit# ls -la /boot/kernel/ > > ls: /boot/kernel/: No such file or directory > > Fixit# ln -s /mnt2/boot/kernel /boot/ > > Fixit# geom mirror load -v > > Module available. > > Done. > > This is making a rather dangerous assumption -- that the installed kernel > in /mnt2/boot/kernel is binary-compatible with the GENERIC kernel from the > CD you started the fixit enviornment from. Its not something that could > be enabled in the general case. > > Of course if you know they are compatible (i.e., 5.3-RELEASE CD for a > 5.3-RELEASE system) you could have just loaded the module manually: > > kldload /mnt2/boot/kernel/geom_mirror.ko diagnostic message "Command 'load' not available." ugly, it should be "Module not available." isn't it? > > instead of the symlink fiddling. Or updated the module path even. > > > Fixit# geom mirror dump da0 > > Unknown command: dump > > usage: geom mirror help > > geom mirror list > > geom mirror load [-v] > > geom mirror unload [-v] > > Fixit# ldd `which geom` > > /mnt2/sbin/geom: > > libgeom.so.2 => /mnt2/lib/libgeom.so.2 (0x28078000) > > libsbuf.so.2 => /mnt2/lib/libsbuf.so.2 (0x2807c000) > > libbsdxml.so.1 => /mnt2/lib/libbsdxml.so.1 (0x2807e000) > > libutil.so.4 => /mnt2/lib/libutil.so.4 (0x2809d000) > > libc.so.5 => /mnt2/lib/libc.so.5 (0x280a9000) > > Fixit# ln -s /mnt2/lib / > > Fixit# geom mirror dump da0 > > Metadata on da0: > > magic: GEOM::MIRROR > > version: 1 > > <---snip---> > > Fixit# > > > > Summary: > > 1. missing geom_*.ko / invalid kern.module_path > > fix: sysctl kern.module_path=`sysctl -n kern.module_path`\;/mnt2/boot/kernel > > or simply ln -s /mnt2/boot/kernel /boot/ > > The sysctl change is preferred. yes, but symlink more handy for me in this situation. Anyway, at least, kern.module_path must contain /mnt2/boot/kernel by default, IMHO. > > > 2. missing necessary libs in /lib (hardcoded path?) > > fix: ln -s /mnt2/lib / > > or preferably 'ldconfig -m /mnt2/lib'. Again there is a compatibility > issue that would make this unsafe to do automatically. ldd `which geom` says no problem with libs (see my first posting), and 'ldconfig -m /mnt2/lib' not working for me too. > > Were you able to test if the geom command works properly, without any > sysctl or symlink fiddling, if you choose to mount disc #2? That should > provide all the necessary pieces without having to pick them out of the > installed system. disk #2, 5.3-RELEASE-i386-disc2.iso - the "LiveCD" I boot from and mount by standart way: 'sysinstall Main Menu' -> 'Fixit' -> '2 CDROM/DVD Use the "live" filesystem CDROM/DVD' -> 'OK' -> go vty4 to 'fixit' shell. Finally, why I can't start my repair job immediately after boot and mount "LiveCD" without doing some nasty tricks&tweaks? ;) > > -- > Doug White | FreeBSD: The Power to Serve > dwhite@gumbysoft.com | www.FreeBSD.org > _______________________________________________ > 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" > From owner-freebsd-geom@FreeBSD.ORG Wed Dec 29 15:53:42 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFB2E16A4CE for ; Wed, 29 Dec 2004 15:53:42 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D92E43D41 for ; Wed, 29 Dec 2004 15:53:42 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 0E1BE530C; Wed, 29 Dec 2004 16:53:39 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 3E6775308 for ; Wed, 29 Dec 2004 16:53:06 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id E75FFB874; Wed, 29 Dec 2004 16:53:05 +0100 (CET) To: geom@freebsd.org From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Wed, 29 Dec 2004 16:53:05 +0100 Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 Subject: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 15:53:42 -0000 g_vol_ffs_taste() tries to taste audio CDs, triggering a KASSERT in g_io_request() because 65536 is not a valid offset on a medium with 2352-byte sectors. The exact panic message is "wrong offset 65536 for sectorsize 2352" (sys/geom/geom_io.c lines 250-251). None of this code has been touched recently, so I suspect the same bug is present in 5.3, though I haven't had a chance to test it yet. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-geom@FreeBSD.ORG Wed Dec 29 16:28:16 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D535516A4CE for ; Wed, 29 Dec 2004 16:28:16 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 463A643D31 for ; Wed, 29 Dec 2004 16:28:16 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 3C48FACAEE; Wed, 29 Dec 2004 17:28:09 +0100 (CET) Date: Wed, 29 Dec 2004 17:28:09 +0100 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20041229162809.GC610@darkness.comp.waw.pl> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qjNfmADvan18RZcF" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 16:28:17 -0000 --qjNfmADvan18RZcF Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 29, 2004 at 04:53:05PM +0100, Dag-Erling Sm?rgrav wrote: +> g_vol_ffs_taste() tries to taste audio CDs, triggering a KASSERT in +> g_io_request() because 65536 is not a valid offset on a medium with +> 2352-byte sectors. The exact panic message is "wrong offset 65536 for +> sectorsize 2352" (sys/geom/geom_io.c lines 250-251). +>=20 +> None of this code has been touched recently, so I suspect the same bug +> is present in 5.3, though I haven't had a chance to test it yet. Those KASSERT()s are hiden under DIAGNOSTIC in RELENG_5. Anyway, I had simlar problems. I'll prepare a patch to try soon. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --qjNfmADvan18RZcF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB0tsZForvXbEpPzQRAklZAKCXNsEg7smQK6+ELuYcP9mdf2QI+ACgmj7N Y6bfADKWH93yPfYjSsEw5Mk= =zxEc -----END PGP SIGNATURE----- --qjNfmADvan18RZcF-- From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 12:16:57 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28CAA16A4CE for ; Thu, 30 Dec 2004 12:16:57 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id A353A43D49 for ; Thu, 30 Dec 2004 12:16:56 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 12CF1AE687; Thu, 30 Dec 2004 13:16:50 +0100 (CET) Date: Thu, 30 Dec 2004 13:16:50 +0100 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20041230121650.GB784@darkness.comp.waw.pl> References: <20041229162809.GC610@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MfFXiAuoTsnnDAfZ" Content-Disposition: inline In-Reply-To: <20041229162809.GC610@darkness.comp.waw.pl> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 12:16:57 -0000 --MfFXiAuoTsnnDAfZ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 29, 2004 at 05:28:09PM +0100, Pawel Jakub Dawidek wrote: +> On Wed, Dec 29, 2004 at 04:53:05PM +0100, Dag-Erling Sm?rgrav wrote: +> +> g_vol_ffs_taste() tries to taste audio CDs, triggering a KASSERT in +> +> g_io_request() because 65536 is not a valid offset on a medium with +> +> 2352-byte sectors. The exact panic message is "wrong offset 65536 for +> +> sectorsize 2352" (sys/geom/geom_io.c lines 250-251). +> +>=20 +> +> None of this code has been touched recently, so I suspect the same bug +> +> is present in 5.3, though I haven't had a chance to test it yet. +>=20 +> Those KASSERT()s are hiden under DIAGNOSTIC in RELENG_5. +>=20 +> Anyway, I had simlar problems. I'll prepare a patch to try soon. Hmm, I'm not sure what is correct way to fix it. Maybe we should just remove those KASSERTs? Simlar panic, AFAIR, can be seen when you try to mount audio CD. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --MfFXiAuoTsnnDAfZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB0/GyForvXbEpPzQRAkGJAJ0YmXMTncX7rnLfXDF4sxcpceFfVgCguHka fDncb2FxxOQ6ajnIekUgaXg= =d8lD -----END PGP SIGNATURE----- --MfFXiAuoTsnnDAfZ-- From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 12:24:32 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C5F016A4CE; Thu, 30 Dec 2004 12:24:32 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC1E643D70; Thu, 30 Dec 2004 12:24:31 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id iBUCNtn3040084; Thu, 30 Dec 2004 13:23:57 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Pawel Jakub Dawidek From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 30 Dec 2004 13:16:50 +0100." <20041230121650.GB784@darkness.comp.waw.pl> Date: Thu, 30 Dec 2004 13:23:55 +0100 Message-ID: <40083.1104409435@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: Dag-Erling Sm?rgrav cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 12:24:32 -0000 In message <20041230121650.GB784@darkness.comp.waw.pl>, Pawel Jakub Dawidek wri tes: > >--MfFXiAuoTsnnDAfZ >Content-Type: text/plain; charset=iso-8859-2 >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >On Wed, Dec 29, 2004 at 05:28:09PM +0100, Pawel Jakub Dawidek wrote: >+> On Wed, Dec 29, 2004 at 04:53:05PM +0100, Dag-Erling Sm?rgrav wrote: >+> +> g_vol_ffs_taste() tries to taste audio CDs, triggering a KASSERT in >+> +> g_io_request() because 65536 is not a valid offset on a medium with >+> +> 2352-byte sectors. The exact panic message is "wrong offset 65536 for >+> +> sectorsize 2352" (sys/geom/geom_io.c lines 250-251). >+> +>=20 >+> +> None of this code has been touched recently, so I suspect the same bug >+> +> is present in 5.3, though I haven't had a chance to test it yet. >+>=20 >+> Those KASSERT()s are hiden under DIAGNOSTIC in RELENG_5. >+>=20 >+> Anyway, I had simlar problems. I'll prepare a patch to try soon. > >Hmm, I'm not sure what is correct way to fix it. The correct fix is of course to fix the bug in the geom_vol_ffs class that makes it even try to read things from providers which have sectorsizes it cannot cope with. >Maybe we should just remove those KASSERTs? The KASSERTS are correct and should not be removed. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 14:26:16 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6941B16A4CE; Thu, 30 Dec 2004 14:26:16 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9B8D43D2F; Thu, 30 Dec 2004 14:26:15 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 36BA3530C; Thu, 30 Dec 2004 15:26:14 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 801865308; Thu, 30 Dec 2004 15:25:41 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id 2831DB874; Thu, 30 Dec 2004 15:25:41 +0100 (CET) To: Pawel Jakub Dawidek References: <20041229162809.GC610@darkness.comp.waw.pl> <20041230121650.GB784@darkness.comp.waw.pl> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 30 Dec 2004 15:25:40 +0100 In-Reply-To: <20041230121650.GB784@darkness.comp.waw.pl> (Pawel Jakub Dawidek's message of "Thu, 30 Dec 2004 13:16:50 +0100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 14:26:16 -0000 Pawel Jakub Dawidek writes: > Hmm, I'm not sure what is correct way to fix it. > Maybe we should just remove those KASSERTs? That would be very, very wrong. GEOM_VOL should simply not try to taste something which cannot possibly be an FFS. An FFS cannot exist on a medium with a sector size which is not a power of two. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 14:49:18 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2319F16A4CE for ; Thu, 30 Dec 2004 14:49:18 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEBC743D6D for ; Thu, 30 Dec 2004 14:49:17 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 7FC0CACAE6; Thu, 30 Dec 2004 15:49:15 +0100 (CET) Date: Thu, 30 Dec 2004 15:49:15 +0100 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20041230144915.GC784@darkness.comp.waw.pl> References: <20041230121650.GB784@darkness.comp.waw.pl> <40083.1104409435@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kfjH4zxOES6UT95V" Content-Disposition: inline In-Reply-To: <40083.1104409435@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: Dag-Erling Sm?rgrav cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 14:49:18 -0000 --kfjH4zxOES6UT95V Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 30, 2004 at 01:23:55PM +0100, Poul-Henning Kamp wrote: +> >Hmm, I'm not sure what is correct way to fix it. +>=20 +> The correct fix is of course to fix the bug in the geom_vol_ffs +> class that makes it even try to read things from providers which +> have sectorsizes it cannot cope with. The problem exists not only in geom_vol_ffs, but also in geom_vfs, I think. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --kfjH4zxOES6UT95V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB1BVrForvXbEpPzQRAo9oAKCATIhEqD1G4HuR4fCRGWFYq3ORJQCeMBcW CX26h3eNcz0xGs9hkn7ATJg= =o4D7 -----END PGP SIGNATURE----- --kfjH4zxOES6UT95V-- From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 16:56:35 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B56E816A4CE; Thu, 30 Dec 2004 16:56:35 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00B7E43D1D; Thu, 30 Dec 2004 16:56:35 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 521E0530C; Thu, 30 Dec 2004 17:56:33 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 45E1F5308; Thu, 30 Dec 2004 17:56:07 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id A358AB874; Thu, 30 Dec 2004 17:56:06 +0100 (CET) To: Pawel Jakub Dawidek References: <20041230121650.GB784@darkness.comp.waw.pl> <40083.1104409435@critter.freebsd.dk> <20041230144915.GC784@darkness.comp.waw.pl> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 30 Dec 2004 17:56:06 +0100 In-Reply-To: <20041230144915.GC784@darkness.comp.waw.pl> (Pawel Jakub Dawidek's message of "Thu, 30 Dec 2004 15:49:15 +0100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: geom@freebsd.org cc: Poul-Henning Kamp Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 16:56:35 -0000 Pawel Jakub Dawidek writes: > The problem exists not only in geom_vol_ffs, but also in geom_vfs, I thin= k. I'm not sure what you're referring to. If you mean the code in geom_vfs.c, none of it is used during tasting; it is only used in situations where the file system type and the sector size of the underlying medium are already known. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 17:38:29 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AEAA16A4CE for ; Thu, 30 Dec 2004 17:38:29 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A49C43D49 for ; Thu, 30 Dec 2004 17:38:29 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 8BA15ACAE6; Thu, 30 Dec 2004 18:38:26 +0100 (CET) Date: Thu, 30 Dec 2004 18:38:26 +0100 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20041230173826.GD784@darkness.comp.waw.pl> References: <20041230121650.GB784@darkness.comp.waw.pl> <40083.1104409435@critter.freebsd.dk> <20041230144915.GC784@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jCrbxBqMcLqd4mOl" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: geom@freebsd.org cc: Poul-Henning Kamp Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 17:38:29 -0000 --jCrbxBqMcLqd4mOl Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 30, 2004 at 05:56:06PM +0100, Dag-Erling Sm?rgrav wrote: +> Pawel Jakub Dawidek writes: +> > The problem exists not only in geom_vol_ffs, but also in geom_vfs, I t= hink. +>=20 +> I'm not sure what you're referring to. If you mean the code in +> geom_vfs.c, none of it is used during tasting; it is only used in +> situations where the file system type and the sector size of the +> underlying medium are already known. Code in geom_vfs.c can call g_io_request() with wrong offset/length. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --jCrbxBqMcLqd4mOl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB1D0SForvXbEpPzQRArl+AJ4/Nwec8Fx2Of+KBq50qF5Pm227UQCfax2v Y+zp76Tfph1H5XBWuZbLm7s= =FtKm -----END PGP SIGNATURE----- --jCrbxBqMcLqd4mOl-- From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 19:14:43 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9D8116A512; Thu, 30 Dec 2004 19:14:43 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 324C543D31; Thu, 30 Dec 2004 19:14:41 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 39C85530C; Thu, 30 Dec 2004 19:55:31 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id BEA6D5308; Thu, 30 Dec 2004 19:55:03 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id 1ED9DB874; Thu, 30 Dec 2004 19:55:03 +0100 (CET) To: Pawel Jakub Dawidek References: <20041230121650.GB784@darkness.comp.waw.pl> <40083.1104409435@critter.freebsd.dk> <20041230144915.GC784@darkness.comp.waw.pl> <20041230173826.GD784@darkness.comp.waw.pl> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 30 Dec 2004 19:55:03 +0100 In-Reply-To: <20041230173826.GD784@darkness.comp.waw.pl> (Pawel Jakub Dawidek's message of "Thu, 30 Dec 2004 18:38:26 +0100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: geom@freebsd.org cc: Poul-Henning Kamp Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:14:44 -0000 Pawel Jakub Dawidek writes: > Code in geom_vfs.c can call g_io_request() with wrong offset/length. Not unless there is a bug in filesystem code that uses g_vfs_strategy(). DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 19:28:52 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FD8716A4CE for ; Thu, 30 Dec 2004 19:28:52 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id C873F43D2D for ; Thu, 30 Dec 2004 19:28:51 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 7D077530C; Thu, 30 Dec 2004 20:28:50 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 81B5B5308 for ; Thu, 30 Dec 2004 20:28:25 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id 02B2AB874; Thu, 30 Dec 2004 20:28:25 +0100 (CET) To: geom@freebsd.org References: From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 30 Dec 2004 20:28:24 +0100 In-Reply-To: (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav's?= message of "Wed, 29 Dec 2004 16:53:05 +0100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:28:52 -0000 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Any objections to the attached patch? It's not the most efficient solution, but it is the one least likely to give us surprises down the road. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=geom_vol.diff Index: sys/geom/geom_vol_ffs.c =================================================================== RCS file: /home/ncvs/src/sys/geom/geom_vol_ffs.c,v retrieving revision 1.13 diff -u -r1.13 geom_vol_ffs.c --- sys/geom/geom_vol_ffs.c 9 Aug 2004 06:04:00 -0000 1.13 +++ sys/geom/geom_vol_ffs.c 30 Dec 2004 19:22:30 -0000 @@ -88,6 +88,16 @@ * provider based on that. */ for (sb=0; (superblock = superblocks[sb]) != -1; sb++) { + /* + * Take care not to issue an invalid I/O request. The + * offset and size of the superblock candidate must be + * multiples of the provider's sector size, otherwise an + * FFS can't exist on the provider anyway. + */ + if (superblock % cp->provider->sectorsize != 0 || + SBLOCKSIZE % cp->provider->sectorsize != 0) + continue; + fs = (struct fs *) g_read_data(cp, superblock, SBLOCKSIZE, &error); if (fs == NULL || error != 0) --=-=-=-- From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 19:34:59 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3ED6D16A4CE; Thu, 30 Dec 2004 19:34:59 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8935D43D48; Thu, 30 Dec 2004 19:34:58 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id iBUJYuMM046918; Thu, 30 Dec 2004 20:34:56 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Pawel Jakub Dawidek From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 30 Dec 2004 18:38:26 +0100." <20041230173826.GD784@darkness.comp.waw.pl> Date: Thu, 30 Dec 2004 20:34:56 +0100 Message-ID: <46917.1104435296@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: Dag-Erling Sm?rgrav cc: geom@FreeBSD.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:34:59 -0000 In message <20041230173826.GD784@darkness.comp.waw.pl>, Pawel Jakub Dawidek wri tes: > >--jCrbxBqMcLqd4mOl >Content-Type: text/plain; charset=iso-8859-2 >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >On Thu, Dec 30, 2004 at 05:56:06PM +0100, Dag-Erling Sm?rgrav wrote: >+> Pawel Jakub Dawidek writes: >+> > The problem exists not only in geom_vol_ffs, but also in geom_vfs, I t= >hink. >+>=20 >+> I'm not sure what you're referring to. If you mean the code in >+> geom_vfs.c, none of it is used during tasting; it is only used in >+> situations where the file system type and the sector size of the >+> underlying medium are already known. > >Code in geom_vfs.c can call g_io_request() with wrong offset/length. Only if there are bugs in the filesystem. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 19:39:22 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F85416A4CE for ; Thu, 30 Dec 2004 19:39:22 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CE3143D2D for ; Thu, 30 Dec 2004 19:39:21 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id iBUJdKwA047025; Thu, 30 Dec 2004 20:39:20 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 30 Dec 2004 20:28:24 +0100." Date: Thu, 30 Dec 2004 20:39:20 +0100 Message-ID: <47024.1104435560@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:39:22 -0000 In message , =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= writes: >--=-=-= >Content-Type: text/plain; charset=iso-8859-1 >Content-Transfer-Encoding: quoted-printable > >Any objections to the attached patch? It's not the most efficient >solution, but it is the one least likely to give us surprises down the >road. I think the right check is to make sure the sectorsize is a power of two && > DEV_BSIZE. if (!powerof2(cp->provider->sectorsize) || cp->provider->sectorsize < DEV_BSIZE) return (EINVAL) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 19:45:25 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A72B16A4CE for ; Thu, 30 Dec 2004 19:45:25 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57C4C43D5A for ; Thu, 30 Dec 2004 19:45:24 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 86341ACAE6; Thu, 30 Dec 2004 20:45:18 +0100 (CET) Date: Thu, 30 Dec 2004 20:45:18 +0100 From: Pawel Jakub Dawidek To: Dag-Erling Sm?rgrav Message-ID: <20041230194518.GE784@darkness.comp.waw.pl> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ytoMbUMiTKPMT3hY" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:45:25 -0000 --ytoMbUMiTKPMT3hY Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 30, 2004 at 08:28:24PM +0100, Dag-Erling Sm?rgrav wrote: +> Any objections to the attached patch? It's not the most efficient +> solution, but it is the one least likely to give us surprises down the +> road. First of all I'll suggest to use glabel(8) instead of geom_vol_ffs, because I want to remove geom_vol_ffs sometime in the future. Maybe we can move SBLOCKSIZE check at function start? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ytoMbUMiTKPMT3hY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFB1FrOForvXbEpPzQRAqgbAKDJj+iiWMyxKFrHZlU07cgqC4vCFwCgsLe3 t80tYMB1mAYgO/s4rr9Y/b0= =E1mv -----END PGP SIGNATURE----- --ytoMbUMiTKPMT3hY-- From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 19:45:50 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62C9B16A4CE for ; Thu, 30 Dec 2004 19:45:50 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B40743D2F for ; Thu, 30 Dec 2004 19:45:50 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id E0DAA530C; Thu, 30 Dec 2004 20:45:48 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 7C29E5308; Thu, 30 Dec 2004 20:45:22 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id 3DDCFB874; Thu, 30 Dec 2004 20:45:22 +0100 (CET) To: "Poul-Henning Kamp" References: <47024.1104435560@critter.freebsd.dk> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 30 Dec 2004 20:45:22 +0100 In-Reply-To: <47024.1104435560@critter.freebsd.dk> (Poul-Henning Kamp's message of "Thu, 30 Dec 2004 20:39:20 +0100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:45:50 -0000 "Poul-Henning Kamp" writes: > I think the right check is to make sure the sectorsize is a power > of two && > DEV_BSIZE. Not good enough. The panic will still be triggered by providers with a sector size larger than 8192 (which is the smallest non-zero offset g_vol_ffs_taste() tries to use). The fact that no such devices exist today does not mean they won't exist at some point in the not-so- distant future. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 19:55:40 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B022316A4CE for ; Thu, 30 Dec 2004 19:55:40 +0000 (GMT) Received: from critter.freebsd.dk (f170.freebsd.dk [212.242.86.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id B321A43D31 for ; Thu, 30 Dec 2004 19:55:39 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id iBUJtZ6W047393; Thu, 30 Dec 2004 20:55:35 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 30 Dec 2004 20:45:22 +0100." Date: Thu, 30 Dec 2004 20:55:35 +0100 Message-ID: <47392.1104436535@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 19:55:40 -0000 In message , =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= writes: >"Poul-Henning Kamp" writes: >> I think the right check is to make sure the sectorsize is a power >> of two && > DEV_BSIZE. > >Not good enough. The panic will still be triggered by providers with >a sector size larger than 8192 (which is the smallest non-zero offset >g_vol_ffs_taste() tries to use). The fact that no such devices exist >today does not mean they won't exist at some point in the not-so- >distant future. You're right, we need to check for that too. They could exist with gbde btw. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Thu Dec 30 21:16:41 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBFA816A4CF; Thu, 30 Dec 2004 21:16:41 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E64643D1F; Thu, 30 Dec 2004 21:16:41 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 853E2530C; Thu, 30 Dec 2004 22:16:39 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id E26035308; Thu, 30 Dec 2004 22:16:05 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id A2501B874; Thu, 30 Dec 2004 22:16:05 +0100 (CET) To: Pawel Jakub Dawidek References: <20041230194518.GE784@darkness.comp.waw.pl> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Thu, 30 Dec 2004 22:16:05 +0100 In-Reply-To: <20041230194518.GE784@darkness.comp.waw.pl> (Pawel Jakub Dawidek's message of "Thu, 30 Dec 2004 20:45:18 +0100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: geom@freebsd.org Subject: Re: GEOM_VOL panics when audio CD is present X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 21:16:41 -0000 Pawel Jakub Dawidek writes: > Maybe we can move SBLOCKSIZE check at function start? Like I said, more efficient but less future-proof. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-geom@FreeBSD.ORG Fri Dec 31 01:43:38 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4791E16A4CE; Fri, 31 Dec 2004 01:43:38 +0000 (GMT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D71143D2D; Fri, 31 Dec 2004 01:43:38 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 1BBC172DD4; Thu, 30 Dec 2004 17:43:38 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 1630872DCB; Thu, 30 Dec 2004 17:43:38 -0800 (PST) Date: Thu, 30 Dec 2004 17:43:38 -0800 (PST) From: Doug White To: Pawel Jakub Dawidek In-Reply-To: <20041229095102.GA2846@darkness.comp.waw.pl> Message-ID: <20041230174245.F67243@carver.gumbysoft.com> References: <2ff9b55d0412270234634d2e96@mail.gmail.com> <20041229095102.GA2846@darkness.comp.waw.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-qa@freebsd.org cc: c0x@daemon.pp.ru cc: freebsd-geom@freebsd.org Subject: Re: 5.3 LiveCD fixit shell geom(8) environment broken? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 01:43:38 -0000 On Wed, 29 Dec 2004, Pawel Jakub Dawidek wrote: > On Tue, Dec 28, 2004 at 08:30:10PM -0800, Doug White wrote: > +> > 2. missing necessary libs in /lib (hardcoded path?) > +> > fix: ln -s /mnt2/lib / > +> > +> or preferably 'ldconfig -m /mnt2/lib'. Again there is a compatibility > +> issue that would make this unsafe to do automatically. > > This won't help, because geom(8) use dlopen(3) to load class-specific > library and the path is hardcoded. Well that's silly. Can we get a config option to change that? Or an environment variable? :) -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org