Commit f9081dd0 authored by Dave Martin's avatar Dave Martin Committed by Greg Kroah-Hartman

arm64/ptrace: Avoid uninitialised struct padding in fpr_set()

commit aeb1f39d upstream.

This patch adds an explicit __reserved[] field to user_fpsimd_state
to replace what was previously unnamed padding.

This ensures that data in this region are propagated across
assignment rather than being left possibly uninitialised at the
destination.

Fixes: 60ffc30d ("arm64: Exception handling")
Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
Acked-by: default avatarWill Deacon <Will.Deacon@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c5839be
...@@ -77,6 +77,7 @@ struct user_fpsimd_state { ...@@ -77,6 +77,7 @@ struct user_fpsimd_state {
__uint128_t vregs[32]; __uint128_t vregs[32];
__u32 fpsr; __u32 fpsr;
__u32 fpcr; __u32 fpcr;
__u32 __reserved[2];
}; };
struct user_hwdebug_state { struct user_hwdebug_state {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment