virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] vhost: fix ranges when call vhost_iotlb_itree_first()
@ 2022-11-08 10:34 Stefano Garzarella
  2022-11-08 10:34 ` [PATCH 1/2] vringh: fix range used in iotlb_translate() Stefano Garzarella
  2022-11-08 10:34 ` [PATCH 2/2] vhost: fix range used in translate_desc() Stefano Garzarella
  0 siblings, 2 replies; 7+ messages in thread
From: Stefano Garzarella @ 2022-11-08 10:34 UTC (permalink / raw)
  To: virtualization; +Cc: kvm, Michael S. Tsirkin, netdev, linux-kernel

While I was working on vringh to support VA in vringh_*_iotlb()
I saw that the range we use in iotlb_translate() when we call
vhost_iotlb_itree_first() was not correct IIUC.
So I looked at all the calls and found that in vhost.c as well.

I didn't observe a failure and I don't have a reproducer because
I noticed the problem by looking at the code.

Maybe we didn't have a problem, because a shorter range was being
returned anyway and the loop stopped taking into account the total
amount of bytes translated, but I think it's better to fix.

Thanks,
Stefano

Stefano Garzarella (2):
  vringh: fix range used in iotlb_translate()
  vhost: fix range used in translate_desc()

 drivers/vhost/vhost.c  | 4 ++--
 drivers/vhost/vringh.c | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

-- 
2.38.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-09 10:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-08 10:34 [PATCH 0/2] vhost: fix ranges when call vhost_iotlb_itree_first() Stefano Garzarella
2022-11-08 10:34 ` [PATCH 1/2] vringh: fix range used in iotlb_translate() Stefano Garzarella
2022-11-09  3:24   ` Jason Wang
2022-11-08 10:34 ` [PATCH 2/2] vhost: fix range used in translate_desc() Stefano Garzarella
2022-11-09  3:28   ` Jason Wang
2022-11-09  8:18     ` Stefano Garzarella
2022-11-09 10:10       ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).