]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vdso: Switch get/put_unaligned() from packed struct to memcpy()
authorIan Rogers <irogers@google.com>
Thu, 16 Oct 2025 20:51:24 +0000 (13:51 -0700)
committerThomas Gleixner <tglx@kernel.org>
Wed, 14 Jan 2026 07:56:41 +0000 (08:56 +0100)
commita339671db64b12bb02492557d2b0658811286277
tree574f8370f2eb90a5a92c0aad5d8d96d2f37fb407
parentdf0f9a664be55a8529362a1ada847a19a91e4807
vdso: Switch get/put_unaligned() from packed struct to memcpy()

Type punning is necessary for get/put_unaligned() but the use of a packed
struct violates strict aliasing rules, requiring -fno-strict-aliasing to be
passed to the C compiler.

Switch to using memcpy() so that -fno-strict-aliasing isn't necessary.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20251016205126.2882625-3-irogers@google.com
include/vdso/unaligned.h