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>] [day] [month] [year] [list]
Date:   Mon, 16 Apr 2018 11:35:57 +0200
From:   Cornelia Huck <cohuck@...hat.com>
To:     Dong Jia Shi <bjsdjshi@...ux.vnet.ibm.com>
Cc:     Dong Jia Shi <bjsdjshi@...ux.ibm.com>,
        Halil Pasic <pasic@...ux.ibm.com>, linux-s390@...r.kernel.org,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio-ccw: process ssch with interrupts disabled

On Mon, 16 Apr 2018 10:13:12 +0800
Dong Jia Shi <bjsdjshi@...ux.vnet.ibm.com> wrote:

> * Cornelia Huck <cohuck@...hat.com> [2018-04-13 16:05:09 +0200]:
> 
> > When we call ssch, an interrupt might already be pending once we
> > return from the START SUBCHANNEL instruction. Therefore we need to
> > make sure interrupts are disabled until after we're done with our
> > processing.  
> Sounds right.
> 
> > 
> > Note that the subchannel lock is the same as the ccwdevice lock that
> > is mentioned in the documentation for ccw_device_start() and friends.  
> I think this is helpful hint for me to understand the correct way of
> using sch->lock in our context, but not sure if the word "same" brings
> confusion to the others. There are many difference between them,
> considering the fact that sch->lock exists in the CSS driver for a long
> time already, and it is not external interface like ccw_dev->lock, and
> its usage is different with ccw_dev->lock in the existing code.
> It's because vfio-ccw are offering interface to the external world based
> directly on the css driver level, it makes the purpose of protecting
> what should be protected with it becomes the same.
> 
> Not a problem for me, but better with a better rewording?

Huh, my intention was to clarify things, not to make them more
confusing :)

The documentation for ccw_device_start() and friends seems to be the
only place where we explicitly state locking requirements, so that's
where I came from. Maybe simply reword the first paragraph to mention
the lock?

"When we call ssch, an interrupt might already be pending once we
return from the START SUBCHANNEL instruction. Therefore we need to make
sure interrupts are disabled while holding the subchannel lock until
after we're done with our processing."

Or maybe things are already clear enough from the code?
> 
> > 
> > Signed-off-by: Cornelia Huck <cohuck@...hat.com>
> > ---
> >  drivers/s390/cio/vfio_ccw_fsm.c | 19 ++++++++++++-------
> >  1 file changed, 12 insertions(+), 7 deletions(-)

> LGTM:
> Reviewed-by: Dong Jia Shi <bjsdjshi@...ux.ibm.com>
> 

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ