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: <c40d87cf-17b9-4500-ba87-35d14aeb1b4a@t-8ch.de>
Date: Tue, 28 May 2024 09:15:27 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Tzung-Bi Shih <tzungbi@...nel.org>
Cc: Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>, 
	Benson Leung <bleung@...omium.org>, Lee Jones <lee@...nel.org>, Guenter Roeck <groeck@...omium.org>, 
	linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org, chrome-platform@...ts.linux.dev, 
	Dustin Howett <dustin@...ett.net>, Mario Limonciello <mario.limonciello@....com>, 
	Moritz Fischer <mdf@...nel.org>, Stephen Horvath <s.horvath@...look.com.au>, 
	Rajas Paranjpe <paranjperajas@...il.com>
Subject: Re: [PATCH v3 1/3] platform/chrome: cros_ec_proto: Introduce
 cros_ec_cmd_readmem()

On 2024-05-28 06:39:03+0000, Tzung-Bi Shih wrote:
> On Mon, May 27, 2024 at 10:58:31PM +0200, Thomas Weißschuh wrote:
> > +/**
> > + * cros_ec_cmd_readmem - Read from EC memory.
> > + *
> > + * @ec_dev: EC device
> > + * @offset: Is within EC_LPC_ADDR_MEMMAP region.
> > + * @size: Number of bytes to read. zero means "read a string" (including
> > + *        the trailing '\0').
> 
> The behavior is cros_ec_lpc_readmem() only but not for cros_ec_cmd().

Indeed.
I thought I checked for this specifically, but got it wrong.

I'll drop the docs and add a

	if (!size)
		return -EINVAL;

to make sure nobody starts relying on that behaviour when writing a
driver against an LPC EC.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ