aboutsummaryrefslogtreecommitdiff
path: root/mathvec
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-02-21 12:53:07 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-03-07 08:46:49 -0300
commit5624d626dbf1dfa072941befeaf687cdabba4893 (patch)
tree0593e11debd571066fbfe56a5326208730b37cc4 /mathvec
parent815beee47c1c42e1b7bd5a1ce7b6a34c2013d3dc (diff)
downloadglibc-azanella/memory-seal-v6.tar.xz
glibc-azanella/memory-seal-v6.zip
linux: Add support for PT_GNU_MUTABLEazanella/memory-seal-v6
The section mark a memory region that should not be sealed if GNU_PROPERTY_MEMORY_SEAL attribute is present. PT_GNU_MUTABLE section names start with ".gnu.mutable" and are maximum page aligned and have a size of maximum page size. For instance the code: #define GNU_MUTABLE_SECTION_NAME ".gnu.mutable" unsigned char mutable_array1[64] __attribute__ ((section (GNU_MUTABLE_SECTION_NAME))) = { 0 }; unsigned char mutable_array2[32] __attribute__ ((section (GNU_MUTABLE_SECTION_NAME))) = { 0 }; places both 'mutable_array1' and 'mutable_array2' on a page aligned memory region in a size of a page (the alignment and size can be change with -Wl,-z,max-page-size= linker option). The linker sets the alignment and size to make it easier to loader to avoid sealing the area (since mseal only work on multiple of page size areas), and to simplify the userland process to change protection of either seal the area after initialization.
Diffstat (limited to 'mathvec')
0 files changed, 0 insertions, 0 deletions