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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260206091751.3973615-1-arnd@kernel.org>
Date: Fri,  6 Feb 2026 10:17:30 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Paolo Bonzini <pbonzini@...hat.com>,
	Claudio Imbrenda <imbrenda@...ux.ibm.com>,
	Heiko Carstens <hca@...ux.ibm.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	Oliver Upton <oupton@...nel.org>,
	Sean Christopherson <seanjc@...gle.com>,
	Anup Patel <anup@...infault.org>,
	Binbin Wu <binbin.wu@...ux.intel.com>,
	Marc Zyngier <maz@...nel.org>,
	Jiaqi Yan <jiaqiyan@...gle.com>,
	kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] KVM: s390: add explicit padding to struct kvm_s390_keyop

From: Arnd Bergmann <arnd@...db.de>

The newly added structure causes a warning about implied padding:

./usr/include/linux/kvm.h:1247:1: error: padding struct size to alignment boundary with 6 bytes [-Werror=padded]

The padding can lead to leaking kernel data and ABI incompatibilies
when used on x86. Neither of these is a problem in this specific
patch, but it's best to avoid it and use explicit padding fields
in general.

Fixes: 0ee4ddc1647b ("KVM: s390: Storage key manipulation IOCTL")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
I have a long series to add annotations to all existing structures,
but that will take a while. For now, I'm sending fixes when new
instances show up in linux-next.
---
 include/uapi/linux/kvm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index a68b1741045c..1225fbd017e5 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -1255,6 +1255,7 @@ struct kvm_s390_keyop {
 	__u64 guest_addr;
 	__u8  key;
 	__u8  operation;
+	__u8  pad[6];
 };
 
 /*
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ