Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Akshay Gupta" <Akshay.Gupta@amd.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Guenter Roeck" <linux@roeck-us.net>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	shyam-sundar.s-k@amd.com, gautham.shenoy@amd.com,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	naveenkrishna.chatradhi@amd.com, anand.umarji@amd.com
Subject: Re: [PATCH v6 06/11] misc: amd-sbi: Add support for AMD_SBI IOCTL
Date: Tue, 25 Mar 2025 14:37:36 +0100	[thread overview]
Message-ID: <eedd6e17-b6e0-4e02-8c12-ba835b0dba15@app.fastmail.com> (raw)
In-Reply-To: <b26e9abc-10bb-46a0-be05-d0cd2ce835bd@amd.com>

On Tue, Mar 25, 2025, at 13:35, Gupta, Akshay wrote:
> On 3/24/2025 9:10 PM, Arnd Bergmann wrote:
>
> Link for the documentation: 
> https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/57883.zip 
> <https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/57883.zip>
> You may refer to section: 5.4.2.2 SB-RMI Mailbox Service
> At present, more than 70 mailbox commands ids are supported.
> The number is increasing with each platforms.
> however, the input and output for all mailbox commands are maintained 
> as 32 bit, hence, we can use the same structure and differentiate the 
> functionality.

The large number of mailbox commands is exactly what I'm worried
about. Having 70 well-documented ioctl command numbers is not a problem,
since the numbers are cheap, but having an unfiltered pass-through
inteface between userspace and a PMIC is scary, and it's worse if
future hardware version has additional registers here.

A lot of the values reported through this interface could simply
be sysfs files, some look like they should integrate into existing
kernel subsystems (scheduler, pci, ...) and not be directly
visible to userspace.

      Arnd

  reply	other threads:[~2025-03-25 13:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-24 14:58 [PATCH v6 00/11] misc: Move AMD side band interface(SBI) functionality Akshay Gupta
2025-03-24 14:58 ` [PATCH v6 01/11] hwmon/misc: amd-sbi: Move core sbrmi from hwmon to misc Akshay Gupta
2025-03-24 14:58 ` [PATCH v6 02/11] misc: amd-sbi: Move protocol functionality to core file Akshay Gupta
2025-03-24 14:58 ` [PATCH v6 03/11] misc: amd-sbi: Move hwmon device sensor as separate entity Akshay Gupta
2025-03-24 14:58 ` [PATCH v6 04/11] misc: amd-sbi: Use regmap subsystem Akshay Gupta
2025-03-24 14:58 ` [PATCH v6 05/11] misc: amd-sbi: Optimize the wait condition for mailbox command completion Akshay Gupta
2025-03-24 14:58 ` [PATCH v6 06/11] misc: amd-sbi: Add support for AMD_SBI IOCTL Akshay Gupta
2025-03-24 15:40   ` Arnd Bergmann
2025-03-25 12:35     ` Gupta, Akshay
2025-03-25 13:37       ` Arnd Bergmann [this message]
2025-03-26 11:46         ` Gupta, Akshay
2025-03-24 14:58 ` [PATCH v6 07/11] misc: amd-sbi: Add support for mailbox error codes Akshay Gupta
2025-03-24 15:26   ` Arnd Bergmann
2025-03-25 12:35     ` Gupta, Akshay
2025-03-24 14:58 ` [PATCH v6 08/11] misc: amd-sbi: Add support for CPUID protocol Akshay Gupta
2025-03-24 15:29   ` Arnd Bergmann
2025-03-25 12:35     ` Gupta, Akshay
2025-03-24 14:58 ` [PATCH v6 09/11] misc: amd-sbi: Add support for read MCA register protocol Akshay Gupta
2025-03-24 14:58 ` [PATCH v6 10/11] misc: amd-sbi: Add support for register xfer Akshay Gupta
2025-03-24 14:58 ` [PATCH v6 11/11] misc: amd-sbi: Add document for AMD SB IOCTL description Akshay Gupta

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=eedd6e17-b6e0-4e02-8c12-ba835b0dba15@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=Akshay.Gupta@amd.com \
    --cc=anand.umarji@amd.com \
    --cc=gautham.shenoy@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mario.limonciello@amd.com \
    --cc=naveenkrishna.chatradhi@amd.com \
    --cc=shyam-sundar.s-k@amd.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