Re: [PATCH] firmware: xilinx: fix debugfs write handler

2019-03-18 Thread Michal Simek
On 18. 02. 19 22:43, Jann Horn wrote: > - Userspace wants to write a string with `len` bytes, not counting the >terminating NULL, so we should allocate `len+1` bytes. It looks like the >current code relied on having a nullbyte directly behind `kern_buff`, >which happens to work reliabl

RE: [PATCH] firmware: xilinx: fix debugfs write handler

2019-03-05 Thread Jolly Shah
Acked-by: Jolly Shah > -Original Message- > From: Jann Horn > Sent: Monday, February 18, 2019 1:43 PM > To: Michal Simek ; ja...@google.com > Cc: Rajan Vaja ; Jolly Shah ; linux- > arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org > Subject: [PATCH]

Re: [PATCH] firmware: xilinx: fix debugfs write handler

2019-02-28 Thread Michal Simek
On 18. 02. 19 22:43, Jann Horn wrote: > - Userspace wants to write a string with `len` bytes, not counting the >terminating NULL, so we should allocate `len+1` bytes. It looks like the >current code relied on having a nullbyte directly behind `kern_buff`, >which happens to work reliabl

[PATCH] firmware: xilinx: fix debugfs write handler

2019-02-18 Thread Jann Horn
- Userspace wants to write a string with `len` bytes, not counting the terminating NULL, so we should allocate `len+1` bytes. It looks like the current code relied on having a nullbyte directly behind `kern_buff`, which happens to work reliably as long as `len` isn't one of the kmalloc