Displaying 10 results from an estimated 10 matches for "user_access_begin".
2018 Dec 30
1
[PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address
...gt; > too, not just meta-data.
>
>
> For packet copies, we can do batch copy which is pretty simple for the case
> of XDP. I've already had patches for this.
>
>
> >
> > Vaguely could see a module option (off by default)
> > where vhost basically does user_access_begin
> > when it starts running, then uses unsafe accesses
> > in vhost and tun and then user_access_end.
>
>
> Using user_access_begin() is more tricky than imaged. E.g it requires:
>
> - userspace address to be validated before through access_ok() [1]
This part is fine I...
2018 Dec 26
2
[PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address
...rong with that? Yes it's not fine-grained but OTOH
it's easy to understand.
And I guess this confirms that if we are going to worry
about smap enabled, we need to look into packet copies
too, not just meta-data.
Vaguely could see a module option (off by default)
where vhost basically does user_access_begin
when it starts running, then uses unsafe accesses
in vhost and tun and then user_access_end.
>
> >
> > > > > > > Packet or AF_XDP benefit from
> > > > > > > accessing metadata directly, we should do it as well.
> > > > > > >...
2018 Dec 26
2
[PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address
...rong with that? Yes it's not fine-grained but OTOH
it's easy to understand.
And I guess this confirms that if we are going to worry
about smap enabled, we need to look into packet copies
too, not just meta-data.
Vaguely could see a module option (off by default)
where vhost basically does user_access_begin
when it starts running, then uses unsafe accesses
in vhost and tun and then user_access_end.
>
> >
> > > > > > > Packet or AF_XDP benefit from
> > > > > > > accessing metadata directly, we should do it as well.
> > > > > > >...
2018 Dec 27
0
[PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address
...smap enabled, we need to look into packet copies
> too, not just meta-data.
For packet copies, we can do batch copy which is pretty simple for the
case of XDP. I've already had patches for this.
>
> Vaguely could see a module option (off by default)
> where vhost basically does user_access_begin
> when it starts running, then uses unsafe accesses
> in vhost and tun and then user_access_end.
Using user_access_begin() is more tricky than imaged. E.g it requires:
- userspace address to be validated before through access_ok() [1]
- It doesn't support calling a function that does...
2018 Nov 02
3
[PULL] vhost: cleanups and fixes
...>
> So just get rid of the double-underscore version. It's basically
> always a mis-optimization due to entirely historical reasons. I can
> pretty much guarantee that it's not visible in profiles.
>
> Linus
OK. So maybe we should focus on switching to user_access_begin/end +
unsafe_get_user/unsafe_put_user in a loop which does seem to be
measureable. That moves the barrier out of the loop, which seems to be
consistent with what you would expect.
--
MST
2018 Nov 02
3
[PULL] vhost: cleanups and fixes
...>
> So just get rid of the double-underscore version. It's basically
> always a mis-optimization due to entirely historical reasons. I can
> pretty much guarantee that it's not visible in profiles.
>
> Linus
OK. So maybe we should focus on switching to user_access_begin/end +
unsafe_get_user/unsafe_put_user in a loop which does seem to be
measureable. That moves the barrier out of the loop, which seems to be
consistent with what you would expect.
--
MST
2018 Nov 02
2
[PULL] vhost: cleanups and fixes
On Fri, Nov 02, 2018 at 11:46:36AM +0000, Mark Rutland wrote:
> On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> > On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook at chromium.org> wrote:
> > >
> > > + memset(&rsp, 0, sizeof(rsp));
> > > + rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > > + resp =
2018 Nov 02
2
[PULL] vhost: cleanups and fixes
On Fri, Nov 02, 2018 at 11:46:36AM +0000, Mark Rutland wrote:
> On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> > On Thu, Nov 1, 2018 at 4:00 PM Kees Cook <keescook at chromium.org> wrote:
> > >
> > > + memset(&rsp, 0, sizeof(rsp));
> > > + rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > > + resp =
2018 Dec 25
2
[PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address
On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote:
>
> On 2018/12/25 ??2:10, Michael S. Tsirkin wrote:
> > On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote:
> > > On 2018/12/14 ??8:36, Michael S. Tsirkin wrote:
> > > > On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote:
> > > > > On 2018/12/13 ??11:44, Michael S. Tsirkin
2018 Dec 25
2
[PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address
On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote:
>
> On 2018/12/25 ??2:10, Michael S. Tsirkin wrote:
> > On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote:
> > > On 2018/12/14 ??8:36, Michael S. Tsirkin wrote:
> > > > On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote:
> > > > > On 2018/12/13 ??11:44, Michael S. Tsirkin