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:	Sun, 17 Dec 2006 10:27:41 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	"Robert P. J. Day" <rpjday@...dspring.com>
Cc:	Tim Schmielau <tim@...sik3.uni-rostock.de>,
	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	Stefan Richter <stefanr@...6.in-berlin.de>,
	Zach Brown <zach.brown@...cle.com>,
	Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: lots of code could be simplified by using ARRAY_SIZE()

On Sun, 17 Dec 2006 13:13:59 -0500 (EST) Robert P. J. Day wrote:

> 
>   so here's the end result of my experiment to replace unnecessary
> code snippets with an invocation of the ARRAY_SIZE() macro from
> include/linux/kernel.h.  i've attached the script that i ran on the
> entire tree, then (after adding al viro's connector patch), did:
> 
>   $ make allyesconfig	# for the stress factor
>   $ make
> 
> to see what would happen.
> 
>   amazingly, the compile worked all the way down to:
> 
>   AS      arch/i386/boot/bootsect.o
>   LD      arch/i386/boot/bootsect
>   AS      arch/i386/boot/setup.o
>   LD      arch/i386/boot/setup
>   AS      arch/i386/boot/compressed/head.o
>   CC      arch/i386/boot/compressed/misc.o
>   OBJCOPY arch/i386/boot/compressed/vmlinux.bin
>   HOSTCC  arch/i386/boot/compressed/relocs
> arch/i386/boot/compressed/relocs.c: In function 'sym_type':
> arch/i386/boot/compressed/relocs.c:72: warning: implicit declaration of function 'ARRAY_SIZE'

That's a userspace program and shouldn't use kernel.h.

> /tmp/ccRTpFxM.o: In function `main':
> relocs.c:(.text+0xb13): undefined reference to `ARRAY_SIZE'
> relocs.c:(.text+0xddb): undefined reference to `ARRAY_SIZE'
> relocs.c:(.text+0xe10): undefined reference to `ARRAY_SIZE'
> relocs.c:(.text+0xe2b): undefined reference to `ARRAY_SIZE'
> collect2: ld returned 1 exit status
> make[2]: *** [arch/i386/boot/compressed/relocs] Error 1
> make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
> make: *** [bzImage] Error 2

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