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]
Message-ID: <20260114105350.6a95fa53@p-imbrenda>
Date: Wed, 14 Jan 2026 10:53:50 +0100
From: Claudio Imbrenda <imbrenda@...ux.ibm.com>
To: "Christoph Schlameuss" <schlameuss@...ux.ibm.com>
Cc: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-s390@...r.kernel.org>, <borntraeger@...ibm.com>,
        <frankja@...ux.ibm.com>, <nsg@...ux.ibm.com>, <nrb@...ux.ibm.com>,
        <seiden@...ux.ibm.com>, <gra@...ux.ibm.com>, <hca@...ux.ibm.com>,
        <svens@...ux.ibm.com>, <agordeev@...ux.ibm.com>, <gor@...ux.ibm.com>,
        <david@...hat.com>, <gerald.schaefer@...ux.ibm.com>
Subject: Re: [PATCH v6 28/28] KVM: s390: Storage key manipulation IOCTL

On Wed, 14 Jan 2026 10:33:22 +0100
"Christoph Schlameuss" <schlameuss@...ux.ibm.com> wrote:

> On Mon Dec 22, 2025 at 5:50 PM CET, Claudio Imbrenda wrote:
> > Add a new IOCTL to allow userspace to manipulate storage keys directly.
> >
> > This will make it easier to write selftests related to storage keys.
> >
> > Signed-off-by: Claudio Imbrenda <imbrenda@...ux.ibm.com>  
> 
> Please add some user documentation for the new IOCTL.

already done, it will be in the next iteration.
and also a capability for the new ioctl

> 
> [...]
> 
> > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> > index dddb781b0507..845417e56778 100644
> > --- a/include/uapi/linux/kvm.h
> > +++ b/include/uapi/linux/kvm.h
> > @@ -1219,6 +1219,15 @@ struct kvm_vfio_spapr_tce {
> >  	__s32	tablefd;
> >  };
> >  
> > +#define KVM_S390_KEYOP_SSKE 0x01
> > +#define KVM_S390_KEYOP_ISKE 0x02
> > +#define KVM_S390_KEYOP_RRBE 0x03  
> 
> Just a nitpik, but why this order? In the arch the order is ISKE, SSKE, RRBE.
> Would it not be more logical to keep that order?

I don't know why I chose that order, I guess I can reorder it. It
doesn't really make a difference, but I guess consistency is good

> 
> > +struct kvm_s390_keyop {
> > +	__u64 user_addr;
> > +	__u8  key;
> > +	__u8  operation;
> > +};
> > +
> >  /*
> >   * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns
> >   * a vcpu fd.
> > @@ -1238,6 +1247,7 @@ struct kvm_vfio_spapr_tce {
> >  #define KVM_S390_UCAS_MAP        _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)
> >  #define KVM_S390_UCAS_UNMAP      _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)
> >  #define KVM_S390_VCPU_FAULT	 _IOW(KVMIO, 0x52, unsigned long)
> > +#define KVM_S390_KEYOP           _IOWR(KVMIO, 0x53, struct kvm_s390_keyop)
> >  
> >  /* Device model IOC */
> >  #define KVM_CREATE_IRQCHIP        _IO(KVMIO,   0x60)  
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ