lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e723db8-0d55-fae6-288e-9d95905592db@redhat.com>
Date:   Wed, 3 Jun 2020 13:18:54 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     "Michael S. Tsirkin" <mst@...hat.com>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH RFC] uaccess: user_access_begin_after_access_ok()


On 2020/6/3 下午12:18, Al Viro wrote:
> On Wed, Jun 03, 2020 at 11:57:11AM +0800, Jason Wang wrote:
>
>>> How widely do you hope to stretch the user_access areas, anyway?
>>
>> To have best performance for small packets like 64B, if possible, we want to
>> disable STAC not only for the metadata access done by vhost accessors but
>> also the data access via iov iterator.
> If you want to try and convince Linus to go for that, make sure to Cc
> me on that thread.  Always liked quality flame...
>
> The same goes for interval tree lookups with uaccess allowed.  IOW, I _really_
> doubt that it's a good idea.


I see. We are just seeking an approach to perform better in order to 
compete with userspace dpdk backends.

I tried another approach of using direct mapping + mmu notifier [1] but 
the synchronization with MMU notifier is not easy to perform well.

[1] https://patchwork.kernel.org/patch/11133009/


>
>>> Incidentally, who had come up with the name __vhost_get_user?
>>> Makes for lovey WTF moment for readers - esp. in vhost_put_user()...
>>
>> I think the confusion comes since it does not accept userspace pointer (when
>> IOTLB is enabled).
>>
>> How about renaming it as vhost_read()/vhost_write() ?
> Huh?
>
> __vhost_get_user() is IOTLB remapping of userland pointer.  It does not access
> userland memory.  Neither for read, nor for write.  It is used by vhost_get_user()
> and vhost_put_user().
>
> Why would you want to rename it into vhost_read _or_ vhost_write, and in any case,
> how do you give one function two names?  IDGI...


I get you know, I thought you're concerning the names of 
vhost_get_user()/vhost_put_user() but actually __vhost_get_user().

Maybe something like __vhost_fetch_uaddr() is better.

Thanks


>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ