Re: [XTF] xenbus: fix xenbus_write() ring overflow

2020-06-03 Thread Andrew Cooper
On 03/06/2020 09:21, Pawel Wieczorkiewicz wrote: > Currently the xenbus_write() does not handle ring wrapping around > correctly. When ring buffer is almost full and there is not enough > space for next packet (e.g. there is 12 bytes of space left, but the > packet header needs to transmit 16 bytes

[XTF] xenbus: fix xenbus_write() ring overflow

2020-06-03 Thread Pawel Wieczorkiewicz
Currently the xenbus_write() does not handle ring wrapping around correctly. When ring buffer is almost full and there is not enough space for next packet (e.g. there is 12 bytes of space left, but the packet header needs to transmit 16 bytes) the memcpy() goes out of the ring buffer boundry. Inste