* [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!?
@ 2006-07-27 10:11 Andreas Mohr
2006-07-27 10:17 ` Andreas Mohr
2006-07-27 14:19 ` Michael Tokarev
0 siblings, 2 replies; 6+ messages in thread
From: Andreas Mohr @ 2006-07-27 10:11 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Hello all,
for some reason a 2.6.18-rc2-mm1 build seems to kill my /dev/null device!
A simple
# make bzImage modules modules_install
managed to reduce my
crw-rw-rw- 1 root root 1, 3 27. Jul 12:04 null
into the charred remains equivalent of
-rw-r--r-- 1 root root 0 27. Jul 12:02 null
, *twice* (I tried it the first time and had that issue,
then rebuilt the device and rebooted, same problem once build started).
Any idea why this might happen?
This did not happen with a 2.6.18-rc1-mm2 build.
A simple
rm /dev/null
mknod /dev/null c 1 3
chmod 666 /dev/null
corrects the problem, BTW.
Thanks,
Andreas Mohr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!?
2006-07-27 10:11 [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!? Andreas Mohr
@ 2006-07-27 10:17 ` Andreas Mohr
2006-07-27 11:22 ` Andreas Mohr
2006-07-27 14:19 ` Michael Tokarev
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Mohr @ 2006-07-27 10:17 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Hi,
On Thu, Jul 27, 2006 at 12:11:28PM +0200, Andreas Mohr wrote:
> Hello all,
>
> for some reason a 2.6.18-rc2-mm1 build seems to kill my /dev/null device!
Replying to myself, this could easily be due to:
--- linux-2.6.18-rc2/scripts/Kbuild.include 2006-07-15 21:41:08.000000000 -
0700
+++ devel/scripts/Kbuild.include 2006-07-27 01:15:54.000000000 -0700
@@ -8,9 +8,13 @@ empty :=
space := $(empty) $(empty)
###
+# Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o
+dot-target = $(dir $@).$(notdir $@)
+
+###
# The temporary file to save gcc -MD generated dependencies must not
# contain a comma
-depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
+depfile = $(subst $(comma),_,$(dot-target).d)
###
# filename of target with directory and extension stripped
@@ -59,6 +63,12 @@ as-option = $(shell if $(CC) $(CFLAGS) $
-xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
else echo "$(2)"; fi ;)
+# as-instr
+# Usage: cflags-y += $(call as-instr, instr, option1, option2)
+
+as-instr = $(shell if echo -e "$(1)" | $(AS) -Z -o /dev/null \
+ 2>&1 >/dev/null ; then echo "$(2)"; else echo "$(3)"; fi;)
+
# cc-option
# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
@@ -77,14 +87,19 @@ cc-option-align = $(subst -functions=0,,
# cc-version
# Usage gcc-ver := $(call cc-version, $(CC))
-cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
- $(if $(1), $(1), $(CC)))
+cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
# cc-ifversion
# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \
echo $(3); fi;)
+# ld-option
+# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
+ld-option = $(shell if $(CC) $(1) \
+ -nostdlib -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
+
Possibly an older binutils doesn't have a "if *output* file /dev/null,
then kill output instead of overwriting file" check builtin as IIRC newer
utils often have?
# which ld
/usr/bin/ld
# rpm -qf /usr/bin/ld
binutils-2.15.92.0.2-5
Andreas Mohr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!?
2006-07-27 10:17 ` Andreas Mohr
@ 2006-07-27 11:22 ` Andreas Mohr
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Mohr @ 2006-07-27 11:22 UTC (permalink / raw)
To: Andrew Morton; +Cc: Roland McGrath, Sam Ravnborg, linux-kernel
On Thu, Jul 27, 2006 at 12:17:09PM +0200, Andreas Mohr wrote:
> Hi,
>
> On Thu, Jul 27, 2006 at 12:11:28PM +0200, Andreas Mohr wrote:
> > Hello all,
> >
> > for some reason a 2.6.18-rc2-mm1 build seems to kill my /dev/null device!
>
> Replying to myself, this could easily be due to:
Yup, seems it is, see newly posted:
"Re: [PATCH] vDSO hash-style fix"
http://lkml.org/lkml/2006/7/27/83
| > +# ld-option
| > +# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
| > +ld-option = $(shell if $(CC) $(1) \
| > + -nostdlib -o /dev/null -xc /dev/null \
| > + > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
|
| This is not good. When I introduced something similar for lxdialog I
| received lots of reports about /dev/null becoming a regular file.
| ld does something strange with the output file when it fails.
|
| When re-done ld-option shall be accompanied by documentation in
| Documentation/makefiles.txt like cc-option.
Could we have a -mm hot-fix here?
Andreas Mohr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!?
2006-07-27 10:11 [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!? Andreas Mohr
2006-07-27 10:17 ` Andreas Mohr
@ 2006-07-27 14:19 ` Michael Tokarev
2006-07-27 14:24 ` gmu 2k6
1 sibling, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2006-07-27 14:19 UTC (permalink / raw)
To: Andreas Mohr; +Cc: Andrew Morton, linux-kernel
Andreas Mohr wrote:
> Hello all,
>
> for some reason a 2.6.18-rc2-mm1 build seems to kill my /dev/null device!
>
> A simple
> # make bzImage modules modules_install
> managed to reduce my
>
> crw-rw-rw- 1 root root 1, 3 27. Jul 12:04 null
>
> into the charred remains equivalent of
>
> -rw-r--r-- 1 root root 0 27. Jul 12:02 null
Don't build as root.
While something's broke in kernel build scripts and probably
should be fixed, it's not a reason for anyone to get their
whole filesystem rm -rf'ed.
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!?
2006-07-27 14:19 ` Michael Tokarev
@ 2006-07-27 14:24 ` gmu 2k6
2006-07-27 14:24 ` gmu 2k6
0 siblings, 1 reply; 6+ messages in thread
From: gmu 2k6 @ 2006-07-27 14:24 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Andreas Mohr, Andrew Morton, linux-kernel
On 7/27/06, Michael Tokarev <mjt@tls.msk.ru> wrote:
> Andreas Mohr wrote:
> > Hello all,
> >
> > for some reason a 2.6.18-rc2-mm1 build seems to kill my /dev/null device!
> >
> > A simple
> > # make bzImage modules modules_install
> > managed to reduce my
> >
> > crw-rw-rw- 1 root root 1, 3 27. Jul 12:04 null
> >
> > into the charred remains equivalent of
> >
> > -rw-r--r-- 1 root root 0 27. Jul 12:02 null
>
> Don't build as root.
>
> While something's broke in kernel build scripts and probably
> should be fixed, it's not a reason for anyone to get their
> whole filesystem rm -rf'ed.
and it does not matter if you're using udev:
$ ls -l /dev/null
crw-rw-rw- 1 root root 1, 3 2006-07-27 11:42 /dev/null
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!?
2006-07-27 14:24 ` gmu 2k6
@ 2006-07-27 14:24 ` gmu 2k6
0 siblings, 0 replies; 6+ messages in thread
From: gmu 2k6 @ 2006-07-27 14:24 UTC (permalink / raw)
To: Michael Tokarev; +Cc: Andreas Mohr, Andrew Morton, linux-kernel
On 7/27/06, gmu 2k6 <gmu2006@gmail.com> wrote:
> On 7/27/06, Michael Tokarev <mjt@tls.msk.ru> wrote:
> > Andreas Mohr wrote:
> > > Hello all,
> > >
> > > for some reason a 2.6.18-rc2-mm1 build seems to kill my /dev/null device!
> > >
> > > A simple
> > > # make bzImage modules modules_install
> > > managed to reduce my
> > >
> > > crw-rw-rw- 1 root root 1, 3 27. Jul 12:04 null
> > >
> > > into the charred remains equivalent of
> > >
> > > -rw-r--r-- 1 root root 0 27. Jul 12:02 null
> >
> > Don't build as root.
> >
> > While something's broke in kernel build scripts and probably
> > should be fixed, it's not a reason for anyone to get their
> > whole filesystem rm -rf'ed.
>
> and it does not matter if you're using udev:
> $ ls -l /dev/null
> crw-rw-rw- 1 root root 1, 3 2006-07-27 11:42 /dev/null
actually this is so obvious I should not have posted that reply. sorry guys.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-07-27 14:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-27 10:11 [WARNING -mm] 2.6.18-rc2-mm1 build kills /dev/null!? Andreas Mohr
2006-07-27 10:17 ` Andreas Mohr
2006-07-27 11:22 ` Andreas Mohr
2006-07-27 14:19 ` Michael Tokarev
2006-07-27 14:24 ` gmu 2k6
2006-07-27 14:24 ` gmu 2k6
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox