Re: [PATCH v2 1/6] leds: netdev trigger: use memcpy in device_name_store

2019-03-27 Thread Jacek Anaszewski
On 3/27/19 10:31 PM, Rasmus Villemoes wrote: On 27/03/2019 22.20, Jacek Anaszewski wrote: Thanks for the heads-up. I must admit I'm hitting into that for the first time. After "git am" it was all OK, but it got screwed up after "git rebase -i". And having "commit.cleanup = scissors" set

Re: [PATCH v2 1/6] leds: netdev trigger: use memcpy in device_name_store

2019-03-27 Thread Rasmus Villemoes
On 27/03/2019 22.20, Jacek Anaszewski wrote: > Thanks for the heads-up. I must admit I'm hitting into that for the > first time. After "git am" it was all OK, but it got screwed up after > "git rebase -i". And having "commit.cleanup = scissors" set globally all > the time is annoying if one

Re: [PATCH v2 1/6] leds: netdev trigger: use memcpy in device_name_store

2019-03-27 Thread Jacek Anaszewski
On 3/27/19 4:26 PM, Rasmus Villemoes wrote: On 26/03/2019 20.53, Jacek Anaszewski wrote: Hi Rasmus, Thank you for the patch. On 3/14/19 3:06 PM, Rasmus Villemoes wrote: If userspace doesn't end the input with a newline (which can easily happen if the write happens from a C program that does

Re: [PATCH v2 1/6] leds: netdev trigger: use memcpy in device_name_store

2019-03-27 Thread Rasmus Villemoes
On 26/03/2019 20.53, Jacek Anaszewski wrote: > Hi Rasmus, > > Thank you for the patch. > > On 3/14/19 3:06 PM, Rasmus Villemoes wrote: >> If userspace doesn't end the input with a newline (which can easily >> happen if the write happens from a C program that does write(fd, >> iface,

Re: [PATCH v2 1/6] leds: netdev trigger: use memcpy in device_name_store

2019-03-26 Thread Jacek Anaszewski
Hi Rasmus, Thank you for the patch. On 3/14/19 3:06 PM, Rasmus Villemoes wrote: If userspace doesn't end the input with a newline (which can easily happen if the write happens from a C program that does write(fd, iface, strlen(iface))), we may end up including garbage from a previous, longer

Re: [PATCH v2 1/6] leds: netdev trigger: use memcpy in device_name_store

2019-03-18 Thread Pavel Machek
On Thu 2019-03-14 15:06:14, Rasmus Villemoes wrote: > If userspace doesn't end the input with a newline (which can easily > happen if the write happens from a C program that does write(fd, > iface, strlen(iface))), we may end up including garbage from a > previous, longer value in the device_name.

[PATCH v2 1/6] leds: netdev trigger: use memcpy in device_name_store

2019-03-14 Thread Rasmus Villemoes
If userspace doesn't end the input with a newline (which can easily happen if the write happens from a C program that does write(fd, iface, strlen(iface))), we may end up including garbage from a previous, longer value in the device_name. For example # cat device_name # printf 'eth12' >