* [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
@ 2025-05-19 14:56 Lorenzo Stoakes
2025-05-20 8:33 ` Oscar Salvador
2025-05-20 15:10 ` Claudio Imbrenda
0 siblings, 2 replies; 6+ messages in thread
From: Lorenzo Stoakes @ 2025-05-19 14:56 UTC (permalink / raw)
To: Andrew Morton
Cc: James Houghton, Christian Borntraeger, Ignacio Moreno Gonzalez,
Yang Shi, David Hildenbrand, Liam R . Howlett, Matthew Wilcox,
Janosch Frank, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Sven Schnelle, pbonzini, kvm, linux-s390, linux-mm, linux-kernel
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>
---
Separated out from [0] as problem found in other patch in series.
[0]: https://lore.kernel.org/all/cover.1747338438.git.lorenzo.stoakes@oracle.com/
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
2025-05-19 14:56 [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY Lorenzo Stoakes
@ 2025-05-20 8:33 ` Oscar Salvador
2025-05-20 15:10 ` Claudio Imbrenda
1 sibling, 0 replies; 6+ messages in thread
From: Oscar Salvador @ 2025-05-20 8:33 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Andrew Morton, James Houghton, Christian Borntraeger,
Ignacio Moreno Gonzalez, Yang Shi, David Hildenbrand,
Liam R . Howlett, Matthew Wilcox, Janosch Frank, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, pbonzini, kvm,
linux-s390, linux-mm, linux-kernel
On Mon, May 19, 2025 at 03:56:57PM +0100, Lorenzo Stoakes wrote:
> 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>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
--
Oscar Salvador
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
2025-05-19 14:56 [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY Lorenzo Stoakes
2025-05-20 8:33 ` Oscar Salvador
@ 2025-05-20 15:10 ` Claudio Imbrenda
2025-05-20 15:24 ` Lorenzo Stoakes
1 sibling, 1 reply; 6+ messages in thread
From: Claudio Imbrenda @ 2025-05-20 15:10 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Andrew Morton, James Houghton, Christian Borntraeger,
Ignacio Moreno Gonzalez, Yang Shi, David Hildenbrand,
Liam R . Howlett, Matthew Wilcox, Janosch Frank, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, pbonzini, kvm,
linux-s390, linux-mm, linux-kernel
On Mon, 19 May 2025 15:56:57 +0100
Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
> 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>
if you had put me in CC, you would have gotten this yesterday already:
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
> Separated out from [0] as problem found in other patch in series.
>
> [0]: https://lore.kernel.org/all/cover.1747338438.git.lorenzo.stoakes@oracle.com/
>
> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
2025-05-20 15:10 ` Claudio Imbrenda
@ 2025-05-20 15:24 ` Lorenzo Stoakes
2025-05-20 15:54 ` Claudio Imbrenda
0 siblings, 1 reply; 6+ messages in thread
From: Lorenzo Stoakes @ 2025-05-20 15:24 UTC (permalink / raw)
To: Claudio Imbrenda
Cc: Andrew Morton, James Houghton, Christian Borntraeger,
Ignacio Moreno Gonzalez, Yang Shi, David Hildenbrand,
Liam R . Howlett, Matthew Wilcox, Janosch Frank, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, pbonzini, kvm,
linux-s390, linux-mm, linux-kernel
On Tue, May 20, 2025 at 05:10:09PM +0200, Claudio Imbrenda wrote:
> On Mon, 19 May 2025 15:56:57 +0100
> Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
>
> > 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>
>
> if you had put me in CC, you would have gotten this yesterday already:
>
> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Thanks and apologies for not cc-ing you, clearly my mistake.
Though I would suggest your level of grumpiness here is a little over the
top under the circumstances :) we maintainers must scale our grumpiness
accordingly...
>
> > ---
> > Separated out from [0] as problem found in other patch in series.
> >
> > [0]: https://lore.kernel.org/all/cover.1747338438.git.lorenzo.stoakes@oracle.com/
> >
> > 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
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
2025-05-20 15:24 ` Lorenzo Stoakes
@ 2025-05-20 15:54 ` Claudio Imbrenda
2025-05-20 15:57 ` Lorenzo Stoakes
0 siblings, 1 reply; 6+ messages in thread
From: Claudio Imbrenda @ 2025-05-20 15:54 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: Andrew Morton, James Houghton, Christian Borntraeger,
Ignacio Moreno Gonzalez, Yang Shi, David Hildenbrand,
Liam R . Howlett, Matthew Wilcox, Janosch Frank, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, pbonzini, kvm,
linux-s390, linux-mm, linux-kernel
On Tue, 20 May 2025 16:24:10 +0100
Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
> On Tue, May 20, 2025 at 05:10:09PM +0200, Claudio Imbrenda wrote:
> > On Mon, 19 May 2025 15:56:57 +0100
> > Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
> >
> > > 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>
> >
> > if you had put me in CC, you would have gotten this yesterday already:
> >
> > Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
>
> Thanks and apologies for not cc-ing you, clearly my mistake.
>
> Though I would suggest your level of grumpiness here is a little over the
> top under the circumstances :) we maintainers must scale our grumpiness
> accordingly...
it was not meant to be grumpy, sorry if it came through that way!
>
> >
> > > ---
> > > Separated out from [0] as problem found in other patch in series.
> > >
> > > [0]: https://lore.kernel.org/all/cover.1747338438.git.lorenzo.stoakes@oracle.com/
> > >
> > > 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
> > >
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY
2025-05-20 15:54 ` Claudio Imbrenda
@ 2025-05-20 15:57 ` Lorenzo Stoakes
0 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Stoakes @ 2025-05-20 15:57 UTC (permalink / raw)
To: Claudio Imbrenda
Cc: Andrew Morton, James Houghton, Christian Borntraeger,
Ignacio Moreno Gonzalez, Yang Shi, David Hildenbrand,
Liam R . Howlett, Matthew Wilcox, Janosch Frank, Heiko Carstens,
Vasily Gorbik, Alexander Gordeev, Sven Schnelle, pbonzini, kvm,
linux-s390, linux-mm, linux-kernel
On Tue, May 20, 2025 at 05:54:28PM +0200, Claudio Imbrenda wrote:
> On Tue, 20 May 2025 16:24:10 +0100
> Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
>
> > On Tue, May 20, 2025 at 05:10:09PM +0200, Claudio Imbrenda wrote:
> > > On Mon, 19 May 2025 15:56:57 +0100
> > > Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
> > >
> > > > 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>
> > >
> > > if you had put me in CC, you would have gotten this yesterday already:
> > >
> > > Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> >
> > Thanks and apologies for not cc-ing you, clearly my mistake.
> >
> > Though I would suggest your level of grumpiness here is a little over the
> > top under the circumstances :) we maintainers must scale our grumpiness
> > accordingly...
>
> it was not meant to be grumpy, sorry if it came through that way!
Haha no worries, text is a bad medium, I should maybe have inferred a ':P' at
the end of that line ;)
But absolutely my bad for not cc'in I'm normally good with that... and have
moaned at people for not cc'ing me before :P
Anyway thanks to you guys for being helpful with this change in general, hoping
we can land it either in RC7 or if not as a hotpatch for 6.16.
We shall see :)
Cheers, Lorenzo
>
> >
> > >
> > > > ---
> > > > Separated out from [0] as problem found in other patch in series.
> > > >
> > > > [0]: https://lore.kernel.org/all/cover.1747338438.git.lorenzo.stoakes@oracle.com/
> > > >
> > > > 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
> > > >
> > >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-05-20 16:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-19 14:56 [RESEND PATCH] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY Lorenzo Stoakes
2025-05-20 8:33 ` Oscar Salvador
2025-05-20 15:10 ` Claudio Imbrenda
2025-05-20 15:24 ` Lorenzo Stoakes
2025-05-20 15:54 ` Claudio Imbrenda
2025-05-20 15:57 ` Lorenzo Stoakes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox