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]
Date:	Tue, 1 Dec 2015 10:19:36 -0800
From:	Joshua Clayton <stillcompiling@...il.com>
To:	Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Cc:	Alessandro Zummo <a.zummo@...ertech.it>,
	rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/9] rtc-pcf2123: clean up writes to the rtc chip

On Tue, 24 Nov 2015 23:16:26 +0100
Alexandre Belloni <alexandre.belloni@...e-electrons.com> wrote:

> On 04/11/2015 at 07:36:34 -0800, Joshua Clayton wrote :
> > +static int pcf2123_write(struct device *dev, u8 *txbuf, size_t
> > size) +{
> > +	struct spi_device *spi = to_spi_device(dev);
> > +	int ret;
> > +
> > +	if (txbuf[0] > PCF2123_REG_MAX)
> > +		return -EFAULT;
> > +
> 
> Is that test really necessary? From what I understand the driver
> always controls which register is written.
> 

In the larger context of the driver, you are correct, there is 
no way for an out of range request unless someone were to add new code.
I can remove it. 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ