From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91715 invoked by alias); 16 Nov 2016 15:11:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 91700 invoked by uid 89); 16 Nov 2016 15:11:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=management X-HELO: mx1.redhat.com Subject: Re: [PATCH v7] getrandom system call wrapper [BZ #17252] To: Zack Weinberg , libc-alpha@sourceware.org References: <3dd5d3b8-c196-98fb-1671-90cd90ab90c7@redhat.com> <244f578c-889a-a4cf-c686-bb2a5e49cca1@panix.com> From: Florian Weimer Message-ID: Date: Wed, 16 Nov 2016 15:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <244f578c-889a-a4cf-c686-bb2a5e49cca1@panix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2016-11/txt/msg00561.txt.bz2 On 11/14/2016 07:29 PM, Zack Weinberg wrote: > On 11/14/2016 12:44 PM, Florian Weimer wrote: >> This patch switches back to the ssize_t return time. This goes against >> Theodore Ts'o preference, but seems to reflect the consensus from the >> largery community. > > I still don't think this function should be a cancellation point. I guess we'll have to agree to disagree on this matter. >> I weakened the protection against accidental interposition somewhat. >> Since the declaration is a new header file, I do not use a function-like >> macro to prevent a definition of a function named “getrandom”, and >> non-GNU compilers do not get any redirection. > > We don't normally do this at all. See the “Evolution of ELF symbol management” thread. We do it all the time, for the benefit of non-libc DSOs in the glibc conglomerate. I think there is broad consensus that we need to extend this to libstdc++ at least (in addition to changes needed to enable C++ compilation without _GNU_SOURCE). And once we are at C++, why stop there? Even dynamic languages with a C extension framework would use this. Thanks, Florian