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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 7 Mar 2024 02:58:00 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Jason Wang <jasowang@...hat.com>
Cc: Cindy Lu <lulu@...hat.com>, xieyongji@...edance.com,
	linux-kernel@...r.kernel.org, maxime.coquelin@...hat.com
Subject: Re: [PATCH v4 5/5] Documentation: Add reconnect process for VDUSE

On Mon, Mar 04, 2024 at 01:11:02PM +0800, Jason Wang wrote:
> On Wed, Feb 7, 2024 at 1:47 PM Cindy Lu <lulu@...hat.com> wrote:
> >
> > Add a document explaining the reconnect process, including what the
> > Userspace App needs to do and how it works with the kernel.
> >
> > Signed-off-by: Cindy Lu <lulu@...hat.com>
> > ---
> >  Documentation/userspace-api/vduse.rst | 32 +++++++++++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >
> > diff --git a/Documentation/userspace-api/vduse.rst b/Documentation/userspace-api/vduse.rst
> > index bdb880e01132..a2be85e0e516 100644
> > --- a/Documentation/userspace-api/vduse.rst
> > +++ b/Documentation/userspace-api/vduse.rst
> > @@ -231,3 +231,35 @@ able to start the dataplane processing as follows:
> >     after the used ring is filled.
> >
> >  For more details on the uAPI, please see include/uapi/linux/vduse.h.
> > +
> > +HOW VDUSE devices reconnectoin works
> 
> Typos, let's use a spell checker.
> 
> > +----------------
> > +0. Userspace APP checks if the device /dev/vduse/vduse_name exists.
> > +   If it does not exist, need to create the instance.goto step 1
> > +   If it does exist, it means this is a reconnect and goto step 3.
> > +
> > +1. Create a new VDUSE instance with ioctl(VDUSE_CREATE_DEV) on
> > +   /dev/vduse/control.
> > +
> > +2. When the ioctl(VDUSE_CREATE_DEV) function is called, the kernel allocates memory
> > +   to save the reconnect information.
> > +
> > +3. Userspace App need to mmap the pages to userspace
> 
> Need to describe what kind of pages need to be mapped. And what's more:
> 
> Does this require cooperation from the disconnected application? If
> yes, how to distinguish from the one that is not cooperative (doesn't
> support reconnection)?
> 
> > +   Userspace App need to map Pages 0 to vq_number for vq status,
> > +   Users can define the structure for saving the reconnect information themselves
> > +   in the userspace.
> > +
> > +4. Check if the infomatin sutiable for reconnect
> 
> Typos again.
> 
> > +   If this is reconnect:
> > +   Before attempting to reconnect, The userspace application need to the
> > +   ioctl VDUSE_DEV_GET_CONFIG,VDUSE_DEV_GET_STATUS,VDUSE_DEV_GET_FEATURES...
> 
> "..." is not good, let's describe the steps in detail.
> 
> > +   to get the and confirm if these information are suitable for reconnecting.
> > +
> > +5. Start the userspace App.
> 
> I had a hard time understanding this, does it mean the application
> needs to restart itself?
> 
> > +   While running, the application should store the relevant information about
> > +   reconnections in mapped pages.
> > +   When calling ioctl VDUSE_VQ_GET_INFO from the userspace APP
> 
> Abbrev is not good here. Let's use "application" for consistency.
> 
> > to get vq information, it is necessary
> > +   to check if this is a reconnection.
> 
> How to check whether or not it is reconnected?
> 
> > If a reconnection has occurred, the vq-related information
> > +   must be get from the mapped pages.
> > +
> > +6. When the Userspace App exits, it is necessary to unmap all the reconnect pages.
> > --
> > 2.43.0
> >
> 
> Thanks

Are comments only on patch 5? Ack the rest?

-- 
MST


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ