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: <20060918062152.GA7088@uranus.ravnborg.org>
Date:	Mon, 18 Sep 2006 08:21:52 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	David Woodhouse <dwmw2@...radead.org>, linux-arch@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 1/8] extend make headers_check to detect more problems

> --- linux-cg.orig/scripts/hdrcheck.sh	2006-09-18 02:04:44.000000000 +0200
> +++ linux-cg/scripts/hdrcheck.sh	2006-09-18 02:04:45.000000000 +0200
> @@ -1,8 +1,28 @@
>  #!/bin/sh
>  
> +# check if all included files exist
>  for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do
>      if [ ! -r $1/$FILE ]; then
>  	echo $2 requires $FILE, which does not exist in exported headers
>  	exit 1
>      fi
>  done
> +
> +# try to compile in order to see CC warnings, show only the first few
> +CHECK_CFLAGS=`grep @headercheck: $2 | sed -e 's/^.*@...dercheck:\([^@]*\)@.*$/\1/'`

The purpose of @headercheck: should be documented sonewhere.
A simple way to do so would be to paste the content of the changelog that
describe it in the top of this file.

> +CFLAGS="-Wall -std=gnu99 -xc -O2 -I$1 ${CHECK_CFLAGS}"
> +tmpfile=`mktemp`
Can't we do this with a hdrchk$$$ filename to avoid using
random entropy for each compile?

> +${CC:-gcc} ${CFLAGS} -c $2 -o $tmpfile 2>&1 | sed -e "s:$1:include:g" >&2
> +
> +# check if object file is empty
> +if [ "`nm $tmpfile`" ] ; then
Replace nm with {NM:-nm} to obtain correct NM when cross compiling.

> +    echo include${2#$1}: warning: non-empty output >&2
Paste output of nm so one can see what is defined?

	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