mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: David Ober <dober6023@gmail.com>
Cc: linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, jdelvare@suse.com, corbet@lwn.net,
	dober@lenovo.com, mpearson@lenovo.com
Subject: Re: [PATCH] hwmon:Add MEC172x Micro Chip driver for Lenovo motherboards
Date: Fri, 15 Sep 2023 14:19:52 -0700	[thread overview]
Message-ID: <8a566102-5ea6-4449-9083-8feebe711065@roeck-us.net> (raw)
In-Reply-To: <20230915150340.301067-1-dober6023@gmail.com>

On Fri, Sep 15, 2023 at 11:03:40AM -0400, David Ober wrote:
> This addition adds in the ability for the system to scan the
> MEC172x EC chip in Lenovo ThinkStation systems to get the
> current fan RPM speeds and the Maximum speed value for each
> fan also provides the current CPU and DIMM thermal status
> 
> Signed-off-by: David Ober <dober6023@gmail.com>
> 
> Written by David Ober from Lenovo using this gmail address since
> my corporate email address does not comply with git email

FWIW, this needs to be after '---'

Anyway, thinking about this submission makes me even more concerned.

This isn't really a driver for MEC172x; it is simply a driver
accessing an EC on a set of PCs and/or laptops from Lenovo
which uses a vertain API for communication between EC and main
CPU.

Such ECs are typically accessed through ACPI. Yet, in this driver
there is no mention of ACPI, much less any protection against
parallel use by ACPI code (that access lock in get_ec_reg() doesn't
even protect against parallel access from userspace, much less
against parallel access from other drivers or ACPI, for example
by using request_region() to reserve the used memory ranges).

There needs to be explanations and clarifications 
- Why this driver will only be used for communication with MEC172X
  based chips, and why the exact EC chip is relevant in the first place
  to be mentioned as much as it is.
- How it is guaranteed that the EC is not and will never be accessed
  through ACPI.
- How it is guaranteed that there will never be any other kernel drivers
  accessing the chip.

> ---
>  drivers/hwmon/Kconfig             |  10 +
>  drivers/hwmon/Makefile            |   1 +
>  drivers/hwmon/lenovo-ec-sensors.c | 471 ++++++++++++++++++++++++++++++

Documentation missing.

Guenter

  parent reply	other threads:[~2023-09-15 21:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 15:03 David Ober
2023-09-15 16:24 ` Guenter Roeck
2023-09-15 21:19 ` Guenter Roeck [this message]
     [not found]   ` <TYZPR03MB59949F797738F5B1B8638278BDF6A@TYZPR03MB5994.apcprd03.prod.outlook.com>
2023-09-15 22:43     ` Mark Pearson
2023-09-15 22:56       ` Guenter Roeck
2023-09-20  1:53         ` Mark Pearson

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=8a566102-5ea6-4449-9083-8feebe711065@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=corbet@lwn.net \
    --cc=dober6023@gmail.com \
    --cc=dober@lenovo.com \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpearson@lenovo.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

all inboxes | Powered by JetHome®