This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v4] aarch64: enforce >=64K guard size


On 07/16/2018 04:09 PM, Szabolcs Nagy wrote:
on aarch64 safe behaviour is only guaranteed if the
guard is >=64k, a smaller guard does not guard against
stack overflow, so what's the point of a smaller guard?

user code cannot reason about stack usage in any sensible
way so it cannot be smart about the guard size, yet there
is lot of existing code setting the guard size explicitly
to a single page.  the only effect of granting those
settings is to make code unsafe on systems with smaller
than 64k page size.

To elaborate, aarch64 has two configurations in the wild; RHEL does 64K pages and Debian does 4K pages but the probe interval seems to be fixed at 64K. RHEL won't be affected because any stack allocation requests < 64K will simply be rounded to 64K but Debian systems with 4K sizes will need this hack.

This should however also include a note in the manual to warn users about this behaviour.

Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]