lkml.org 
[lkml]   [2015]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] sched: Implement interface for cgroup unified hierarchy
From
Date
On 10/25/2015 12:58 PM, Theodore Ts'o wrote:

> Well, I was thinking we could just teach them to use
> "syscall(SYS_gettid)".

Right, and that's easier if TIDs are officially part of the GNU API.

I think the worry is that some future system might have TIDs which do
not share the PID space, or are real descriptors (that they need
explicit open and close operations).

> On a different subject, I'm going to start telling people to use
> "syscall(SYS_getrandom)", since I think that's going to be easier than
> having asking people to change their Makefiles to link against some
> Linux-specific library, but that's a different debate, and I recognize
> the glibc folks aren't willing to bend on that one.

I think we can reach consensus for an implementation which makes this code

unsigned char session_key[32];
getrandom (session_key, sizeof (session_key), 0);
install_session_key (session_key);

correct. That is, no error handling code for ENOMEM, ENOSYS, EINTR,
ENOMEM or short reads is necessary. It seems that several getrandom
wrappers currently built into applications do not get this completely right.

Florian



\
 
 \ /
  Last update: 2015-10-25 14:41    [W:0.090 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site