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]
Date:	Thu, 12 Mar 2009 18:45:00 +0100
From:	Paul Bolle <pebolle@...cali.nl>
To:	hpa@...or.com
Cc:	linux-tip-commits@...r.kernel.org, mingo@...hat.com,
	linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: Re: [tip:x86/setup] x86: remove zImage support

On Wed, 2009-03-11 at 18:06 +0000, H. Peter Anvin wrote:
>  arch/x86/boot/Makefile      |   23 +++++++--------------
>  arch/x86/boot/header.S      |   29 ++++++++-------------------
>  arch/x86/boot/pm.c          |   44 -------------------------------------------
>  arch/x86/boot/tools/build.c |    9 +-------
>  arch/x86/include/asm/boot.h |    4 ---
>  5 files changed, 18 insertions(+), 91 deletions(-)

Shouldn't the zImage target (and therefore the compressed, zlilo, and
zdisk targets) also be dropped from arch/x86/Makefile?

> diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
> index c70eff6..57a29fe 100644
> --- a/arch/x86/boot/Makefile
> +++ b/arch/x86/boot/Makefile
> @@ -6,26 +6,23 @@
>  # for more details.
>  #
>  # Copyright (C) 1994 by Linus Torvalds
> +# Changed by many, many contributors over the years.
>  #
>  
>  # ROOT_DEV specifies the default root-device when making the image.
>  # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
>  # the default of FLOPPY is used by 'build'.
>  
> -ROOT_DEV := CURRENT
> +ROOT_DEV	:= CURRENT
>  
>  # If you want to preset the SVGA mode, uncomment the next line and
>  # set SVGA_MODE to whatever number you want.
>  # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
>  # The number is the same as you would ordinarily press at bootup.
>  
> -SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
> +SVGA_MODE	:= -DSVGA_MODE=NORMAL_VGA
>  
> -# If you want the RAM disk device, define this to be the size in blocks.
> -
> -#RAMDISK := -DRAMDISK=512
> -
> -targets		:= vmlinux.bin setup.bin setup.elf zImage bzImage
> +targets		:= vmlinux.bin setup.bin setup.elf bzImage
>  subdir-		:= compressed
>  
>  setup-y		+= a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
> @@ -71,17 +68,13 @@ KBUILD_CFLAGS	:= $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
>  KBUILD_CFLAGS +=   $(call cc-option,-m32)
>  KBUILD_AFLAGS	:= $(KBUILD_CFLAGS) -D__ASSEMBLY__
>  
> -$(obj)/zImage:  asflags-y := $(SVGA_MODE) $(RAMDISK)
> -$(obj)/bzImage: ccflags-y := -D__BIG_KERNEL__
> -$(obj)/bzImage: asflags-y := $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
> -$(obj)/bzImage: BUILDFLAGS   := -b
> +$(obj)/bzImage: asflags-y  := $(SVGA_MODE)
>  
>  quiet_cmd_image = BUILD   $@
> -cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/setup.bin \
> -	    $(obj)/vmlinux.bin $(ROOT_DEV) > $@
> +cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \
> +	$(ROOT_DEV) > $@
>  
> -$(obj)/zImage $(obj)/bzImage: $(obj)/setup.bin \
> -			      $(obj)/vmlinux.bin $(obj)/tools/build FORCE
> +$(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE
>  	$(call if_changed,image)
>  	@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'

Should the zlilo and zdisk targets be renamed to bzlilo and bzdisk in
this file?
 
> diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c
> index 44dc192..ee3a4ea 100644
> --- a/arch/x86/boot/tools/build.c
> +++ b/arch/x86/boot/tools/build.c
> @@ -130,7 +130,7 @@ static void die(const char * str, ...)
>  
>  static void usage(void)
>  {
> -	die("Usage: build [-b] setup system [rootdev] [> image]");
> +	die("Usage: build setup system [rootdev] [> image]");
>  }
>  
>  int main(int argc, char ** argv)
> @@ -145,11 +145,6 @@ int main(int argc, char ** argv)
>  	void *kernel;
>  	u32 crc = 0xffffffffUL;
>  
> -	if (argc > 2 && !strcmp(argv[1], "-b"))
> -	  {
> -	    is_big_kernel = 1;
> -	    argc--, argv++;
> -	  }
>  	if ((argc < 3) || (argc > 4))
>  		usage();
>  	if (argc > 3) {
> @@ -216,8 +211,6 @@ int main(int argc, char ** argv)
>  		die("Unable to mmap '%s': %m", argv[2]);
>  	/* Number of 16-byte paragraphs, including space for a 4-byte CRC */
>  	sys_size = (sz + 15 + 4) / 16;
> -	if (!is_big_kernel && sys_size > DEF_SYSSIZE)
> -		die("System is too big. Try using bzImage or modules.");
>  
>  	/* Patch the setup code with the appropriate size parameters */
>  	buf[0x1f1] = setup_sectors-1;

is_big_kernel now is unused. It can be dropped entirely, can't it?


Paul Bolle

--
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