From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1818 invoked by alias); 29 May 2008 11:58:37 -0000 Received: (qmail 1747 invoked by uid 22791); 29 May 2008 11:58:36 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 29 May 2008 11:58:14 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.8/8.13.8) with ESMTP id m4TBwB02019368 for ; Thu, 29 May 2008 11:58:11 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m4TBwBKD2498674 for ; Thu, 29 May 2008 13:58:11 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m4TBwBqI007948 for ; Thu, 29 May 2008 13:58:11 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m4TBwBJk007941; Thu, 29 May 2008 13:58:11 +0200 Message-Id: <200805291158.m4TBwBJk007941@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 29 May 2008 13:58:10 +0200 Subject: Re: [rfa/gdbserver] Fix ppc64 bi-arch TLS bug To: drow@false.org (Daniel Jacobowitz) Date: Thu, 29 May 2008 20:30:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20080528193125.GA1877@caradoc.them.org> from "Daniel Jacobowitz" at May 28, 2008 03:31:25 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00753.txt.bz2 Daniel Jacbowitz wrote: > 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. Committed, thanks. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com