|
Message-Id: <D3SIROC2U8ZX.S81EV0LHBQZL@ayaya.dev> Date: Thu, 29 Aug 2024 18:00:52 +0200 From: "alice" <alice@...ya.dev> To: "Rich Felker" <dalias@...c.org> Cc: <musl@...ts.openwall.com> Subject: Re: [PATCH] fix MINSIGSTKSZ and SIGSTKSZ for powerpc64 On Thu Aug 29, 2024 at 2:57 PM CEST, Rich Felker wrote: > On Thu, Aug 29, 2024 at 05:38:42AM +0200, psykose wrote: > > since kernel commit 2f82ec19757f58549467db568c56e7dfff8af283 > > (https://github.com/torvalds/linux/commit/2f82ec19757f58549467db568c56e7dfff8af283) > > the kernel has updated these minimum values. having these small values breaks > > sysconf(_SC_MINSIGSTKSZ) too; it returns 4224 in musl currently which ends up > > returning ENOMEM from the syscall made in sigaltstack. > > > > raising these to match the kernel fixes sigaltstack use on powerpc64(le). > > caught by glib's 2.82 testsuite > > I don't follow how you're claiming sysconf(_SC_MINSIGSTKSZ) is broken. > It will just return the kernel-provided value on new kernels that > insist on having a larger stack. In particular I don't see where the > value 4224 is supposed to be coming from. If there's something I'm > missing, please explain. sysconf(_SC_MINSIGSTKSZ) returns 4224 on ppc64le (this is as far as i know expected). setting stack.ss_size = 4224 (from that call) and passing it to sigaltstack returns ENOMEM because it is smaller than 8192 which the kernel enforces. ..so the normal way of using sigaltstack with the smallest size (with sysconf or the macros) is broken. making the MINSIGSTKSZ match the actual value the kernel enforces fixes it.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.