Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 15 Oct 2020 08:01:00 +0300
From: Alexey Izbyshev <izbyshev@...ras.ru>
To: musl@...ts.openwall.com
Subject: Why is setrlimit() considered to have per-thread effect?

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

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.