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, 17 Nov 2015 18:46:27 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Anton Bondarenko <anton.bondarenko.sama@...il.com>
Cc:	Joshua Clayton <stillcompiling@...il.com>,
	Jonathan Corbet <corbet@....net>,
	Adrian Remonda <adrianremonda@...il.com>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-spi@...r.kernel.org
Subject: Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a
 file

On Tue, Nov 17, 2015 at 07:26:54PM +0100, Anton Bondarenko wrote:
> On 17.11.2015 16:24, Joshua Clayton wrote:

> >+	if (sb.st_size > 4096)
> >+		pabort("input file exceeds spidev's 4k limit");

> This is not a true. IIRC PAGE_SIZE is the default buffer size for spidev,
> but can be changed using bufsiz module parameter.
> Just 'insmod spidev bufsiz=X', where X is number of bytes.

Right, there's also various options for changing PAGE_SIZE on some
architectures.  I was going to go and check what we actually do here but
in general it does seem better to just let the kernel worry about
validating things like this - it needs to do that anyway and it means
that if someone improves the kernel code to accept larger buffers then
the tool will automatically be able to use them instead of requiring
people to remember to separately update the tool.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ