lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ba63f830-4758-49aa-a63e-f204a8eec1b4@www.fastmail.com>
Date:   Mon, 12 Apr 2021 11:03:52 +0930
From:   "Andrew Jeffery" <andrew@...id.au>
To:     "Arnd Bergmann" <arnd@...nel.org>,
        "Dmitry Torokhov" <dmitry.torokhov@...il.com>
Cc:     openipmi-developer@...ts.sourceforge.net,
        "OpenBMC Maillist" <openbmc@...ts.ozlabs.org>,
        "Corey Minyard" <minyard@....org>, "Joel Stanley" <joel@....id.au>,
        "Ryan Chen" <ryan_chen@...eedtech.com>,
        DTML <devicetree@...r.kernel.org>,
        "Tomer Maimon" <tmaimon77@...il.com>,
        linux-aspeed <linux-aspeed@...ts.ozlabs.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "Avi Fishman" <avifishman70@...il.com>,
        "Patrick Venture" <venture@...gle.com>,
        "Linus Walleij" <linus.walleij@...aro.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        "Tali Perry" <tali.perry1@...il.com>,
        "Rob Herring" <robh+dt@...nel.org>,
        "Lee Jones" <lee.jones@...aro.org>,
        "Chia-Wei, Wang" <chiawei_wang@...eedtech.com>,
        "Linux ARM" <linux-arm-kernel@...ts.infradead.org>,
        "Benjamin Fair" <benjaminfair@...gle.com>
Subject: Re: [PATCH v2 16/21] ipmi: kcs_bmc: Add a "raw" character device interface

On Fri, 9 Apr 2021, at 17:25, Arnd Bergmann wrote:
> On Fri, Mar 19, 2021 at 7:31 AM Andrew Jeffery <andrew@...id.au> wrote:
> >
> > The existing IPMI chardev encodes IPMI behaviours as the name suggests.
> > However, KCS devices are useful beyond IPMI (or keyboards), as they
> > provide a means to generate IRQs and exchange arbitrary data between a
> > BMC and its host system.
> 
> I only noticed the series after Joel asked about the DT changes on the arm
> side. One question though:
> 
> How does this related to the drivers/input/serio/ framework that also talks
> to the keyboard controller for things that are not keyboards?

I've taken a brief look and I feel they're somewhat closely related.

It's plausible that we could wrangle the code so the Aspeed and Nuvoton 
KCS drivers move under drivers/input/serio. If you squint, the i8042 
serio device driver has similarities with what the Aspeed and Nuvoton 
device drivers are providing to the KCS IPMI stack.

Both the KCS IPMI and raw chardev I've implemented in this patch need 
both read and write access to the status register (STR). serio could 
potentially expose its value through serio_interrupt() using the 
SERIO_OOB_DATA flag, but I haven't put any thought into it beyond this 
sentence. We'd need some extra support for writing STR via the serio 
API. I'm not sure that fits into the abstraction (unless we make 
serio_write() take a flags argument?).

In that vein, the serio_raw interface is close to the functionality 
that the raw chardev provides in this patch, though again serio_raw 
lacks userspace access to STR. Flags are ignored in the ->interrupt() 
callback so all values received via ->interrupt() are exposed as data. 
The result is there's no way to take care of SERIO_OOB_DATA in the 
read() path. Given that, I think we'd have to expose an ioctl() to 
access the STR value after taking care of SERIO_OOB_DATA in 
->interrupt().

I'm not sure where that lands us.

Dmitry, any thoughts here?

> Are these
> separate communication channels on adjacent I/O ports, or does there
> need to be some arbitration?

As it stands there's no arbitration.

Cheers,

Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ