From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751685AbbJYNRk (ORCPT ); Sun, 25 Oct 2015 09:17:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45576 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbbJYNRi (ORCPT ); Sun, 25 Oct 2015 09:17:38 -0400 Subject: Re: [PATCH 3/3] sched: Implement interface for cgroup unified hierarchy To: "Theodore Ts'o" , Ingo Molnar , Linus Torvalds , Tejun Heo , Mike Galbraith , Paul Turner , Peter Zijlstra , Ingo Molnar , Johannes Weiner , Li Zefan , cgroups , LKML , kernel-team , Andrew Morton References: <20151001184629.GB26498@mtj.duckdns.org> <20151023222110.GA4390@mtj.duckdns.org> <1445661367.3218.62.camel@gmail.com> <20151025021829.GA15471@mtj.duckdns.org> <20151025093331.GA4834@gmail.com> <20151025104145.GE27558@thunk.org> <562CB328.3090906@redhat.com> <20151025115842.GA13940@thunk.org> From: Florian Weimer X-Enigmail-Draft-Status: N1110 Message-ID: <562CD663.5010506@redhat.com> Date: Sun, 25 Oct 2015 14:17:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151025115842.GA13940@thunk.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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