RFC PATCH: Don't use /proc/self/maps to calculate size of initial thread stack

Florian Weimer fweimer@redhat.com
Tue Sep 20 12:16:04 GMT 2022


* Zack Weinberg via Libc-alpha:

>> process_vm_readv seems quite likely to get blocked by seccomp filters.
>
> I was worried about that too :-/

I think we see that in the pre-commit CI builder.

>> Maybe we can get the kernel to pass the end of the stack in the
>> auxiliary vector?
>
> Sure, but then what do we do on older kernels?  I'm reluctant to say
> "keep the old code" because we know this is breaking for people right
> now (although honestly "mount /proc earlier" isn't a terrible
> suggestion for a workaround).

We can keep doing what we are doing on older kernels.  I don't think we
should add yet another fallback path for this in case /proc isn't
available and the kernel doesn't provide the (future) AT_* entry.  *Two*
fallback paths instead of one seems a bit over the top.

Thanks,
Florian



More information about the Libc-alpha mailing list