From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11056 invoked by alias); 24 Nov 2014 20:43:58 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 11009 invoked by uid 48); 24 Nov 2014 20:43:54 -0000 From: "azanella at linux dot vnet.ibm.com" To: glibc-bugs@sourceware.org Subject: [Bug libc/16418] [powerpc] ppc's get_clockfreq is racy and cancel-unsafe Date: Mon, 24 Nov 2014 20:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.18 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: azanella at linux dot vnet.ibm.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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-11/txt/msg00188.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16418 Adhemerval Zanella Netto changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |azanella at linux dot vnet.ibm.com --- Comment #1 from Adhemerval Zanella Netto --- Checking on kernel side, both versions (powerpc32 and powerpc64) does not return an error (both clear cr0.so bit upon return). Also, vDSO is provided even for static-linked binaries and it is supported on minimal kernel version current GLIBC required (2.6.32). So I see some options: 1. Move the internal 'timebase_freq' initialization from the function itself, initialize once and read from it). 2. Remove the internal 'timebase_freq' static car and rely on either call vDSO or read it from /proc. I don't see this function to be a performance critical one, so we can live it this. 2.1. The problem I see is for static build, the '__vdso_get_tbfreq' won't be defined (since it is not initialized on 'VDSO_SETUP'. However I don't see a problem on enabling vDSO support for static builds. 2.2. Instead of just relying of vDSO for static, provide a static fallback using the _nocancel variations. I intend to fix it by implementing 2.2. -- You are receiving this mail because: You are on the CC list for the bug.