Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfa/gdbserver] Fix ppc64 bi-arch TLS bug
Date: Thu, 29 May 2008 00:18:00 -0000	[thread overview]
Message-ID: <20080528193125.GA1877@caradoc.them.org> (raw)
In-Reply-To: <200805281829.m4SITpgT028177@d12av02.megacenter.de.ibm.com>

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


  reply	other threads:[~2008-05-28 19:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 23:07 Ulrich Weigand
2008-05-29  0:18 ` Daniel Jacobowitz [this message]
2008-05-29 20:30   ` Ulrich Weigand

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=20080528193125.GA1877@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /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: link
Be 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