GCC 11.1 objects to pointers derived from a constant:
error: '__builtin_memcpy' offset [0, 7] is out of the bounds [0, 0] [-Werror=array-bounds]
This is a GCC bug, but work around it rather than turning array-bounds
checking off generally.
Reported-by: Damien Thenot <damien.thenot@vates.fr>
Reported-by: Christopher Clark <christopher.w.clark@gmail.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Christopher Clark <christopher.w.clark@gmail.com>
pae_l4_identmap[255] = pte_from_virt(pae_l3_identmap, PF_SYM(AD, U, RW, P));
barrier();
- uint64_t *ptr = _p(0x00007ffffffffff8ULL);
+ void *volatile /* GCC issue 99578 */ ptr = _p(0x00007ffffffffff8ULL);
/*
* Put a NOP slide and Forced Emulation Prefix as the final instructions
/*
* Prepare userspace memory.
*/
- memset(gate, 0, PAGE_SIZE);
+ void *volatile /* GCC issue 99578 */ ptr = gate;
+ memset(ptr, 0, PAGE_SIZE);
remap_linear(gate, PF_SYM(AD, U, RW, P));
/*