All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe De Muyter <phdm@macqel.be>
To: Michael Neuling <mikey@neuling.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: 3.9-rc1 powerpc ptrace.c: 'brk.len' is used uninitialized
Date: Thu, 7 Mar 2013 10:59:07 +0100	[thread overview]
Message-ID: <20130307095907.GA16489@frolo.macqel> (raw)
In-Reply-To: <31862.1362611670@ale.ozlabs.ibm.com>

Hello Mikey,

On Thu, Mar 07, 2013 at 10:14:30AM +1100, Michael Neuling wrote:
> Philippe De Muyter <phdm@macqel.be> wrote:
> 
> > On Thu, Mar 07, 2013 at 09:09:48AM +1100, Michael Neuling wrote:
> > > > bisect tells me that since your commit 9422de3e953d0e60eb95f5430a9dd803eec1c6d7 
> > > > "powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers",
> > > > compiling linux fails with :
> > > > 
> > > >   cc1: warnings being treated as errors
> > > >   arch/powerpc/kernel/ptrace.c: In function 'arch_ptrace':
> > > >   arch/powerpc/kernel/ptrace.c:1450: warning: 'brk.len' is used uninitialized in this function
> > > >   arch/powerpc/kernel/ptrace.c:1352: note: 'brk.len' was declared here
> > > > 
> > > > could you look at that ?
> > > 
> > > Sure. 
> > 
> > I use gcc-4.2.2, and my .config follows.
> 
> I'm a bit lost.  
> 
> I don't have 4.2.2 (which is ancient BTW) and I can't hit this on
> 4.3,4.5 or 4.6 with your config.  It compiles fine.
> 
> Also:
> 
> >   arch/powerpc/kernel/ptrace.c:1450: warning: 'brk.len' is used uninitialized in this function
> >   arch/powerpc/kernel/ptrace.c:1352: note: 'brk.len' was declared here
> 
> These line numbers make no sense at all WRT v3.9-rc1.  brk.len is neither
> declared or used in those lines:

those were the line numbers just after your commit

In 3.9-rc1 they are :

cc1: warnings being treated as errors
arch/powerpc/kernel/ptrace.c: In function 'arch_ptrace':
arch/powerpc/kernel/ptrace.c:1479: warning: 'brk.len' is used uninitialized in this function
arch/powerpc/kernel/ptrace.c:1381: note: 'brk.len' was declared here

		if (child->thread.hw_brk.address)
			return -ENOSPC;

1479:		child->thread.hw_brk = brk;

		return 1;
	#endif /* !CONFIG_PPC_ADV_DEBUG_DVCS */

Philippe

WARNING: multiple messages have this Message-ID (diff)
From: Philippe De Muyter <phdm@macqel.be>
To: Michael Neuling <mikey@neuling.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: 3.9-rc1 powerpc ptrace.c: 'brk.len' is used uninitialized
Date: Thu, 7 Mar 2013 10:59:07 +0100	[thread overview]
Message-ID: <20130307095907.GA16489@frolo.macqel> (raw)
In-Reply-To: <31862.1362611670@ale.ozlabs.ibm.com>

Hello Mikey,

On Thu, Mar 07, 2013 at 10:14:30AM +1100, Michael Neuling wrote:
> Philippe De Muyter <phdm@macqel.be> wrote:
> 
> > On Thu, Mar 07, 2013 at 09:09:48AM +1100, Michael Neuling wrote:
> > > > bisect tells me that since your commit 9422de3e953d0e60eb95f5430a9dd803eec1c6d7 
> > > > "powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers",
> > > > compiling linux fails with :
> > > > 
> > > >   cc1: warnings being treated as errors
> > > >   arch/powerpc/kernel/ptrace.c: In function 'arch_ptrace':
> > > >   arch/powerpc/kernel/ptrace.c:1450: warning: 'brk.len' is used uninitialized in this function
> > > >   arch/powerpc/kernel/ptrace.c:1352: note: 'brk.len' was declared here
> > > > 
> > > > could you look at that ?
> > > 
> > > Sure. 
> > 
> > I use gcc-4.2.2, and my .config follows.
> 
> I'm a bit lost.  
> 
> I don't have 4.2.2 (which is ancient BTW) and I can't hit this on
> 4.3,4.5 or 4.6 with your config.  It compiles fine.
> 
> Also:
> 
> >   arch/powerpc/kernel/ptrace.c:1450: warning: 'brk.len' is used uninitialized in this function
> >   arch/powerpc/kernel/ptrace.c:1352: note: 'brk.len' was declared here
> 
> These line numbers make no sense at all WRT v3.9-rc1.  brk.len is neither
> declared or used in those lines:

those were the line numbers just after your commit

In 3.9-rc1 they are :

cc1: warnings being treated as errors
arch/powerpc/kernel/ptrace.c: In function 'arch_ptrace':
arch/powerpc/kernel/ptrace.c:1479: warning: 'brk.len' is used uninitialized in this function
arch/powerpc/kernel/ptrace.c:1381: note: 'brk.len' was declared here

		if (child->thread.hw_brk.address)
			return -ENOSPC;

1479:		child->thread.hw_brk = brk;

		return 1;
	#endif /* !CONFIG_PPC_ADV_DEBUG_DVCS */

Philippe

  reply	other threads:[~2013-03-07  9:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06  6:00 3.9-rc1 powerpc ptrace.c: 'brk.len' is used uninitialized Philippe De Muyter
2013-03-06  6:00 ` Philippe De Muyter
2013-03-06 22:09 ` Michael Neuling
2013-03-06 22:09   ` Michael Neuling
2013-03-06 22:36   ` Philippe De Muyter
2013-03-06 22:36     ` Philippe De Muyter
2013-03-06 23:14     ` Michael Neuling
2013-03-06 23:14       ` Michael Neuling
2013-03-07  9:59       ` Philippe De Muyter [this message]
2013-03-07  9:59         ` Philippe De Muyter
2013-03-07 22:32         ` Michael Neuling
2013-03-07 22:32           ` Michael Neuling
2013-03-07 23:03           ` Michael Neuling
2013-03-07 23:03             ` Michael Neuling
2013-03-08 10:24             ` Philippe De Muyter
2013-03-08 10:24               ` Philippe De Muyter
2013-03-12  2:42               ` powerpc/ptrace: Fix brk.len used uninitialised Michael Neuling

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=20130307095907.GA16489@frolo.macqel \
    --to=phdm@macqel.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.