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 CD3553824E7; Sat, 28 Feb 2026 17:36:16 +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=1772300176; cv=none; b=BWlNtmN9NWh63LbuNFbqdQFl5A8XBFVgO2Armqbbt0FSENM/uQRrYr8fJIxB1uvTRM4swaooj9m6ORo0A3CKEHU2/E2SCFeM0LQ4/56DPwPTMAh0RHFIVwb86dsxpkEp6TyYtBaHAHLAJJsAIYZHwnGeipj+s4FNEkrHUtRIjEc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300176; c=relaxed/simple; bh=qQVS1+SNYkHb2oV7rUK6aHfhX6IPuk23megtrKNAwwU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZRx6ttpXGOsfBmMvQW8IjImvQxxPTCbXkcHHt0NDDM/QpOjz3sNAhht8vQjXEApa3TnoaAMNVDtrVPaRVHb8rInyoYqOR6bKM/xqal2BfH1SlDI7rbC6U5kqjS/9JTwe/XtHvbUen6gg3f0ja7YG881IOmlnFLUvPTgikddJL9Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A3+S10jR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A3+S10jR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A445AC2BC87; Sat, 28 Feb 2026 17:36:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300176; bh=qQVS1+SNYkHb2oV7rUK6aHfhX6IPuk23megtrKNAwwU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A3+S10jRLKEZZHm07vLOWPaa9VJYct4SEv+57+Nj2EdhGxguPDobZd+J1rJkJ09ir rc94Wszo5XlGkypMFJm9edRkKrGQS7rwV3ukwmU59vh1GIAbULebPo6UbyVSlrKI7y p6UX4bAgfvEt6irkE7sNarJj37FSVQa7zJPVuJlqK1wNizu/yHiuqwR5nG8WsmOWmp F2B2qlWT7n3FxDfLr2XYudj4k5kDvYu2XHULk0mxQc3BYFo8VwqZRZ1k4q+XeBLBdI yoZcyGk/wG0TJI5q45UJ2mkb77K5IjcZMfbW1m8kqiamBXiVtzy48+LvIlyNd7Ym5q l+uEQjA41UfEw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , kernel test robot , Nathan Chancellor , Arnd Bergmann , "Wei Liu (Microsoft)" , Nicolas Schier , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH 6.19 195/844] hyper-v: Mark inner union in hv_kvp_exchg_msg_value as packed Date: Sat, 28 Feb 2026 12:21:48 -0500 Message-ID: <20260228173244.1509663-196-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Thomas Weißschuh [ Upstream commit 1e5271393d777f6159d896943b4c44c4f3ecff52 ] The unpacked union within a packed struct generates alignment warnings on clang for 32-bit ARM: ./usr/include/linux/hyperv.h:361:2: error: field within 'struct hv_kvp_exchg_msg_value' is less aligned than 'union hv_kvp_exchg_msg_value::(anonymous at ./usr/include/linux/hyperv.h:361:2)' and is usually due to 'struct hv_kvp_exchg_msg_value' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] 361 | union { | ^ With the recent changes to compile-test the UAPI headers in more cases, this warning in combination with CONFIG_WERROR breaks the build. Fix the warning. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202512140314.DzDxpIVn-lkp@intel.com/ Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/linux-kbuild/20260110-uapi-test-disable-headers-arm-clang-unaligned-access-v1-1-b7b0fa541daa@kernel.org/ Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/linux-kbuild/29b2e736-d462-45b7-a0a9-85f8d8a3de56@app.fastmail.com/ Signed-off-by: Thomas Weißschuh Acked-by: Wei Liu (Microsoft) Tested-by: Nicolas Schier Reviewed-by: Nicolas Schier Acked-by: Greg Kroah-Hartman Link: https://patch.msgid.link/20260115-kbuild-alignment-vbox-v1-1-076aed1623ff@linutronix.de Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin --- include/uapi/linux/hyperv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h index aaa502a7bff46..1749b35ab2c21 100644 --- a/include/uapi/linux/hyperv.h +++ b/include/uapi/linux/hyperv.h @@ -362,7 +362,7 @@ struct hv_kvp_exchg_msg_value { __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; __u32 value_u32; __u64 value_u64; - }; + } __attribute__((packed)); } __attribute__((packed)); struct hv_kvp_msg_enumerate { -- 2.51.0