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] [day] [month] [year] [list]
Message-ID: <20080216112441.GA11362@uranus.ravnborg.org>
Date:	Sat, 16 Feb 2008 12:24:41 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	Rob Landley <rob@...dley.net>
Cc:	linux-kernel@...r.kernel.org, miltonm@....com, hpa@...or.com,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] Remove the new perl dependency from build.

Hi Rob.
> 
> Remove perl dependency introduced in 2.6.25-rc1, by shipping kernel/timeconst.h
> with all the "canned" values so perl is only used to regenerate it if that
> file is deleted.
While I agree that we should keep the dependencies low for building a kernel
trying to avoid the perl dependency is in the long rund a dead-end.

I have for a while considered replacing part of the kbuild gmake magic
with a perl script thus pushing towards a mandatory dependency
on perl.

A few comments on the actual patch.

> --- linux/hg/kernel/Makefile	2008-02-08 19:06:59.000000000 -0600
> +++ linux-new/kernel/Makefile	2008-02-15 19:32:08.000000000 -0600
> @@ -95,7 +95,7 @@
>  $(obj)/time.o: $(obj)/timeconst.h
>  
>  quiet_cmd_timeconst  = TIMEC   $@
> -      cmd_timeconst  = $(PERL) $< $(CONFIG_HZ) > $@
> -targets += timeconst.h
> -$(obj)/timeconst.h: $(src)/timeconst.pl FORCE
> +      cmd_timeconst  = $(PERL) $< \
> +            24 32 48 64 100 122 128 200 250 256 300 512 1000 1024 1200 > $@
> +$(obj)/timeconst.h:
>  	$(call if_changed,timeconst)

We will only build timeconst.h if the file is missing and this
is not the desired behaviour.
What could be done to make the perl dependency optional would be to
introduce a small shell wrapper.
If called with a CONFIG_HZ value that is unknow use the perl script
to generate the .h file.
For known HZ values take a copy of the shipped .h file.

The MAkefile bits would looke like this:
      cmd_timeconst  = $(CONFIG_SHELL) $< $(CONFIG_HZ)

targets += timeconst.h
$(obj)/timeconst.h: $(src)/timeconst.sh FORCE
	$(call if_changed,timeconst)

Using 'if_changed' will make sure we call the shell script
when HZ is changed.

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