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:   Fri, 10 Dec 2021 09:45:56 +0100
From:   Niklas Schnelle <schnelle@...ux.ibm.com>
To:     Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Matthew Rosato <mjrosato@...ux.ibm.com>,
        linux-s390@...r.kernel.org
Cc:     alex.williamson@...hat.com, cohuck@...hat.com,
        farman@...ux.ibm.com, pmorel@...ux.ibm.com, hca@...ux.ibm.com,
        gor@...ux.ibm.com, gerald.schaefer@...ux.ibm.com,
        agordeev@...ux.ibm.com, frankja@...ux.ibm.com, david@...hat.com,
        imbrenda@...ux.ibm.com, vneethv@...ux.ibm.com,
        oberpar@...ux.ibm.com, freude@...ux.ibm.com, thuth@...hat.com,
        pasic@...ux.ibm.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/32] s390/pci: get SHM information from list pci

On Thu, 2021-12-09 at 16:47 +0100, Christian Borntraeger wrote:
> Am 07.12.21 um 21:57 schrieb Matthew Rosato:
> > KVM will need information on the special handle mask used to indicate
> > emulated devices.  In order to obtain this, a new type of list pci call
> > must be made to gather the information.  Remove the unused data pointer
> > from clp_list_pci and __clp_add and instead optionally pass a pointer to
> > a model-dependent-data field.  Additionally, allow for clp_list_pci calls
> > that don't specify a callback - in this case, just do the first pass of
> > list pci and exit.
> > 
> > Signed-off-by: Matthew Rosato <mjrosato@...ux.ibm.com>
> > ---
> >   arch/s390/include/asm/pci.h     |  6 ++++++
> >   arch/s390/include/asm/pci_clp.h |  2 +-
> >   arch/s390/pci/pci.c             | 19 +++++++++++++++++++
> >   arch/s390/pci/pci_clp.c         | 16 ++++++++++------
> >   4 files changed, 36 insertions(+), 7 deletions(-)
> > 
---8<---
> >   
> > +int zpci_get_mdd(u32 *mdd)
> > +{
> > +	struct clp_req_rsp_list_pci *rrb;
> > +	int rc;
> > +
> > +	if (!mdd)
> > +		return -EINVAL;
> > +
> > +	rrb = clp_alloc_block(GFP_KERNEL);
> > +	if (!rrb)
> > +		return -ENOMEM;
> > +
> > +	rc = clp_list_pci(rrb, mdd, NULL);
> > +
> > +	clp_free_block(rrb);
> > +	return rc;
> > +}
> > +EXPORT_SYMBOL_GPL(zpci_get_mdd);
> 
> Maybe move this into pci_clp.c to avoid the export of clp_alloc_block and void clp_free_block?
> Niklas?

That was actually my idea. I'm thinking of moving clp_get_state(),
clp_scan_pci_devices(), ans clp_refresh_fh() to pci.c too because I
feel these deal with higher level concerns than the rest of pci_clp.c.

I have no strong opinion though and might be thinking ahead to much
here. With the change discussed in the other mail of not modifying
clp_list_pci() maybe it would be better to keep it here and thus this
patch more focused and minimal and then possibly move it with the other
similar functions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ