Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754956AbbFEPyG (ORCPT ); Fri, 5 Jun 2015 11:54:06 -0400 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:55400 "EHLO opensource.wolfsonmicro.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494AbbFEPyC (ORCPT ); Fri, 5 Jun 2015 11:54:02 -0400 Date: Fri, 5 Jun 2015 16:53:54 +0100 From: Richard Fitzgerald To: Mark Brown Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com Subject: Re: [PATCH 2/2] regmap: Fix permissions on debugfs cache controls Message-ID: <20150605155347.GA21615@opensource.wolfsonmicro.com> References: <1433514886-11884-1-git-send-email-rf@opensource.wolfsonmicro.com> <1433514886-11884-3-git-send-email-rf@opensource.wolfsonmicro.com> <20150605152537.GU14071@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150605152537.GU14071@sirena.org.uk> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1866 Lines: 38 On Fri, Jun 05, 2015 at 04:25:37PM +0100, Mark Brown wrote: > On Fri, Jun 05, 2015 at 03:34:46PM +0100, Richard Fitzgerald wrote: > > The cache_only and cache_bypass debugfs entries are expected > > to be writable by user-side but are set to read-only permissions. > > Your expectation is not my expectation here :) The permissions here > are quite deliberate. > > > This is only working accidentally because debugfs doesn't currently > > honour the read-only bit. > > Honestly it wasn't supposed to be working at all. We can have a > discussion about if it makes sense for it to work, that's not a totally > unreasonable thing though I'd really want to taint the kernel if anyone > actually does it (particularly for cache only) since it seems even more > likely to interact poorly with drivers than random register writes. > > We'll also want to sync the cache when transitioning from cache only to > normal operation I think, or provide a way of doing that. We use writability of these all the time for all sorts of debugging so it would be bad for us if it actually stopped being writeable. Our expectations are that you're on your own if you fiddle with the cache settings via debugfs. Other people's might be different. But that's the current behaviour so if anyone is currently using the accidental writability this patch will preserve that behaviour (broken or not). And if they aren't using it, it doesn't matter. I think it's preferable to avoid changing the behaviour of regmap as a side effect of improving debugfs and worry later, separately, about whether to improve the way regmap handles this. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/