public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@kernel.org>
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
Date: Fri, 5 Jun 2015 16:53:54 +0100	[thread overview]
Message-ID: <20150605155347.GA21615@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20150605152537.GU14071@sirena.org.uk>

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.


  reply	other threads:[~2015-06-05 15:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 14:34 [PATCH 0/2] debugfs: support read-only and write-only bool types Richard Fitzgerald
2015-06-05 14:34 ` [PATCH 1/2] " Richard Fitzgerald
2015-06-05 16:42   ` Mark Brown
2015-06-08 20:57     ` Greg KH
2015-06-05 14:34 ` [PATCH 2/2] regmap: Fix permissions on debugfs cache controls Richard Fitzgerald
2015-06-05 15:25   ` Mark Brown
2015-06-05 15:53     ` Richard Fitzgerald [this message]
2015-06-05 16:53       ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150605155347.GA21615@opensource.wolfsonmicro.com \
    --to=rf@opensource.wolfsonmicro.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox