mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gabriel L. Somlo" <somlo@cmu.edu>
To: Henrik Rydberg <rydberg@euromail.se>
Cc: Guenter Roeck <groeck-dsl@sbcglobal.net>,
	khali@linux-fr.org, linux@roeck-us.net,
	lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org,
	agraf@suse.de, rene@exactcode.com
Subject: Re: [PATCH v2] applesmc: add sysfs file to report OSK
Date: Thu, 13 Dec 2012 14:07:42 -0500	[thread overview]
Message-ID: <20121213190742.GQ2097@hedwig.ini.cmu.edu> (raw)
In-Reply-To: <20121213072011.GA515@polaris.bitmath.org>

On Thu, Dec 13, 2012 at 08:20:11AM +0100, Henrik Rydberg wrote:
> > The only viable (from a legal CYA standpoint) thing I can think of is
> > to make it easy to acquire the OSK automatically, on demand, directly
> > from the hardware. Right now, the logical place for that is applesmc.ko.
> > It already controls access to the SMC, and already reports values for
> > various keys.
> 
> How about encrypting the string with a key only found on an Apple
> computer? There are strings available in both ACPI and EFI that could
> serve such a purpose.

I'd still be distributing the copyrighted string. I don't expect
encryption to placate the proverbial lawyers, nor the project/distro
maintainers who want to avoid them :)

Plus, now I'd also be taking on the responsibility of deciding when
it's (legally) OK to let QEMU boot OS X and when it isn't.

Besides, the most obvious Apple-only key that fits your description
is the OSK itself ! :)

> Regarding the patch, I agree with Guenter that putting more unrelated
> things into the hwmon subsystem makes no sense. Most of the
> information in applesmc should go into the hwmon, thermal, backlight
> and input subsystems, but some strings should go somewhere else (maybe
> /sys/firmware/smc/?). The reluctance you experience here is a
> technical one; someone will need to make an effort to create a good
> place for your string, and it does not help that the string is, in
> fact, a constant. :-)
> 
> So, don't give up hope, but please do not expect an immediate solution.

OK, so if we agree that for legal-CYA reasons we must pretend to
ignore the constant-ness of the key value, are we now talking about
simply where in the sysfs hierarchy to place the node that will
spit it out ?

Right now it's under /sys/devices/platform/applesmc.768/
(i.e., it's a device, it's platform specific, and it's name is
applesmc-something).

The only ties to "hwmon" are that:
	- there's a "/sys/class/hwmon/hwmonX" symlink to the above
	  directory (among others, such as the graphics card and two
	  instances of "coretemp", at least on my MacPro5,1);
	- *most* of the files in it are indeed reporting sensor
	  readings;
	- the applesmc.c device driver source file itself lives under
	  drivers/hwmon/ in the kernel source tree.

Is it common practice to split off a subset of the values reported
by such a chip and make them show up elsehere (i.e. besides the
/sys/devices/platform/<chipname> folder) ? Does the relative size
of the subsets involved count as input into that decision proces ? :)

I personally don't know enough to have an opinion on where the best
place for this might be. You suggested "/sys/firmware/smc/", and I'd
be perfectly happy with that one too. Do you know who would decide
whether that's an acceptable alternative to /sys/devices/platform/applesmc ?

Thanks again,
--Gabriel

      reply	other threads:[~2012-12-13 19:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 14:51 [PATCH] " Gabriel L. Somlo
2012-12-10 16:44 ` Alexander Graf
2012-12-10 19:09 ` Guenter Roeck
2012-12-10 19:54   ` Henrik Rydberg
2012-12-10 20:19     ` Alexander Graf
2012-12-10 20:43       ` Rene Rebe
2012-12-10 21:24         ` Alexander Graf
2012-12-10 21:30           ` Rene Rebe
2012-12-10 22:23     ` [PATCH v2] " Gabriel L. Somlo
2012-12-12 23:01       ` Gabriel L. Somlo
2012-12-13  7:20         ` Henrik Rydberg
2012-12-13 19:07           ` Gabriel L. Somlo [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=20121213190742.GQ2097@hedwig.ini.cmu.edu \
    --to=somlo@cmu.edu \
    --cc=agraf@suse.de \
    --cc=groeck-dsl@sbcglobal.net \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lm-sensors@lm-sensors.org \
    --cc=rene@exactcode.com \
    --cc=rydberg@euromail.se \
    /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®