public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.0 kernel panic
@ 2003-12-28  2:07 Murray J. Root
  2003-12-28 10:58 ` Han Boetes
  2003-12-30  3:30 ` Murray J. Root
  0 siblings, 2 replies; 6+ messages in thread
From: Murray J. Root @ 2003-12-28  2:07 UTC (permalink / raw)
  To: linux-kernel

P4 2GHz
ASUS P4S533 mainboard
1G PC2700 RAM
GF2 GTS video using nv driver
2.6.0 compiled with gcc 3.3.2

At boot kernel gets:
   INIT: cannot execute "/etc/rc.d/rc.sysinit"
then panic.

Same configuration for 2.6.0-test11 and earlier works fine.

-- 
Murray J. Root


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.0 kernel panic
  2003-12-28  2:07 2.6.0 kernel panic Murray J. Root
@ 2003-12-28 10:58 ` Han Boetes
  2003-12-30  3:30 ` Murray J. Root
  1 sibling, 0 replies; 6+ messages in thread
From: Han Boetes @ 2003-12-28 10:58 UTC (permalink / raw)
  To: linux-kernel

Murray J. Root wrote:
> P4 2GHz
> ASUS P4S533 mainboard
> 1G PC2700 RAM
> GF2 GTS video using nv driver
> 2.6.0 compiled with gcc 3.3.2
> 
> At boot kernel gets:
>    INIT: cannot execute "/etc/rc.d/rc.sysinit"
> then panic.
> 
> Same configuration for 2.6.0-test11 and earlier works fine.

Update your gcc-rpm and recompile



# Han

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.0 kernel panic
  2003-12-28  2:07 2.6.0 kernel panic Murray J. Root
  2003-12-28 10:58 ` Han Boetes
@ 2003-12-30  3:30 ` Murray J. Root
  2003-12-30  6:42   ` Linus Torvalds
  1 sibling, 1 reply; 6+ messages in thread
From: Murray J. Root @ 2003-12-30  3:30 UTC (permalink / raw)
  To: linux-kernel

On Sat, Dec 27, 2003 at 09:07:59PM -0500, Murray J. Root wrote:
> P4 2GHz
> ASUS P4S533 mainboard
> 1G PC2700 RAM
> GF2 GTS video using nv driver
> 2.6.0 compiled with gcc 3.3.2
> 
> At boot kernel gets:
>    INIT: cannot execute "/etc/rc.d/rc.sysinit"
> then panic.
> 
> Same configuration for 2.6.0-test11 and earlier works fine.
> 

To answer myself, I did a diff between 2.6.0-test11 and 2.6.0. Found this:

diff -ru RAW260T11/mm/mmap.c RAW260/mm/mmap.c
--- RAW260T11/mm/mmap.c	2003-11-26 15:44:31.000000000 -0500
+++ RAW260/mm/mmap.c	2003-12-17 21:58:58.000000000 -0500
@@ -19,6 +19,7 @@
 #include <linux/hugetlb.h>
 #include <linux/profile.h>
 #include <linux/module.h>
+#include <linux/mount.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
@@ -474,8 +475,13 @@
 	struct rb_node ** rb_link, * rb_parent;
 	unsigned long charged = 0;
 
-	if (file && (!file->f_op || !file->f_op->mmap))
-		return -ENODEV;
+	if (file) {
+		if (!file->f_op || !file->f_op->mmap)
+			return -ENODEV;
+
+		if ((prot & PROT_EXEC) && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC))
+			return -EPERM;
+	}
 
 	if (!len)
 		return addr;

I undid the changes and it boots fine.
Don't know if it makes a difference but I don't use an initrd.

-- 
Murray J. Root

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.0 kernel panic
  2003-12-30  3:30 ` Murray J. Root
@ 2003-12-30  6:42   ` Linus Torvalds
  2003-12-30  7:07     ` Murray J. Root
  2003-12-31  3:53     ` Isaac Claymore
  0 siblings, 2 replies; 6+ messages in thread
From: Linus Torvalds @ 2003-12-30  6:42 UTC (permalink / raw)
  To: Murray J. Root; +Cc: linux-kernel



On Mon, 29 Dec 2003, Murray J. Root wrote:
> On Sat, Dec 27, 2003 at 09:07:59PM -0500, Murray J. Root wrote:
> > P4 2GHz
> > ASUS P4S533 mainboard
> > 1G PC2700 RAM
> > GF2 GTS video using nv driver
> > 2.6.0 compiled with gcc 3.3.2
> > 
> > At boot kernel gets:
> >    INIT: cannot execute "/etc/rc.d/rc.sysinit"
> > then panic.
> > 
> > Same configuration for 2.6.0-test11 and earlier works fine.
> > 
> 
> To answer myself, I did a diff between 2.6.0-test11 and 2.6.0. Found this:

Sounds like one of the partitions that has the executable script loader is
mounted with "noexec". 

On most systems, /etc/rc.d/rc.sysinit is a bash script, and explicitly
points to /bin/bash. Check "ldd /bin/bash", and verify that all the
libraries (and /bin itself, of course) are mounted on executable
filesystems.

That would be a bug that 2.6.0 uncovers. 

		Linus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.0 kernel panic
  2003-12-30  6:42   ` Linus Torvalds
@ 2003-12-30  7:07     ` Murray J. Root
  2003-12-31  3:53     ` Isaac Claymore
  1 sibling, 0 replies; 6+ messages in thread
From: Murray J. Root @ 2003-12-30  7:07 UTC (permalink / raw)
  To: linux-kernel

On Mon, Dec 29, 2003 at 10:42:06PM -0800, Linus Torvalds wrote:
> 
> 
> On Mon, 29 Dec 2003, Murray J. Root wrote:
> > On Sat, Dec 27, 2003 at 09:07:59PM -0500, Murray J. Root wrote:
> > > P4 2GHz
> > > ASUS P4S533 mainboard
> > > 1G PC2700 RAM
> > > GF2 GTS video using nv driver
> > > 2.6.0 compiled with gcc 3.3.2
> > > 
> > > At boot kernel gets:
> > >    INIT: cannot execute "/etc/rc.d/rc.sysinit"
> > > then panic.
> > > 
> > > Same configuration for 2.6.0-test11 and earlier works fine.
> > > 
> > 
> > To answer myself, I did a diff between 2.6.0-test11 and 2.6.0. Found this:
> 
> Sounds like one of the partitions that has the executable script loader is
> mounted with "noexec". 
> 
> On most systems, /etc/rc.d/rc.sysinit is a bash script, and explicitly
> points to /bin/bash. Check "ldd /bin/bash", and verify that all the
> libraries (and /bin itself, of course) are mounted on executable
> filesystems.
> 
> That would be a bug that 2.6.0 uncovers. 
> 

Thought of that. What does the initial mounting of / ? If it's using /etc/fstab
then that isn't the problem - I have no partitions mounting noexec.
/bin and /lib are on the / partition. If it's a script then it's from Mandrake
and I'll have to hunt it down and send them a patch.

Not using devfs or udev. No initrd. All components built-in although module
support is enabled.

/etc/fstab is included below.

-- 
Murray J. Root

[root@Master source]# cat /etc/fstab
/dev/hda1 /mnt/windows vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hda5 / reiserfs notail 1 1
/dev/hda6 /usr/local reiserfs notail 1 2
/dev/hda7 /mirror reiserfs notail 1 2
/dev/hda8 /home reiserfs notail 1 2
/dev/hda9 swap swap defaults 0 0
/dev/hda10 /common reiserfs notail 1 2
/dev/hdc /mnt/cdrom iso9660 noauto,nosuid,ro,umask=0,user,nodev 0 0
/dev/hdd /mnt/cdrom2 iso9660 codepage=850,iocharset=iso8859-1,noauto,nosuid,ro,umask=0,user,nodev 0 0
/dev/sda1 /mnt/disk vfat noauto,rw,user,umask=0 0 0
none /dev/pts devpts mode=0620 0 0
none /proc proc defaults 0 0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 2.6.0 kernel panic
  2003-12-30  6:42   ` Linus Torvalds
  2003-12-30  7:07     ` Murray J. Root
@ 2003-12-31  3:53     ` Isaac Claymore
  1 sibling, 0 replies; 6+ messages in thread
From: Isaac Claymore @ 2003-12-31  3:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marcelo Tosatti

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

On Mon, Dec 29, 2003 at 10:42:06PM -0800, Linus Torvalds wrote:
> 
> 
> On Mon, 29 Dec 2003, Murray J. Root wrote:
> > On Sat, Dec 27, 2003 at 09:07:59PM -0500, Murray J. Root wrote:
> > > P4 2GHz
> > > ASUS P4S533 mainboard
> > > 1G PC2700 RAM
> > > GF2 GTS video using nv driver
> > > 2.6.0 compiled with gcc 3.3.2
> > > 
> > > At boot kernel gets:
> > >    INIT: cannot execute "/etc/rc.d/rc.sysinit"
> > > then panic.
> > > 
> > > Same configuration for 2.6.0-test11 and earlier works fine.
> > > 
> > 
> > To answer myself, I did a diff between 2.6.0-test11 and 2.6.0. Found this:
> 
> Sounds like one of the partitions that has the executable script loader is
> mounted with "noexec". 
> 
> On most systems, /etc/rc.d/rc.sysinit is a bash script, and explicitly
> points to /bin/bash. Check "ldd /bin/bash", and verify that all the
> libraries (and /bin itself, of course) are mounted on executable
> filesystems.
> 
> That would be a bug that 2.6.0 uncovers. 

I've noticed that 2.4.23 lacks this additional check, and included a
patch against it.

Marcelo, does this trivial stuff look good enough to be applied?


-Isaac

> 
> 		Linus
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 

Regards, Isaac
()  ascii ribbon campaign - against html e-mail
/\                        - against microsoft attachments

[-- Attachment #2: mmap.do_mmap_pgoff.diff --]
[-- Type: text/plain, Size: 670 bytes --]

--- mmap.c	2003-12-05 09:39:09.000000000 +0800
+++ mmap.c.execproto	2003-12-31 11:25:12.000000000 +0800
@@ -17,6 +17,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
+#include <linux/mount.h>
 
 /*
  * WARNING: the debugging will use recursive algorithms so never enable this
@@ -400,8 +401,13 @@ unsigned long do_mmap_pgoff(struct file 
 	int error;
 	rb_node_t ** rb_link, * rb_parent;
 
-	if (file && (!file->f_op || !file->f_op->mmap))
-		return -ENODEV;
+	if (file) {
+		if (!file->f_op || !file->f_op->mmap)
+			return -ENODEV;
+
+		if ((prot & PROT_EXEC) && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC))
+			return -EPERM;
+	}
 
 	if (!len)
 		return addr;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-12-31  3:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-28  2:07 2.6.0 kernel panic Murray J. Root
2003-12-28 10:58 ` Han Boetes
2003-12-30  3:30 ` Murray J. Root
2003-12-30  6:42   ` Linus Torvalds
2003-12-30  7:07     ` Murray J. Root
2003-12-31  3:53     ` Isaac Claymore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox