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:	Tue, 25 Sep 2007 21:00:36 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	Christoph Hellwig <hch@...radead.org>,
	Randy Dunlap <randy.dunlap@...cle.com>
Subject: Re: [patch 3/5] Add samples subdir

Hi Mathieu & Randy.

On Tue, Sep 25, 2007 at 08:11:48AM -0400, Mathieu Desnoyers wrote:
> From: Randy Dunlap <randy.dunlap@...cle.com>
> 
> Begin infrastructure for kernel code samples in the samples/ directory.
> Add its Kconfig and Kbuild files.
> Source its Kconfig file in all arch/ Kconfigs.

Sorry for not commenting on this before...
The samples directory contains sample code so it is wrong to actually
include it as part of the kernel IMHO.
We only want to keep the samples buildable and to do so
we can make a much simpler hack in the top-level Makefile.
Consider following patch:

@@ -760,6 +760,9 @@ vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) vmlinux.o
 ifdef CONFIG_HEADERS_CHECK
        $(Q)$(MAKE) -f $(srctree)/Makefile headers_check
 endif
+ifdef CONFIG_SAMPLES
+       $(Q)$(MAKE) $(build)=samples
+endif
        $(call vmlinux-modpost)
        $(call if_changed_rule,vmlinux__)
        $(Q)rm -f .old_version


With this we build the samples when CONFIG_SAMPLES are selected and
when the kernel is about to be linked.


As for the Kconfig file I am in favour of it but think a much more
natural place is to source it in lib/Kconfig.debug.
Then it will appear in "Kernel hacking" and the smaples
are used for kernel hacking and not for regular people
building their own kernel.

Sourcing samples/Kconfig from lib/Kconfig.debug will then
take effect for all archs so the result is a much simpler
Kconfig patch too.

	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