aarch64: Add static asssert for context size

Add a static assert for the siginfo{,32}_t, mcontext{,32}_t and
ucontext{,32}_t sizes. These are de-facto ABI options and cannot change
size ever.

Reviewed by:		kib, andrew, jhb
Differential Revision:	https://reviews.freebsd.org/D32958
This commit is contained in:
Warner Losh 2022-02-10 14:26:26 -07:00
parent 974efbb3d5
commit 3988ca5aab
2 changed files with 8 additions and 0 deletions

View File

@ -60,6 +60,10 @@ __FBSDID("$FreeBSD$");
#include <machine/vfp.h>
#endif
_Static_assert(sizeof(mcontext_t) == 880, "mcontext_t size incorrect");
_Static_assert(sizeof(ucontext_t) == 960, "ucontext_t size incorrect");
_Static_assert(sizeof(siginfo_t) == 80, "siginfo_t size incorrect");
static void get_fpcontext(struct thread *td, mcontext_t *mcp);
static void set_fpcontext(struct thread *td, mcontext_t *mcp);

View File

@ -48,6 +48,10 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/vm_map.h>
_Static_assert(sizeof(mcontext32_t) == 208, "mcontext32_t size incorrect");
_Static_assert(sizeof(ucontext32_t) == 260, "ucontext32_t size incorrect");
_Static_assert(sizeof(struct siginfo32) == 64, "struct siginfo32 size incorrect");
extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask);
/*