All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Pavel Machek <pavel@ucw.cz>
Cc: Alexandre Rostovtsev <tetromino@gmail.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lenovo-sl-laptop : driver for review
Date: Sat, 28 Feb 2009 11:37:11 -0300	[thread overview]
Message-ID: <20090228143711.GB17541@khazad-dum.debian.net> (raw)
In-Reply-To: <20090227132752.GG1482@ucw.cz>

On Fri, 27 Feb 2009, Pavel Machek wrote:
> > +module_param(debug_ec, bool, S_IRUGO);
> > +MODULE_PARM_DESC(debug_ec,
> > +	"Present EC debugging interface in procfs. WARNING: writing to the "
> > +	"EC can hang your system and possibly damage your hardware.");
> 
> Sounds dangerous and clearly does not belong to /proc. Please drop it.

ThinkPad ACPI also has one.  OTOH, we are fairly sure one cannot damage the
standard ThinkPad hardware through the "IBM thinkpad-style" EC firmware, the
EC sanity-checks things.  I suppose you could cause the box to go away for
lunch and don't come back until a complete hardware reset, or hit one of the
crash-the-EC-firmware bugs by accident, though.

It has been invaluable for debugging. I can well guess why the thinkpad-sl
driver would want to add it as well.

What I am heavily considering is to taint the kernel when it is used (plus
it is not enabled by default, requires a module parameter to enable, etc),
plus output a big warning to syslog.  That is probably enough to keep the
users from abusing it.

> > +/*************************************************************************
> > +    bluetooth sysfs - copied nearly verbatim from thinkpad_acpi.c
> > + *************************************************************************/
> 
> That's quite a lot of code for verbatim copy; create shared helper?

Yeah, I am game.  But let's do it later on and not delay anything because of
it, please.  I will start breaking thinkpad-acpi into multiple source files,
and after that is done (should take a while, thinkpad-acpi is a big module
with a LOT of subdriver interdependencies) we can look for the best way to
reduce code duplication.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2009-02-28 14:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16  7:59 [PATCH] lenovo-sl-laptop : driver for review Alexandre Rostovtsev
2009-02-16 15:18 ` Matthew Garrett
2009-02-20  3:00   ` Henrique de Moraes Holschuh
2009-02-16 15:21 ` Matthew Garrett
2009-02-27 13:27 ` Pavel Machek
2009-02-28 14:37   ` Henrique de Moraes Holschuh [this message]
2009-03-10 11:22     ` Pavel Machek
2009-03-10 11:34       ` Henrique de Moraes Holschuh
2009-03-10 14:12         ` Pavel Machek

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=20090228143711.GB17541@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tetromino@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.