mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Why is setrlimit() considered to have per-thread effect?
@ 2020-10-15  5:01 Alexey Izbyshev
  2020-10-15  8:50 ` Szabolcs Nagy
  2020-10-15 15:43 ` Rich Felker
  0 siblings, 2 replies; 10+ messages in thread
From: Alexey Izbyshev @ 2020-10-15  5:01 UTC (permalink / raw)
  To: musl

Hello,

Commit 544ee752cd[1] claims that setrlimit() is per-thread on Linux, 
similarly to setxid() calls, so it should be called via __synccall(). 
But this appears to be wrong: the kernel code operates on 
tsk->signal[2], which is a per-thread-group structure. Glibc doesn't 
call setrlimit() for each thread either. Am I missing something?

Tangentially, setgroups() is not called via __synccall(), though it does 
have per-thread effect. Is this intentional?

Alexey

[1] 
https://git.musl-libc.org/cgit/musl/commit/?id=544ee752cd38febfa3aa3798b4dfb6fabd13846b
[2] https://elixir.bootlin.com/linux/v5.9/source/kernel/sys.c#L1566

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-15 20:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  5:01 [musl] Why is setrlimit() considered to have per-thread effect? Alexey Izbyshev
2020-10-15  8:50 ` Szabolcs Nagy
2020-10-15 15:49   ` Rich Felker
2020-10-15 16:13     ` Alexey Izbyshev
2020-10-15 17:13       ` Rich Felker
2020-10-15 18:26         ` Alexey Izbyshev
2020-10-15 20:03           ` Rich Felker
2020-10-15 15:50   ` Alexey Izbyshev
2020-10-15 20:05     ` Rich Felker
2020-10-15 15:43 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).