Re: [PATCH] evh_bytechan: fix out of bounds accesses

From
Timur Tabi <timur@kernel.org>
Date
2020-01-14 01:12:37
Reply to
Stephen Rothwell, 2020-01-13
On 1/13/20 2:25 PM, Stephen Rothwell wrote:
The problem is not really the declaration, the problem is that
ev_byte_channel_send always accesses 16 bytes from the buffer and it is
not always passed a buffer that long (in one case it is passed a
pointer to a single byte).  So the alternative to the memcpy approach I
have take is to complicate ev_byte_channel_send so that only accesses
count bytes from the buffer.
Ah, I see now.  This is all coming back to me.

I would prefer that ev_byte_channel_send() is updated to access only 'count' bytes.  If that means adding a memcpy to the ev_byte_channel_send() itself, then so be it.  Trying to figure out how to stuff n bytes into 4 32-bit registers is probably not worth the effort.
Thread (28 messages) 28 messages, 7 authors, last reply 2020-03-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help