From: Jeff Dike <jdike@addtoit.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: David Shane Holden <dpejesh@yahoo.com>,
"david.r" <david.r@seznam.cz>,
uml-devel <user-mode-linux-devel@lists.sourceforge.net>,
uml-user <user-mode-linux-user@lists.sourceforge.net>,
Peter Teoh <htmldeveloper@GMAIL.COM>
Subject: Re: [uml-devel] [PATCH] Fix for 2.6.26 ptrace crash
Date: Wed, 23 Jul 2008 12:14:30 -0400 [thread overview]
Message-ID: <20080723161430.GC15682@c2.user-mode-linux.org> (raw)
In-Reply-To: <488599E1.50402@panasas.com>
On Tue, Jul 22, 2008 at 11:27:13AM +0300, Boaz Harrosh wrote:
> I'm not sure I fully understand. Could you please explain what you
> found.
arch/um/include/init.h copies enough definitions from linux/compiler.h
and linux/init.h to implement initcall and exitcall et al. It can't
include the kernel headers because it's included in userspace files,
and libc and kernel headers don't mix.
What happened was that I copied enough to make a distinction between
gcc 3.3 and higher vs lower than 3.3 (for the latter, the kernel
defines __used as attribute(__unused) for some reason).
However, since my ifdefs weren't looking at the major version, these
definitions also held for gcc 4.x. And when I added unit-at-a-time,
the __unused started being taken seriously, and UML libc-side
initcalls were thrown out.
> Why is it that with same compiler, some systems had a problem and some
> did not? is it .config related?
I have no idea. When Ulrich Drepper first hit this, he and I had the
same base system, same architecture, same toolchain, same config, and
I didn't see it.
I've upgraded since then, so I can't test in the same environment, but
when I add the bug back in such that it hits with gcc 4.3, I get the
crash.
So, this is very mysterious.
> Also I would prefer if the:
> #define __used __attribute__((__used__))
> would get an #if ((__GNUC__* 100 + __GNUC_MINOR__) >= 303 )
> of its own because other wise this problem will return when
> gcc hits 5. Just as it returned now.
I don't see the point - this is all wrapped in __GNUC__ == 3 or 4. As
for gcc 5, linux/compiler has this to say:
#else
# error Sorry, your compiler is too old/not recognized.
#endif
So the kernel totally won't build with gcc 5.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
prev parent reply other threads:[~2008-07-23 16:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 15:46 [uml-devel] [PATCH] Fix for 2.6.26 ptrace crash Jeff Dike
2008-07-21 20:24 ` [uml-devel] [uml-user] " vincent-perrier
2008-07-22 8:45 ` [uml-devel] " Peter Teoh
[not found] ` <488599E1.50402@panasas.com>
2008-07-23 16:14 ` Jeff Dike [this message]
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=20080723161430.GC15682@c2.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=bharrosh@panasas.com \
--cc=david.r@seznam.cz \
--cc=dpejesh@yahoo.com \
--cc=htmldeveloper@GMAIL.COM \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=user-mode-linux-user@lists.sourceforge.net \
/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.