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: <20231103151651.000045ae@Huawei.com>
Date:   Fri, 3 Nov 2023 15:16:51 +0000
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     Andrew Jeffery <andrew@...econstruct.com.au>
CC:     <minyard@....org>, <openipmi-developer@...ts.sourceforge.net>,
        <linux-kernel@...r.kernel.org>, <aladyshev22@...il.com>,
        <jk@...econstruct.com.au>
Subject: Re: [PATCH 05/10] ipmi: kcs_bmc: Define client actions in terms of
 kcs_bmc_client

On Fri,  3 Nov 2023 16:45:17 +1030
Andrew Jeffery <andrew@...econstruct.com.au> wrote:

> Operations such as reading and writing from hardware and updating the
> events of interest are operations in which the client is interested, but
> are applied to the device. Strengthen the concept of the client in the
> subsystem and clean up some call-sites by translating between the client
> and device types in the core of the KCS subsystem.
> 
> Signed-off-by: Andrew Jeffery <andrew@...econstruct.com.au>
> ---
>  drivers/char/ipmi/kcs_bmc.c           | 67 ++++++++++++++++++---------
>  drivers/char/ipmi/kcs_bmc_cdev_ipmi.c | 50 ++++++++++----------
>  drivers/char/ipmi/kcs_bmc_client.h    | 15 +++---
>  drivers/char/ipmi/kcs_bmc_serio.c     | 10 ++--
>  4 files changed, 81 insertions(+), 61 deletions(-)
> 
> diff --git a/drivers/char/ipmi/kcs_bmc.c b/drivers/char/ipmi/kcs_bmc.c
> index 5a3f199241d2..d70e503041bd 100644
> --- a/drivers/char/ipmi/kcs_bmc.c
> +++ b/drivers/char/ipmi/kcs_bmc.c
> @@ -22,33 +22,53 @@ static LIST_HEAD(kcs_bmc_drivers);
>  
>  /* Consumer data access */
>  
> -u8 kcs_bmc_read_data(struct kcs_bmc_device *kcs_bmc)
> +static void kcs_bmc_client_validate(struct kcs_bmc_client *client)
>  {
> -	return kcs_bmc->ops->io_inputb(kcs_bmc, kcs_bmc->ioreg.idr);
> +	WARN_ONCE(client != READ_ONCE(client->dev->client), "KCS client confusion detected");

Is this intended as runtime validation or to catch bugs?
If just catch bugs then fair enough.

With that question answered based on my somewhat vague understanding of the kcs subsystem.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>

> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ