From: Arnd Bergmann <arnd@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Oliver Upton <oupton@kernel.org>,
Sean Christopherson <seanjc@google.com>,
Anup Patel <anup@brainfault.org>,
Binbin Wu <binbin.wu@linux.intel.com>,
Marc Zyngier <maz@kernel.org>, Jiaqi Yan <jiaqiyan@google.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] KVM: s390: add explicit padding to struct kvm_s390_keyop
Date: Fri, 6 Feb 2026 10:17:30 +0100 [thread overview]
Message-ID: <20260206091751.3973615-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.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@arndb.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
next reply other threads:[~2026-02-06 9:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 9:17 Arnd Bergmann [this message]
2026-02-06 10:33 ` Claudio Imbrenda
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=20260206091751.3973615-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=anup@brainfault.org \
--cc=arnd@arndb.de \
--cc=binbin.wu@linux.intel.com \
--cc=hca@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=jiaqiyan@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.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
all inboxes | Powered by JetHome®