HomeFreeBSD

rtld: Round down relro_size

Description

rtld: Round down relro_size

lld rounds up p_memsz(PT_GNU_RELRO) to satisfy common-page-size. If the
page size is smaller than common-page-size, rounding up relro_size may
incorrectly make some RW pages read-only.

GNU ld, gold, and ld.lld ensures p_vaddr+p_memsz is a multiple of
common-page-size. While max-page-size >= system the page size,
common-page-size can be smaller than the system page size.

Submitted by: MaskRay
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31498

Details

Provenance
kibAuthored on Aug 12 2021, 2:45 AM
Differential Revision
D31498: rtld: Round down relro_size
Parents
rG44d4804d1945: usr.bin/ghä-bc, contrib/bc: update to version 5.0.0
Branches
Unknown
Tags
Unknown