diff options
| author | Kees Cook <kees@kernel.org> | 2025-02-06 00:54:26 +0300 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-02-28 22:51:32 +0300 |
| commit | c0e1d4656ea5fbecee9942fb2fc83ab579433421 (patch) | |
| tree | f7202fefb88cda530f539b6bffee090c4142c2f7 | |
| parent | ae4c0935f63c76674c3e64097e059e2f20e051b6 (diff) | |
| download | linux-c0e1d4656ea5fbecee9942fb2fc83ab579433421.tar.xz | |
x86/tdx: Mark message.bytes as nonstring
In preparation for strtomem*() checking that its destination is a
nonstring, rename and annotate message.bytes accordingly.
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Kees Cook <kees@kernel.org>
| -rw-r--r-- | arch/x86/coco/tdx/tdx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/coco/tdx/tdx.c b/arch/x86/coco/tdx/tdx.c index 32809a06dab4..7772b01ab738 100644 --- a/arch/x86/coco/tdx/tdx.c +++ b/arch/x86/coco/tdx/tdx.c @@ -167,11 +167,11 @@ static void __noreturn tdx_panic(const char *msg) /* Define register order according to the GHCI */ struct { u64 r14, r15, rbx, rdi, rsi, r8, r9, rdx; }; - char str[64]; + char bytes[64] __nonstring; } message; /* VMM assumes '\0' in byte 65, if the message took all 64 bytes */ - strtomem_pad(message.str, msg, '\0'); + strtomem_pad(message.bytes, msg, '\0'); args.r8 = message.r8; args.r9 = message.r9; |
