Skip to content
Snippets Groups Projects
Commit 9e0fb648 authored by Richard Henderson's avatar Richard Henderson Committed by Laurent Vivier
Browse files

linux-user/s390x: Add build asserts for sigset sizes


At point of usage, it's not immediately obvious that
we don't need a loop to copy these arrays.

Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Message-Id: <20210428193408.233706-14-richard.henderson@linaro.org>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent ac1a92ec
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,8 @@ void setup_frame(int sig, struct target_sigaction *ka,
return;
}
/* Make sure that we're initializing all of oldmask. */
QEMU_BUILD_BUG_ON(ARRAY_SIZE(frame->sc.oldmask) != 1);
__put_user(set->sig[0], &frame->sc.oldmask[0]);
save_sigregs(env, &frame->sregs);
......@@ -266,6 +268,9 @@ long do_sigreturn(CPUS390XState *env)
force_sig(TARGET_SIGSEGV);
return -TARGET_QEMU_ESIGRETURN;
}
/* Make sure that we're initializing all of target_set. */
QEMU_BUILD_BUG_ON(ARRAY_SIZE(target_set.sig) != 1);
__get_user(target_set.sig[0], &frame->sc.oldmask[0]);
target_to_host_sigset_internal(&set, &target_set);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment