This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3] getrandom system call wrapper [BZ #17252]



On 04/10/2016 05:02, Florian Weimer wrote:
> On 10/03/2016 07:51 PM, Carlos O'Donell wrote:
>> On 09/09/2016 10:21 AM, Torvald Riegel wrote:
>>> On Thu, 2016-09-08 at 13:44 +0200, Florian Weimer wrote:
>>>> I have made the system call wrapper a cancellation point.  (If we
>>>> implement the simpler getentropy interface, it would not be a
>>>> cancellation point.)
>>>
>>> Why did you do that?  Even though the system call is new, and thus can't
>>> have been used in existing code directly, making it a cancellation point
>>> will make all callers cancellation points too.  Therefore, for example,
>>> we couldn't use it in the implementation of any POSIX functions (that
>>> are not cancellation points) in glibc without having to disable and
>>> restore the cancellation state around it every time.
>>> It might be even more convenient to have one wrapper that is a
>>> cancellation point and one that is not.
>>>
>>> Can't we just let cancellation rot in its corner?
>>
>> I will second what Florian has suggested, I also think getrandom() should
>> be a cancellation point.

I also see a better alternative to set getrandom as a cancellation point,
it aligns with latest linux oriented syscalls that might block ({p}pool,
sync_file_range, epoll_{p}wait).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]