Date: Thu, 22 Apr 2010 23:29:45 +0200 From: Peter Schuller <peter.schuller@infidyne.com> To: Freddie Cash <fjwcash@gmail.com> Cc: freebsd-fs@freebsd.org Subject: Re: kern.geom.debugflags=16 does NOT allow me to write to device Message-ID: <h2w5a1151761004221429y43d71d7ga13febd1c518c0d1@mail.gmail.com> In-Reply-To: <g2rb269bc571004221414m828ac15ahdde1abaf43b6ee8c@mail.gmail.com> References: <y2z5a1151761004221355l391c05f4qc6c0f760321b56f5@mail.gmail.com> <g2rb269bc571004221414m828ac15ahdde1abaf43b6ee8c@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> Somewhere in the 7.x -> 8.x transition, debugflags was incremented. =C2= =A0You > need to set it to 17 now. I saw some references to that Googling, but it doesn't work: % sysctl -w kern.geom.debugflags=3D17 prometheus:/tmp(0) kern.geom.debugflags: 17 -> 17 % ktrace disklabel -B /dev/ad9s1 prometheus:/tmp(0) disklabel: Class not found And kdump still shows: 15535 disklabel CALL open(0x800c02040,O_RDWR,<unused>0xa1a5) 15535 disklabel NAMI "/dev/ad9s1" 15535 disklabel RET open -1 errno 1 Operation not permitted In addition, geom(4) still has: 0x10 (allow foot shooting) Allow writing to Rank 1 providers. This would, for example, allow the super=E2=80=90user to overwrite the MBR on the root = disk or write random sectors elsewhere to a mounted disk. The implica= =E2=80=90 tions are obvious. In addition, geom/geom_subr.c has: /* If foot-shooting is enabled, any open on rank#1 is OK */ if ((g_debugflags & 16) && pp->geom->rank =3D=3D 1) ; I wonder if the problem is that it's not of rank 1 because I'm writing to the slice's first second rather than the MBR... That's now feeling pretty likely and can perhaps explain lots of confusion that seems to exist based on Googling. Anyone has thoughts on what the proper action here? Or do I need to patch my kernel to update my label? :) (I could pop it out of geom/zfs temporarily and hope the other disk doesn't go. But as a matter of principle I don't want to go that route...) --=20 / Peter Schuller
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?h2w5a1151761004221429y43d71d7ga13febd1c518c0d1>