lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19773.26066.137666.718852@pilspetsen.it.uu.se>
Date:	Mon, 24 Jan 2011 12:43:14 +0100
From:	Mikael Pettersson <mikpe@...uu.se>
To:	Américo Wang <xiyou.wangcong@...il.com>
Cc:	Harald Dunkel <harri@...ics.de>, linux-kernel@...r.kernel.org,
	linux-kbuild@...r.kenrel.org
Subject: Re: [Patch] make installkernel configurable from command line (was Re:
 how to avoid that install.sh goes mad, if I am not root?)

=?utf-8?Q?Am=C3=A9rico?= Wang writes:
 > On Fri, Jan 21, 2011 at 11:08:10PM +0100, Harald Dunkel wrote:
 > >-----BEGIN PGP SIGNED MESSAGE-----
 > >Hash: SHA1
 > >
 > >On 01/21/11 13:49, WANG Cong wrote:
 > >> On Thu, 20 Jan 2011 22:47:56 +0100, Mikael Pettersson wrote:
 > >>>
 > >>> First, at least on x86, the kernel will look for the 'installkernel'
 > >>> executable first in your own ~/bin/, so if you have that then it will
 > >>> override /sbin/installkernel.
 > >>>
 > >> 
 > >> That still doesn't look like a good solution.
 > >> 
 > >
 > >Same for me.
 > >
 > >Obviously running /sbin/installkernel is not reasonable for
 > >UID != 0 (or if $FAKEROOTKEY is set), so I would suggest to
 > >skip /sbin/installkernel and the default Lilo setup in
 > >install.sh for this case.
 > >
 > 
 > Will the patch below work for you?
 > 
 > With this patch, you should be able to specify your own installkernel
 > by "make INSTALLKERNEL=/your/installkernel install".
 > 
 > Signed-off-by: WANG Cong <xiyou.wangcong@...il.com>
 > 
 > ---
 > diff --git a/Makefile b/Makefile
 > index 1f47495..44abded 100644
 > --- a/Makefile
 > +++ b/Makefile
 > @@ -327,7 +327,7 @@ OBJCOPY		= $(CROSS_COMPILE)objcopy
 >  OBJDUMP		= $(CROSS_COMPILE)objdump
 >  AWK		= awk
 >  GENKSYMS	= scripts/genksyms/genksyms
 > -INSTALLKERNEL  := installkernel
 > +INSTALLKERNEL  ?= /sbin/installkernel
 >  DEPMOD		= /sbin/depmod
 >  KALLSYMS	= scripts/kallsyms
 >  PERL		= perl
 > diff --git a/arch/x86/boot/install.sh b/arch/x86/boot/install.sh
 > index d13ec1c..c41f2b8 100644
 > --- a/arch/x86/boot/install.sh
 > +++ b/arch/x86/boot/install.sh
 > @@ -33,8 +33,7 @@ verify "$3"
 >  
 >  # User may have a custom install script
 >  
 > -if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
 > -if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 > +if [ -x "${INSTALLKERNEL}" ]; then exec "${INSTALLKERNEL}" "$@"; fi

NAK -- this breaks existing setups which rely on /root/bin/installkernel
being picked up automatically.

Can you handle 'make INSTALLKERNEL=...' without breaking that please?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ