Return-Path: Received: from ipmail06.adl2.internode.on.net ([150.101.137.129]:60807 "EHLO ipmail06.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752707AbdLLXaq (ORCPT ); Tue, 12 Dec 2017 18:30:46 -0500 Date: Wed, 13 Dec 2017 10:30:31 +1100 From: Dave Chinner Subject: Re: [PATCH] xfs: include the XFS magic number in magic.h Message-ID: <20171212233031.GX5858@dastard> References: <1513088469.3476.48.camel@linux.vnet.ibm.com> <20171212142615.GA25327@infradead.org> <1513089296.3476.52.camel@linux.vnet.ibm.com> <20171212143647.GA10887@infradead.org> <1513091096.3476.66.camel@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1513091096.3476.66.camel@linux.vnet.ibm.com> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Mimi Zohar Cc: Christoph Hellwig , linux-xfs On Tue, Dec 12, 2017 at 10:04:56AM -0500, Mimi Zohar wrote: > On Tue, 2017-12-12 at 06:36 -0800, Christoph Hellwig wrote: > > On Tue, Dec 12, 2017 at 09:34:56AM -0500, Mimi Zohar wrote: > > > On Tue, 2017-12-12 at 06:26 -0800, Christoph Hellwig wrote: > > > > On Tue, Dec 12, 2017 at 09:21:09AM -0500, Mimi Zohar wrote: > > > > > Move the XFS_SB_MAGIC definition to magic.h. > > > > > > > > NACK. We want to keep the XFS code self-contained and no other part > > > > of the kernel has any business knowing it anyway. > > > > > > IMA policy rules can be defined in terms of magic numbers, but they > > > need to be defined in magic.h.  Please reconsider... > > > > That is completely bogus, and it should not be supported in any way. > > File systems magic numbers are internal implementation details. > > Perhaps policies in general shouldn't differentiate between file > systems, but it definitely simplifies testing. How does specifying a filesystem type in a generic layer's policy implementation help testing? > For example, currently IMA-appraisal only supports storing file > signatures as xattrs, but support for appended signatures is being > added.  Per file system rules could require different types of file > signatures. What's an "appended signature", and why is the filesystem independent xattr interface insufficient for storing this information? Cheers, Dave. -- Dave Chinner david@fromorbit.com