From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20807 invoked by alias); 28 May 2008 19:31:49 -0000 Received: (qmail 20797 invoked by uid 22791); 28 May 2008 19:31:48 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 28 May 2008 19:31:29 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 2C2FD98401; Wed, 28 May 2008 19:31:27 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id DB1219830E; Wed, 28 May 2008 19:31:26 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1K1RMr-0000Ud-Jv; Wed, 28 May 2008 15:31:25 -0400 Date: Thu, 29 May 2008 00:18:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfa/gdbserver] Fix ppc64 bi-arch TLS bug Message-ID: <20080528193125.GA1877@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <200805281829.m4SITpgT028177@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805281829.m4SITpgT028177@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00739.txt.bz2 On Wed, May 28, 2008 at 08:29:51PM +0200, Ulrich Weigand wrote: > Hello, > > this fixes another bug in ppc64 bi-arch gdbserver support: the > ppc_collect_ptrace_register did not zero out the register buffer > (in the case of a 4-byte inferior register on a 64-bit host). > > This doesn't matter for the main user of this function > (usr_store_inferior_registers in linux-low.c) which always > zeros the buffer itself before passing it in. > > However, there is a second caller, ps_lgetregs in proc-service.c > (via the ppc_fill_gregset function) which does *not* zero the > buffer. This could cause TLS access to fail in some instances > of 64->32 bit bi-arch debugging. > > Fixed by simply always clearing the register buffer. > > Tested on powerpc64-linux (-m64/-m32) and powerpc-linux using > local gdbserver. > > OK for mainline? OK. -- Daniel Jacobowitz CodeSourcery