From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
James Houghton <jthoughton@google.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Ignacio Moreno Gonzalez <Ignacio.MorenoGonzalez@kuka.com>,
Yang Shi <yang@os.amperecomputing.com>,
David Hildenbrand <david@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
Janosch Frank <frankja@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
pbonzini@redhat.com, kvm@vger.kernel.org,
linux-s390@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
Date: Fri, 16 May 2025 16:41:45 +0100 [thread overview]
Message-ID: <b35c191c-d057-4059-a03f-743cb0df28e3@lucifer.local> (raw)
In-Reply-To: <fka5tjy7m75csanhm5sbagzp64yj7rc2hlklvd2qolesjjalx2@bkx4ul3a6byf>
On Fri, May 16, 2025 at 11:39:19AM -0400, Liam R. Howlett wrote:
> * Lorenzo Stoakes <lorenzo.stoakes@oracle.com> [250515 16:15]:
> > The enum type prot_type declared in arch/s390/kvm/gaccess.c declares an
> > unfortunate identifier within it - PROT_NONE.
> >
> > This clashes with the protection bit define from the uapi for mmap()
> > declared in include/uapi/asm-generic/mman-common.h, which is indeed what
> > those casually reading this code would assume this to refer to.
> >
> > This means that any changes which subsequently alter headers in any way
> > which results in the uapi header being imported here will cause build
> > errors.
> >
> > Resolve the issue by renaming PROT_NONE to PROT_TYPE_DUMMY.
> >
> > Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> > Suggested-by: Ignacio Moreno Gonzalez <Ignacio.MorenoGonzalez@kuka.com>
> > Fixes: b3cefd6bf16e ("KVM: s390: Pass initialized arg even if unused")
> > Cc: stable@vger.kernel.org
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202505140943.IgHDa9s7-lkp@intel.com/
> > Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
> > Acked-by: Ignacio Moreno Gonzalez <Ignacio.MorenoGonzalez@kuka.com>
> > Acked-by: Yang Shi <yang@os.amperecomputing.com>
> > Reviewed-by: David Hildenbrand <david@redhat.com>
>
> Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Thanks!
>
> > ---
> > arch/s390/kvm/gaccess.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c
> > index f6fded15633a..4e5654ad1604 100644
> > --- a/arch/s390/kvm/gaccess.c
> > +++ b/arch/s390/kvm/gaccess.c
> > @@ -318,7 +318,7 @@ enum prot_type {
> > PROT_TYPE_DAT = 3,
> > PROT_TYPE_IEP = 4,
> > /* Dummy value for passing an initialized value when code != PGM_PROTECTION */
> > - PROT_NONE,
> > + PROT_TYPE_DUMMY,
> > };
> >
> > static int trans_exc_ending(struct kvm_vcpu *vcpu, int code, unsigned long gva, u8 ar,
> > @@ -334,7 +334,7 @@ static int trans_exc_ending(struct kvm_vcpu *vcpu, int code, unsigned long gva,
> > switch (code) {
> > case PGM_PROTECTION:
> > switch (prot) {
> > - case PROT_NONE:
> > + case PROT_TYPE_DUMMY:
> > /* We should never get here, acts like termination */
> > WARN_ON_ONCE(1);
> > break;
> > @@ -804,7 +804,7 @@ static int guest_range_to_gpas(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
> > gpa = kvm_s390_real_to_abs(vcpu, ga);
> > if (!kvm_is_gpa_in_memslot(vcpu->kvm, gpa)) {
> > rc = PGM_ADDRESSING;
> > - prot = PROT_NONE;
> > + prot = PROT_TYPE_DUMMY;
> > }
> > }
> > if (rc)
> > @@ -962,7 +962,7 @@ int access_guest_with_key(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
> > if (rc == PGM_PROTECTION)
> > prot = PROT_TYPE_KEYC;
> > else
> > - prot = PROT_NONE;
> > + prot = PROT_TYPE_DUMMY;
> > rc = trans_exc_ending(vcpu, rc, ga, ar, mode, prot, terminate);
> > }
> > out_unlock:
> > --
> > 2.49.0
> >
next prev parent reply other threads:[~2025-05-16 15:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 20:15 [PATCH 0/2] mm: madvise: make MADV_NOHUGEPAGE a no-op if !THP Lorenzo Stoakes
2025-05-15 20:15 ` [PATCH 1/2] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY Lorenzo Stoakes
2025-05-16 15:39 ` Liam R. Howlett
2025-05-16 15:41 ` Lorenzo Stoakes [this message]
2025-05-15 20:15 ` [PATCH 2/2] mm: madvise: make MADV_NOHUGEPAGE a no-op if !THP Lorenzo Stoakes
2025-05-16 15:40 ` Liam R. Howlett
2025-05-16 15:43 ` Lorenzo Stoakes
2025-05-16 15:51 ` Liam R. Howlett
2025-05-19 14:43 ` [PATCH 0/2] " Lorenzo Stoakes
2025-05-19 19:31 ` Yang Shi
2025-05-19 19:33 ` Lorenzo Stoakes
2025-05-21 11:02 ` Ignacio Moreno González
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b35c191c-d057-4059-a03f-743cb0df28e3@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=Ignacio.MorenoGonzalez@kuka.com \
--cc=Liam.Howlett@oracle.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jthoughton@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=svens@linux.ibm.com \
--cc=willy@infradead.org \
--cc=yang@os.amperecomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox