From: Greg KH <gregkh@suse.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: User-mode Linux Kernel Development
<user-mode-linux-devel@lists.sourceforge.net>,
Jeff Dike <jdike@addtoit.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Rob Landley <rob@landley.net>,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
Am?rico Wang <xiyou.wangcong@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Shane Hathaway <shane@hathawaymix.org>,
Daolong Wang <ahlongxp@gmail.com>,
stable@kernel.org
Subject: Re: [uml-devel] [Patch] uml: fix a link error
Date: Wed, 4 Feb 2009 12:40:09 -0800 [thread overview]
Message-ID: <20090204204009.GA10680@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0902042115530.25136@anakin>
On Wed, Feb 04, 2009 at 09:32:51PM +0100, Geert Uytterhoeven wrote:
> On Wed, 4 Feb 2009, Geert Uytterhoeven wrote:
> > On Mon, 19 Jan 2009, Shane Hathaway wrote:
> > > Daolong Wang wrote:
> > > > On Mon, Jan 19, 2009 at 11:21 PM, Jeff Dike <jdike@addtoit.com> wrote:
> > > >> On Sun, Jan 18, 2009 at 02:23:46PM +0800, Daolong Wang wrote:
> > > >>> I can confirm this link error.
> > > >> In what environment? I see no problems here.
> > >
> > > I can also confirm this link error. The problem occurs when compiling
> > > either 2.6.28.1 or 2.6.27.12; I didn't try anything earlier. The patch
> > > suggested at this beginning of this thread did solve the link problem
> > > and the resulting kernel ran for several hours. However, I think the
> > > patch is still probably incorrect.
> > >
> > > I'm going to repost what I said in another message I sent today, this
> > > time with a wider audience:
> > >
> > > The problem is that the name "sigprocmask" is getting renamed to
> > > "kernel_sigprocmask" by a compiler directive in arch/um/Makefile, then
> > > that name gets mangled into "sys_kernel_sigprocmask" by the
> > > SYSCALL_DEFINE3(sigprocmask, ...) macro in kernel/signal.c.
> > >
> > > So, instead of the patch suggested earlier, I added the following line
> > > to arch/um/sys-i386/sys_call_table.S:
> > >
> > > #define sys_sigprocmask sys_kernel_sigprocmask
> > >
> > > This made it compile and link correctly. Look at the symbols generated
> > > by the compile of signal.c to see what I mean:
> > >
> > > # nm kernel/signal.o | grep sigprocmask
> > > 0000008f r __kstrtab_kernel_sigprocmask
> > > 00000040 r __ksymtab_kernel_sigprocmask
> > > 00001ea6 T kernel_sigprocmask
> > > 00002d67 T sys_kernel_sigprocmask
> > > 00001faf T sys_rt_sigprocmask
> > >
> > > Unfortunately, it's a mystery to me that others haven't run into this
> > > before. My host environment is RHEL 4 inside some kind of chroot.
> >
> > I've just started seeing this problem with some 2.6.29-rc3 kernel...
> >
> > Before, I did not have this problem with various 2.6.28-rc8 and 2.6.29-rc1
> > kernels (and several older versions I don't remember).
> >
> > Given 2.6.29-rc1 works for me and 2.6.28.1 fails for you, I'm inclined to
> > believe 2.6.28 is OK. I'll give it a try...
> >
> > BTW, I'm using CentOS 5.2.
>
> Following up from home...
>
> Indeed, 2.6.28 works, 2.6.28.1 doesn't.
>
> According to git bisect, it got introduced by the system call security fixes
> (CVE-2009-0029), more specifically by this part:
>
> | commit fe7c0d987fb2cce464d29eec9dfcca6296b5eed7
> | Author: Heiko Carstens <heiko.carstens@de.ibm.com>
> | Date: Wed Jan 14 14:14:06 2009 +0100
> |
> | System call wrappers part 04
> |
> | commit b290ebe2c46d01b742b948ce03f09e8a3efb9a92 upstream.
> |
> | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> |
> | --- a/kernel/signal.c
> | +++ b/kernel/signal.c
> | @@ -2425,8 +2424,8 @@ sys_sigpending(old_sigset_t __user *set)
> | /* Some platforms have their own version with special arguments others
> | support only sys_rt_sigprocmask. */
> |
> | -asmlinkage long
> | -sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset)
> ^^^^^^^^^^^^^^^
> | +SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set,
> ^^^^^^^^^^^
> | + old_sigset_t __user *, oset)
> | {
> | int error;
> | old_sigset_t old_set, new_set;
>
> Hence it allows sigprocmask to be redefined to kernel_sigprocmask by the C
> preprocessor...
>
> This got backported to 2.6.27.12 as well, confusing people who ran post-2.6.27
> development kernels and never noticed the problem (including Jeff and me)...
>
> It showed up in a "development" kernel in 2.6.29-rc2 only.
Is there a real patch in Linus's tree for this fix that I can add to the
.27 and .28 -stable kernel trees?
thanks,
greg k-h
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@suse.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Shane Hathaway <shane@hathawaymix.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Daolong Wang <ahlongxp@gmail.com>,
User-mode Linux Kernel Development
<user-mode-linux-devel@lists.sourceforge.net>,
Jeff Dike <jdike@addtoit.com>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Rob Landley <rob@landley.net>,
Am?rico Wang <xiyou.wangcong@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
stable@kernel.org,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Subject: Re: [uml-devel] [Patch] uml: fix a link error
Date: Wed, 4 Feb 2009 12:40:09 -0800 [thread overview]
Message-ID: <20090204204009.GA10680@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0902042115530.25136@anakin>
On Wed, Feb 04, 2009 at 09:32:51PM +0100, Geert Uytterhoeven wrote:
> On Wed, 4 Feb 2009, Geert Uytterhoeven wrote:
> > On Mon, 19 Jan 2009, Shane Hathaway wrote:
> > > Daolong Wang wrote:
> > > > On Mon, Jan 19, 2009 at 11:21 PM, Jeff Dike <jdike@addtoit.com> wrote:
> > > >> On Sun, Jan 18, 2009 at 02:23:46PM +0800, Daolong Wang wrote:
> > > >>> I can confirm this link error.
> > > >> In what environment? I see no problems here.
> > >
> > > I can also confirm this link error. The problem occurs when compiling
> > > either 2.6.28.1 or 2.6.27.12; I didn't try anything earlier. The patch
> > > suggested at this beginning of this thread did solve the link problem
> > > and the resulting kernel ran for several hours. However, I think the
> > > patch is still probably incorrect.
> > >
> > > I'm going to repost what I said in another message I sent today, this
> > > time with a wider audience:
> > >
> > > The problem is that the name "sigprocmask" is getting renamed to
> > > "kernel_sigprocmask" by a compiler directive in arch/um/Makefile, then
> > > that name gets mangled into "sys_kernel_sigprocmask" by the
> > > SYSCALL_DEFINE3(sigprocmask, ...) macro in kernel/signal.c.
> > >
> > > So, instead of the patch suggested earlier, I added the following line
> > > to arch/um/sys-i386/sys_call_table.S:
> > >
> > > #define sys_sigprocmask sys_kernel_sigprocmask
> > >
> > > This made it compile and link correctly. Look at the symbols generated
> > > by the compile of signal.c to see what I mean:
> > >
> > > # nm kernel/signal.o | grep sigprocmask
> > > 0000008f r __kstrtab_kernel_sigprocmask
> > > 00000040 r __ksymtab_kernel_sigprocmask
> > > 00001ea6 T kernel_sigprocmask
> > > 00002d67 T sys_kernel_sigprocmask
> > > 00001faf T sys_rt_sigprocmask
> > >
> > > Unfortunately, it's a mystery to me that others haven't run into this
> > > before. My host environment is RHEL 4 inside some kind of chroot.
> >
> > I've just started seeing this problem with some 2.6.29-rc3 kernel...
> >
> > Before, I did not have this problem with various 2.6.28-rc8 and 2.6.29-rc1
> > kernels (and several older versions I don't remember).
> >
> > Given 2.6.29-rc1 works for me and 2.6.28.1 fails for you, I'm inclined to
> > believe 2.6.28 is OK. I'll give it a try...
> >
> > BTW, I'm using CentOS 5.2.
>
> Following up from home...
>
> Indeed, 2.6.28 works, 2.6.28.1 doesn't.
>
> According to git bisect, it got introduced by the system call security fixes
> (CVE-2009-0029), more specifically by this part:
>
> | commit fe7c0d987fb2cce464d29eec9dfcca6296b5eed7
> | Author: Heiko Carstens <heiko.carstens@de.ibm.com>
> | Date: Wed Jan 14 14:14:06 2009 +0100
> |
> | System call wrappers part 04
> |
> | commit b290ebe2c46d01b742b948ce03f09e8a3efb9a92 upstream.
> |
> | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> |
> | --- a/kernel/signal.c
> | +++ b/kernel/signal.c
> | @@ -2425,8 +2424,8 @@ sys_sigpending(old_sigset_t __user *set)
> | /* Some platforms have their own version with special arguments others
> | support only sys_rt_sigprocmask. */
> |
> | -asmlinkage long
> | -sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset)
> ^^^^^^^^^^^^^^^
> | +SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set,
> ^^^^^^^^^^^
> | + old_sigset_t __user *, oset)
> | {
> | int error;
> | old_sigset_t old_set, new_set;
>
> Hence it allows sigprocmask to be redefined to kernel_sigprocmask by the C
> preprocessor...
>
> This got backported to 2.6.27.12 as well, confusing people who ran post-2.6.27
> development kernels and never noticed the problem (including Jeff and me)...
>
> It showed up in a "development" kernel in 2.6.29-rc2 only.
Is there a real patch in Linus's tree for this fix that I can add to the
.27 and .28 -stable kernel trees?
thanks,
greg k-h
next prev parent reply other threads:[~2009-02-04 20:42 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 19:40 [uml-devel] [Patch] uml: fix a link error Américo Wang
2009-01-15 19:40 ` Américo Wang
2009-01-16 20:41 ` [uml-devel] " Andrew Morton
2009-01-16 20:41 ` Andrew Morton
2009-01-16 21:38 ` [uml-devel] " Jeff Dike
2009-01-16 21:38 ` Jeff Dike
2009-01-17 9:28 ` [uml-devel] " Rob Landley
2009-01-17 9:28 ` Rob Landley
2009-01-18 6:23 ` Daolong Wang
2009-01-18 6:23 ` Daolong Wang
2009-01-19 15:21 ` Jeff Dike
2009-01-19 15:21 ` Jeff Dike
2009-01-20 1:46 ` Daolong Wang
2009-01-20 1:46 ` Daolong Wang
2009-01-20 2:01 ` Shane Hathaway
2009-01-20 2:01 ` Shane Hathaway
2009-01-27 9:23 ` Al Viro
2009-01-27 9:23 ` Al Viro
2009-02-04 17:26 ` Geert Uytterhoeven
2009-02-04 17:26 ` Geert Uytterhoeven
2009-02-04 20:32 ` Geert Uytterhoeven
2009-02-04 20:32 ` Geert Uytterhoeven
2009-02-04 20:40 ` Greg KH [this message]
2009-02-04 20:40 ` Greg KH
2009-02-04 20:54 ` Geert Uytterhoeven
2009-02-04 20:54 ` Geert Uytterhoeven
2009-02-07 11:59 ` Heiko Carstens
2009-02-07 11:59 ` Heiko Carstens
2009-02-08 9:07 ` Américo Wang
2009-02-08 9:07 ` Américo Wang
2009-02-08 9:12 ` Américo Wang
2009-02-08 9:12 ` Américo Wang
2009-02-12 14:40 ` Geert Uytterhoeven
2009-02-12 14:40 ` Geert Uytterhoeven
2009-01-18 8:32 ` Américo Wang
2009-01-18 8:32 ` Américo Wang
2009-01-18 23:29 ` Rob Landley
2009-01-18 23:29 ` Rob Landley
2009-01-22 16:12 ` Américo Wang
2009-01-22 16:12 ` Américo Wang
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=20090204204009.GA10680@suse.de \
--to=gregkh@suse.de \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=ahlongxp@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=heiko.carstens@de.ibm.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--cc=shane@hathawaymix.org \
--cc=stable@kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=xiyou.wangcong@gmail.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 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.