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: <20250527111444.701ea84c@p-imbrenda>
Date: Tue, 27 May 2025 11:14:44 +0200
From: Claudio Imbrenda <imbrenda@...ux.ibm.com>
To: "Nico Boehr" <nrb@...ux.ibm.com>
Cc: <linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>,
        <linux-s390@...r.kernel.org>, <frankja@...ux.ibm.com>,
        <borntraeger@...ibm.com>, <seiden@...ux.ibm.com>, <nsg@...ux.ibm.com>,
        <david@...hat.com>, <hca@...ux.ibm.com>, <agordeev@...ux.ibm.com>,
        <svens@...ux.ibm.com>, <gor@...ux.ibm.com>, <schlameuss@...ux.ibm.com>
Subject: Re: [PATCH v2 3/5] KVM: s390: refactor some functions in priv.c

On Tue, 27 May 2025 09:18:01 +0200
"Nico Boehr" <nrb@...ux.ibm.com> wrote:

this patch had so many issues, and brought no real advantages, so I
dropped it from v3 onwards

> On Tue May 20, 2025 at 8:26 PM CEST, Claudio Imbrenda wrote:
> [...]
> > diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
> > index 9253c70897a8..15843e7e57e6 100644
> > --- a/arch/s390/kvm/priv.c
> > +++ b/arch/s390/kvm/priv.c  
> [...]
> > +static int skeys_common_checks(struct kvm_vcpu *vcpu, struct skeys_ops_state *state)
> > +{
> > +	int rc;
> > +
> > +	if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) {
> > +		rc = kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
> > +		return rc ? rc : -EAGAIN;  
> 
> What has changed that
> 
> return kvm_s390_inject_program_int()
> 
> is not sufficient any more?
> 
> [...]
> > +	get_regs_rre_ptr(vcpu, &state->reg1, &state->reg2, &state->r1, &state->r2);
> > +
> > +	state->effective = vcpu->run->s.regs.gprs[state->reg2] & PAGE_MASK;  
> 
> *state->r2?
> 
> [...]
> >  static int handle_pfmf(struct kvm_vcpu *vcpu)
> >  {  
> [...]
> > +	if (r1.fsc) {
> > +		end = kvm_s390_logical_to_effective(vcpu, end);
> > +		if (kvm_s390_is_amode_64(vcpu))
> > +			replace_selected_bits(r2, PAGE_MASK, end);
> > +		else
> > +			replace_selected_bits(r2, 0xfffff000, end);  
> 
> Maybe I'm missing something, but I don't get why you need replace_selected_bits
> here.  kvm_s390_logical_to_effective() already does the neccesary masking, no?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ