[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150605155347.GA21615@opensource.wolfsonmicro.com>
Date: Fri, 5 Jun 2015 16:53:54 +0100
From: Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
To: Mark Brown <broonie@...nel.org>
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
patches@...nsource.wolfsonmicro.com
Subject: Re: [PATCH 2/2] regmap: Fix permissions on debugfs cache controls
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists