seL4 / seL4_libs

No-assurance libraries for rapid-prototyping of seL4 apps.
https://docs.sel4.systems
Other
52 stars 62 forks source link

libsel4muslcsys,mmap: Assert page aligned value #63

Closed kent-mcleod closed 2 years ago

kent-mcleod commented 2 years ago

mmap creates mappings in multiples of the page size which is always at least 4096. Assert that the return value is at least page size aligned. Callers of mmap are allowed to assume that the memory returned is 4k aligned and this can lead to subtle errors if non-aligned values are returned.