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: <e80fcdb4-202b-f339-87c9-987a5b5e6fe3@linux.ibm.com>
Date:   Tue, 25 May 2021 10:07:46 -0400
From:   "Jason J. Herne" <jjherne@...ux.ibm.com>
To:     Jason Gunthorpe <jgg@...dia.com>
Cc:     Tony Krowiak <akrowiak@...ux.ibm.com>, linux-s390@...r.kernel.org,
        linux-kernel@...r.kernel.org, borntraeger@...ibm.com,
        cohuck@...hat.com, pasic@...ux.vnet.ibm.com,
        alex.williamson@...hat.com, kwankhede@...dia.com,
        frankja@...ux.ibm.com, david@...hat.com, imbrenda@...ux.ibm.com,
        hca@...ux.ibm.com
Subject: Re: [PATCH v4 2/2] s390/vfio-ap: control access to PQAP(AQIC)
 interception handler

On 5/25/21 9:26 AM, Jason Gunthorpe wrote:
> On Tue, May 25, 2021 at 09:24:59AM -0400, Jason J. Herne wrote:
>> change the function pointer to point to vfio_ap_ops:handle_pqap(). When we
>> unload the module we change the function pointer back to the stub.  The
>> updates should be atomic operations so no lock needed, right?
> 
> No
> 
> Jason
> 

Okay... Would you be willing to elaborate, please? A counter argument, or a simple 
explanation would be appreciated. A simple "no" does not really do much to advance the 
discussion :).

I'm fairly sure that a 64-bit pointer would be updated atomically. A reader of this value 
is either going to see value A or value B, not the high half of A and the low half of B. 
Maybe we also need a memory barrier to prevent stale values from being seen on another core?

-- 
-- Jason J. Herne (jjherne@...ux.ibm.com)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ