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] [day] [month] [year] [list]
Date:   Fri, 28 Sep 2018 15:46:47 +0200
From:   Cornelia Huck <cohuck@...hat.com>
To:     Christian Borntraeger <borntraeger@...ibm.com>
Cc:     Halil Pasic <pasic@...ux.ibm.com>,
        Tony Krowiak <akrowiak@...ux.vnet.ibm.com>,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org, freude@...ibm.com, schwidefsky@...ibm.com,
        heiko.carstens@...ibm.com, kwankhede@...dia.com,
        bjsdjshi@...ux.vnet.ibm.com, pbonzini@...hat.com,
        alex.williamson@...hat.com, pmorel@...ux.vnet.ibm.com,
        alifm@...ux.vnet.ibm.com, mjrosato@...ux.vnet.ibm.com,
        jjherne@...ux.vnet.ibm.com, thuth@...hat.com,
        pasic@...ux.vnet.ibm.com, fiuczy@...ux.vnet.ibm.com,
        buendgen@...ibm.com, Tony Krowiak <akrowiak@...ux.ibm.com>
Subject: Re: [FIXUP v11] fixup! s390: vfio-ap: implement mediated device
 open callback

On Fri, 28 Sep 2018 15:42:35 +0200
Christian Borntraeger <borntraeger@...ibm.com> wrote:

> On 09/28/2018 03:41 PM, Halil Pasic wrote:
> > 
> > 
> > On 09/28/2018 03:35 PM, Cornelia Huck wrote:  
> >> On Fri, 28 Sep 2018 09:33:21 -0400
> >> Tony Krowiak <akrowiak@...ux.vnet.ibm.com> wrote:
> >>  
> >>> From: Tony Krowiak <akrowiak@...ux.ibm.com>
> >>>
> >>> Fixes case statement in vfio_ap_mdev_copy_masks() function in
> >>> vfio-ap-ops.c.
> >>> ---
> >>>  drivers/s390/crypto/vfio_ap_ops.c | 3 ++-
> >>>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
> >>> index e1e1beaaeba5..86b42487a51c 100644
> >>> --- a/drivers/s390/crypto/vfio_ap_ops.c
> >>> +++ b/drivers/s390/crypto/vfio_ap_ops.c
> >>> @@ -741,11 +741,12 @@ static void vfio_ap_mdev_copy_masks(struct ap_matrix_mdev *matrix_mdev)
> >>>  		break;
> >>>  	case CRYCB_FORMAT1:
> >>>  	case CRYCB_FORMAT0:
> >>> -	default:
> >>>  		apm = (unsigned long *)crycb->apcb0.apm;
> >>>  		aqm = (unsigned long *)crycb->apcb0.aqm;
> >>>  		adm = (unsigned long *)crycb->apcb0.adm;
> >>>  		break;
> >>> +	default:
> >>> +		return;  
> >>
> >> /* cannot happen */
> >>
> >> ?  
> > 
> > Or use something like BUG(). Without conveying that default is illegal we
> > don't gain anything over the previous version IMHO.  
> 
> Only WARN_ON, if at all.

Agreed.

This is only a marker for some future developer who might need to deal
with a new format.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ