mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Markus Pargmann <mpa@pengutronix.de>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de,
	Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] regmap: Add Kconfig option for debugfs register writes
Date: Tue, 24 Jun 2014 12:12:49 +0100	[thread overview]
Message-ID: <20140624111249.GK23300@sirena.org.uk> (raw)
In-Reply-To: <20140618210159.GC32450@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

On Wed, Jun 18, 2014 at 11:01:59PM +0200, Markus Pargmann wrote:
> On Wed, Jun 18, 2014 at 01:11:27AM +0100, Mark Brown wrote:

> > This is deliberately hard to enable in order to make it clear that it
> > should never, ever be used in production as a bodge around writing
> > drivers and generally in order to reduce the risk to the rest of the
> > system.  Enabling this will typically give userspace full access to
> > components like PMICs which have the potential to cause physical damage
> > to the system if misused.

> The userspace already has full access to all those registers if you
> want. For example memory mapped registeres can be written through
> /dev/mem. I2C registers can easily be changed using i2c-tools or the
> /dev/i2c-* devices. So you are already able to write a userspace driver
> if you really want to.

Right, but in all cases except for /dev/mem the API ensures that you
can't simultaneously run a kernel and userspace driver.  It's not the
userspace driver bit that's the problem but rather having both at the
same time.

> I think this kconfig option would make it easier to debug hardware or
> driver issues, as it is much more comfortable to have a clean kconfig
> option.

Well, a major goal of doing things this way is to make it seem wrong to
be using this too much!  :P

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2014-06-24 11:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 19:36 Markus Pargmann
2014-06-17 19:56 ` David Rientjes
2014-06-17 20:13   ` Markus Pargmann
2014-06-18  0:11 ` Mark Brown
2014-06-18 21:01   ` Markus Pargmann
2014-06-24 11:12     ` Mark Brown [this message]

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=20140624111249.GK23300@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=dp@opensource.wolfsonmicro.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    /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

all inboxes | Powered by JetHome®