public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug libc/17252] getrandom and getentropy syscall Date: Sat, 16 Aug 2014 16:54:00 -0000 [thread overview] Message-ID: <bug-17252-131-ukbgEWcpAi@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-17252-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=17252 --- Comment #2 from Florian Weimer <fweimer at redhat dot com> --- (In reply to Cristian Rodríguez from comment #0) > Ideally, if the system call is not found in the running kernel, fallback to > emulation by reading /dev/urandom in the default case or /dev/random if > GRND_RANDOM is used. If GRND_NONBLOCK is not set and the buffer is proper, the system call cannot fail. It is impossible to achieve that with emulation. -- You are receiving this mail because: You are on the CC list for the bug. >From glibc-bugs-return-25986-listarch-glibc-bugs=sources.redhat.com@sourceware.org Sat Aug 16 22:19:28 2014 Return-Path: <glibc-bugs-return-25986-listarch-glibc-bugs=sources.redhat.com@sourceware.org> Delivered-To: listarch-glibc-bugs@sources.redhat.com Received: (qmail 11857 invoked by alias); 16 Aug 2014 22:19:28 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <glibc-bugs.sourceware.org> List-Subscribe: <mailto:glibc-bugs-subscribe@sourceware.org> List-Post: <mailto:glibc-bugs@sourceware.org> List-Help: <mailto:glibc-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs> Sender: glibc-bugs-owner@sourceware.org Delivered-To: mailing list glibc-bugs@sourceware.org Received: (qmail 11812 invoked by uid 48); 16 Aug 2014 22:19:23 -0000 From: "bugdal at aerifal dot cx" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug nptl/13165] pthread_cond_wait() can consume a signal that was sent before it started waiting Date: Sat, 16 Aug 2014 22:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nptl X-Bugzilla-Version: 2.14 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bugdal at aerifal dot cx X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: triegel at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: <bug-13165-131-2qZOKapRcv@http.sourceware.org/bugzilla/> In-Reply-To: <bug-13165-131@http.sourceware.org/bugzilla/> References: <bug-13165-131@http.sourceware.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00069.txt.bz2 Content-length: 879 https://sourceware.org/bugzilla/show_bug.cgi?id\x13165 --- Comment #38 from Rich Felker <bugdal at aerifal dot cx> --- I just read the source for pthread_cond_wait and the cause of the bug is obvious: the mutex is being unlocked before the current thread acquires the internal lock in the cond var and adds itself as a waiter. Simply moving the mutex unlock to somewhere after this point (e.g. right before the futex wait loop) should fix the problem. This is necessary to meet the requirement that formally becoming a waiter is atomic with unlocking of the mutex, rather than happening at some time after unlocking the mutex with a race window in between. If someone else could test this fix, I would appreciate it since I don't have an environment setup for building and testing new glibc builds. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2014-08-16 16:54 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-10 17:04 [Bug libc/17252] New: " crrodriguez at opensuse dot org 2014-08-11 15:47 ` [Bug libc/17252] " joseph at codesourcery dot com 2014-08-11 20:49 ` fweimer at redhat dot com 2014-08-16 16:54 ` fweimer at redhat dot com [this message] 2014-10-06 13:38 ` alex.gaynor at gmail dot com 2015-02-24 14:21 ` victor.stinner at gmail dot com 2015-02-24 14:34 ` crrodriguez at opensuse dot org 2015-08-14 14:17 ` nmav at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-17252-131-ukbgEWcpAi@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).