Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271564
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file |
| Date | 2015-11-17 19:50 +0100 |
| Message-ID | <qvTui-is-33@gated-at.bofh.it> (permalink) |
| References | <qvQmJ-6NX-7@gated-at.bofh.it> <qvQmK-6NX-15@gated-at.bofh.it> <qvTaW-bm-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] spi: Add file i/o to spidev_test Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
[PATCH 8/8] spi: Move spi code from Documentation to tools Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
Re: [PATCH 8/8] spi: Move spi code from Documentation to tools Mark Brown <broonie@kernel.org> - 2015-11-17 19:20 +0100
[PATCH 5/8] Documentation/spi/spidev_test.c: check error Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
[PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file Anton Bondarenko <anton.bondarenko.sama@gmail.com> - 2015-11-17 19:30 +0100
Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file Mark Brown <broonie@kernel.org> - 2015-11-17 19:50 +0100
Re: [PATCH 3/8] Documentation/spi/spidev_test.c: accept input from a file Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 20:30 +0100
[PATCH 7/8] tools/Makefile: minor whitespace cleanup Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
Re: [PATCH 7/8] tools/Makefile: minor whitespace cleanup Mark Brown <broonie@kernel.org> - 2015-11-17 19:10 +0100
Re: [PATCH 7/8] tools/Makefile: minor whitespace cleanup Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 20:50 +0100
[PATCH 6/8] Documentation/spi/spidev_test.c: fix whitespace Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
[PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 16:30 +0100
Re: [PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Mark Brown <broonie@kernel.org> - 2015-11-17 18:50 +0100
Re: [PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 20:30 +0100
Re: [PATCH 2/8] Documentation/spi/spidev_test.c: clean up input_tx Mark Brown <broonie@kernel.org> - 2015-11-18 00:00 +0100
Re: [PATCH 0/8] spi: Add file i/o to spidev_test Mark Brown <broonie@kernel.org> - 2015-11-17 16:40 +0100
Re: [PATCH 0/8] spi: Add file i/o to spidev_test Joshua Clayton <stillcompiling@gmail.com> - 2015-11-17 17:20 +0100
Re: [PATCH 0/8] spi: Add file i/o to spidev_test Mark Brown <broonie@kernel.org> - 2015-11-17 18:00 +0100
[PATCH v2 0/6] spi: Add file i/o to spidev_test Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 1/6] spi: Move spi code from Documentation to tools Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 6/6] spi: spidev_test: fix whitespace Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 5/6] spi: spidev_test: check error Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 2/6] spi: spidev_test: transfer_escaped_string function Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
[PATCH v2 4/6] spi: spidev_test: output to a file Joshua Clayton <stillcompiling@gmail.com> - 2015-11-18 23:40 +0100
csiph-web