From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5990F22172C; Mon, 23 Jun 2025 21:28:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714106; cv=none; b=Yqy88R6ziyVE5OMihEgrehjN/iQXTGBUBe7T/Zx6gcc5Ub53a27RnC/8E5wPL0yF/oty+3IBfhCRL6BcnJ43K+7bCIOnWz6g3otOYrsHxF6rJS32gDDMrABkamcmcIv8htRCsRpll9Ng0+W1DjgAF13GtdDk/lDo1mA9uIo9EBk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714106; c=relaxed/simple; bh=hwQN4wTpJkibGQqFCM5m9FoVZIDj9I2jR0hpQmyhww8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OFNPhDFwVARBU5rgfrGYWZPbGii1xaAEMmg5O4hnsAPQ6wyOwrAyqTkup/d8eHkr0VR2eDo1eSsYYggZc+F5xu7dYVDsMAr7a+Y4f+L95tM6tnq6rdhf2QJwTmTt6Tve4Fi2FovMtYWWgL4NbfjmFd4xSChTGRR9SSYDaJ5DMRU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fYiranEz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fYiranEz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9E90C4CEEA; Mon, 23 Jun 2025 21:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750714106; bh=hwQN4wTpJkibGQqFCM5m9FoVZIDj9I2jR0hpQmyhww8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fYiranEzi3wFyxiEyq5OCXekwdr3lnSR2whEHjyxAkiY5e0ixefMWfZWO6sxHlcwx MkSFEFNOZSy2hHkiu106mwd+i8YbMPzFzEKmiXsZL+0g22ZKiJFvApSKbg7Vi6nq+i ahsY1mZNpFNUU0TaTwDEaeu5vf+3UJ6fZ4ia6k4k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lorenzo Stoakes , Ignacio Moreno Gonzalez , kernel test robot , Christian Borntraeger , Yang Shi , David Hildenbrand , "Liam R. Howlett" , Oscar Salvador , Claudio Imbrenda , Alexander Gordeev , Heiko Carstens , James Houghton , Janosch Frank , "Matthew Wilcox (Oracle)" , Paolo Bonzini , Sven Schnelle , Vasily Gorbik , Andrew Morton Subject: [PATCH 6.6 095/290] KVM: s390: rename PROT_NONE to PROT_TYPE_DUMMY Date: Mon, 23 Jun 2025 15:05:56 +0200 Message-ID: <20250623130629.826816867@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130626.910356556@linuxfoundation.org> References: <20250623130626.910356556@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lorenzo Stoakes commit 15ac613f124e51a6623975efad9657b1f3ee47e7 upstream. 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. Link: https://lkml.kernel.org/r/20250519145657.178365-1-lorenzo.stoakes@oracle.com Fixes: b3cefd6bf16e ("KVM: s390: Pass initialized arg even if unused") Signed-off-by: Lorenzo Stoakes Suggested-by: Ignacio Moreno Gonzalez Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505140943.IgHDa9s7-lkp@intel.com/ Acked-by: Christian Borntraeger Acked-by: Ignacio Moreno Gonzalez Acked-by: Yang Shi Reviewed-by: David Hildenbrand Acked-by: Liam R. Howlett Reviewed-by: Oscar Salvador Reviewed-by: Claudio Imbrenda Cc: Cc: Alexander Gordeev Cc: Heiko Carstens Cc: James Houghton Cc: Janosch Frank Cc: Matthew Wilcox (Oracle) Cc: Paolo Bonzini Cc: Sven Schnelle Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- arch/s390/kvm/gaccess.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/arch/s390/kvm/gaccess.c +++ b/arch/s390/kvm/gaccess.c @@ -490,7 +490,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, @@ -506,7 +506,7 @@ static int trans_exc_ending(struct kvm_v 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; @@ -976,7 +976,7 @@ static int guest_range_to_gpas(struct kv gpa = kvm_s390_real_to_abs(vcpu, ga); if (kvm_is_error_gpa(vcpu->kvm, gpa)) { rc = PGM_ADDRESSING; - prot = PROT_NONE; + prot = PROT_TYPE_DUMMY; } } if (rc) @@ -1134,7 +1134,7 @@ int access_guest_with_key(struct kvm_vcp 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: