Re: [PATCH] vhost: fix end of range for access_ok

2017-08-22 Thread Koichiro Den
On Mon, 2017-08-21 at 22:45 +0300, Michael S. Tsirkin wrote: > During access_ok checks, addr increases as we iterate over the data > structure, thus addr + len - 1 will point beyond the end of region we > are translating.  Harmless since we then verify that the region covers > addr, but let's not

Re: [PATCH] vhost: fix end of range for access_ok

2017-08-22 Thread Koichiro Den
On Mon, 2017-08-21 at 22:45 +0300, Michael S. Tsirkin wrote: > During access_ok checks, addr increases as we iterate over the data > structure, thus addr + len - 1 will point beyond the end of region we > are translating.  Harmless since we then verify that the region covers > addr, but let's not

[PATCH] vhost: fix end of range for access_ok

2017-08-21 Thread Michael S. Tsirkin
During access_ok checks, addr increases as we iterate over the data structure, thus addr + len - 1 will point beyond the end of region we are translating. Harmless since we then verify that the region covers addr, but let's not waste cpu cycles. Reported-by: Koichiro Den

[PATCH] vhost: fix end of range for access_ok

2017-08-21 Thread Michael S. Tsirkin
During access_ok checks, addr increases as we iterate over the data structure, thus addr + len - 1 will point beyond the end of region we are translating. Harmless since we then verify that the region covers addr, but let's not waste cpu cycles. Reported-by: Koichiro Den Signed-off-by: Michael