mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Martin Michlmayr <tbm@cyrius.com>
Cc: linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: "elf core dump: fix get_user use" breaks mips compilation
Date: Mon, 16 Feb 2009 13:25:15 -0800 (PST)	[thread overview]
Message-ID: <20090216212515.B62C5FC3E4@magilla.sf.frob.com> (raw)
In-Reply-To: Martin Michlmayr's message of  Monday, 16 February 2009 13:01:36 +0100 <20090216120136.GA9057@deprecation.cyrius.com>

That is either a compiler problem or a problem with how the asm magic used
inside get_user() informs the compiler.  The dynamics of the code are not
actually much different than before the change.  

I imagine this would work around it:

--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1211,7 +1211,7 @@ static unsigned long vma_dump_size(struc
 	if (FILTER(ELF_HEADERS) &&
 	    vma->vm_pgoff == 0 && (vma->vm_flags & VM_READ)) {
 		u32 __user *header = (u32 __user *) vma->vm_start;
-		u32 word;
+		u32 word = 0;
 		mm_segment_t fs = get_fs();
 		/*
 		 * Doing it this way gets the constant folded by GCC.

  reply	other threads:[~2009-02-16 21:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16 12:01 Martin Michlmayr
2009-02-16 21:25 ` Roland McGrath [this message]
2009-02-17  8:15   ` Martin Michlmayr
2009-02-16 23:32 ` Ralf Baechle
2009-02-17  7:42   ` Martin Michlmayr
2009-02-17  8:15   ` Christian Borntraeger

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=20090216212515.B62C5FC3E4@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=tbm@cyrius.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

all inboxes | Powered by JetHome®