testcases.c (6be22809e5c8f286877127e8a24c13c959b9fb4e) | testcases.c (32667745cab91cda458fade64d591136dff1422b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (C) 2019 ARM Limited */ 3#include "testcases.h" 4 5struct _aarch64_ctx *get_header(struct _aarch64_ctx *head, uint32_t magic, 6 size_t resv_sz, size_t *offset) 7{ 8 size_t offs = 0; --- 29 unchanged lines hidden (view full) --- 38 *err = "Missing terminator after EXTRA context"; 39 return false; 40 } 41 if (extra->datap & 0x0fUL) 42 *err = "Extra DATAP misaligned"; 43 else if (extra->size & 0x0fUL) 44 *err = "Extra SIZE misaligned"; 45 else if (extra->datap != (uint64_t)term + sizeof(*term)) | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (C) 2019 ARM Limited */ 3#include "testcases.h" 4 5struct _aarch64_ctx *get_header(struct _aarch64_ctx *head, uint32_t magic, 6 size_t resv_sz, size_t *offset) 7{ 8 size_t offs = 0; --- 29 unchanged lines hidden (view full) --- 38 *err = "Missing terminator after EXTRA context"; 39 return false; 40 } 41 if (extra->datap & 0x0fUL) 42 *err = "Extra DATAP misaligned"; 43 else if (extra->size & 0x0fUL) 44 *err = "Extra SIZE misaligned"; 45 else if (extra->datap != (uint64_t)term + sizeof(*term)) |
46 *err = "Extra DATAP misplaced (not contiguos)"; | 46 *err = "Extra DATAP misplaced (not contiguous)"; |
47 if (*err) 48 return false; 49 50 return true; 51} 52 53bool validate_reserved(ucontext_t *uc, size_t resv_sz, char **err) 54{ --- 142 unchanged lines hidden --- | 47 if (*err) 48 return false; 49 50 return true; 51} 52 53bool validate_reserved(ucontext_t *uc, size_t resv_sz, char **err) 54{ --- 142 unchanged lines hidden --- |