Re: [PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-29 Thread Linus Walleij
On Thu, May 25, 2017 at 10:33 AM, Bartosz Golaszewski wrote: > We're currently only checking the first character of the input to the > debugfs event files, so a string like '0sdfdsf' is valid and indicates > a falling edge event. > > Be more strict and only allow '0', '1', '0\n' &

Re: [PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-29 Thread Linus Walleij
On Thu, May 25, 2017 at 10:33 AM, Bartosz Golaszewski wrote: > We're currently only checking the first character of the input to the > debugfs event files, so a string like '0sdfdsf' is valid and indicates > a falling edge event. > > Be more strict and only allow '0', '1', '0\n' & '1\n'. > >

Re: [PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-29 Thread Bartosz Golaszewski
2017-05-27 18:47 GMT+02:00 Andy Shevchenko : > On Sat, May 27, 2017 at 7:45 PM, Andy Shevchenko > wrote: >> On Thu, May 25, 2017 at 11:33 AM, Bartosz Golaszewski wrote: >>> We're currently only checking the first character of

Re: [PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-29 Thread Bartosz Golaszewski
2017-05-27 18:47 GMT+02:00 Andy Shevchenko : > On Sat, May 27, 2017 at 7:45 PM, Andy Shevchenko > wrote: >> On Thu, May 25, 2017 at 11:33 AM, Bartosz Golaszewski wrote: >>> We're currently only checking the first character of the input to the >>> debugfs event files, so a string like '0sdfdsf'

Re: [PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-27 Thread Andy Shevchenko
On Sat, May 27, 2017 at 7:45 PM, Andy Shevchenko wrote: > On Thu, May 25, 2017 at 11:33 AM, Bartosz Golaszewski wrote: >> We're currently only checking the first character of the input to the >> debugfs event files, so a string like '0sdfdsf' is valid

Re: [PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-27 Thread Andy Shevchenko
On Sat, May 27, 2017 at 7:45 PM, Andy Shevchenko wrote: > On Thu, May 25, 2017 at 11:33 AM, Bartosz Golaszewski wrote: >> We're currently only checking the first character of the input to the >> debugfs event files, so a string like '0sdfdsf' is valid and indicates >> a falling edge event. >> >>

Re: [PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-27 Thread Andy Shevchenko
On Thu, May 25, 2017 at 11:33 AM, Bartosz Golaszewski wrote: > We're currently only checking the first character of the input to the > debugfs event files, so a string like '0sdfdsf' is valid and indicates > a falling edge event. > > Be more strict and only allow '0', '1', '0\n' &

Re: [PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-27 Thread Andy Shevchenko
On Thu, May 25, 2017 at 11:33 AM, Bartosz Golaszewski wrote: > We're currently only checking the first character of the input to the > debugfs event files, so a string like '0sdfdsf' is valid and indicates > a falling edge event. > > Be more strict and only allow '0', '1', '0\n' & '1\n'. Why not

[PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-25 Thread Bartosz Golaszewski
We're currently only checking the first character of the input to the debugfs event files, so a string like '0sdfdsf' is valid and indicates a falling edge event. Be more strict and only allow '0', '1', '0\n' & '1\n'. Signed-off-by: Bartosz Golaszewski ---

[PATCH 05/10] gpio: mockup: improve the debugfs input sanitization

2017-05-25 Thread Bartosz Golaszewski
We're currently only checking the first character of the input to the debugfs event files, so a string like '0sdfdsf' is valid and indicates a falling edge event. Be more strict and only allow '0', '1', '0\n' & '1\n'. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-mockup.c | 14