From owner-freebsd-fs@freebsd.org Thu May 17 07:41:16 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B03E0EDB634 for ; Thu, 17 May 2018 07:41:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC4C70FB5 for ; Thu, 17 May 2018 07:41:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: by mailman.ysv.freebsd.org (Postfix) id 10143EDB633; Thu, 17 May 2018 07:41:16 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F042EEDB632 for ; Thu, 17 May 2018 07:41:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 6B20C70FB0 for ; Thu, 17 May 2018 07:41:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id BD266107C7A for ; Thu, 17 May 2018 17:41:13 +1000 (AEST) Date: Thu, 17 May 2018 17:41:13 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org cc: fs@freebsd.org Subject: Re: [Bug 210316] panic after trying to r/w mount msdosfs on write protected media In-Reply-To: <20180517163709.F1129@besplex.bde.org> Message-ID: <20180517173539.B1308@besplex.bde.org> References: <20180517163709.F1129@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=9cW_t1CCXrUA:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=MBVNPijdDLtBr63qWgoA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2018 07:41:16 -0000 On Thu, 17 May 2018, Bruce Evans wrote: > On Thu, 17 May 2018 a bug that doesn't want replies@freebsd.org wrote: > >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210316 >> >> --- Comment #14 from Andriy Gapon --- >> (In reply to Conrad Meyer from comment #13) >> >> Indeed, if we talk about the general behaviour. >> >> I see that I utterly failed to explain that I was thinking purely in a >> context >> of what msdos does in markvoldirty. > ... > Markvoldirty() was obtained from apple and fixed a bit by me, but is still > very bad, without even this write protection bug. > ... I forgot to mention its main bug. msdosfs doesn't check the dirty flag, so it allows even rw mounts of dirty file systems (and I think it is too dangerous to allow even ro mounts for fs's with FAT). So maintaining the dirty flag is useless for FreeBSD. It is just a courtesy for OS'es that do check the flag. Bruce