backport ASLR and PIE support to FreeBSD 10-STABLE

based on my previous work + lattera's extension:

upstream git-id: 401a161083850a9a4ce916f37520c084cff1543b

 Changes to be committed:
	modified:   bin/sh/Makefile
	modified:   libexec/getty/Makefile
	modified:   libexec/rtld-elf/rtld.c
	modified:   sbin/dhclient/Makefile
	modified:   sbin/hastd/Makefile
	modified:   sbin/natd/Makefile
	modified:   sbin/nfsiod/Makefile
	modified:   sbin/rtsol/Makefile
	modified:   secure/usr.sbin/sshd/Makefile
	modified:   share/mk/bsd.own.mk
	modified:   share/mk/bsd.prog.mk
	new file:   sys/amd64/conf/OP-ASLR
	modified:   sys/amd64/include/vmparam.h
	modified:   sys/compat/freebsd32/freebsd32_misc.c
	modified:   sys/conf/files
	modified:   sys/conf/options
	modified:   sys/kern/imgact_elf.c
	modified:   sys/kern/kern_exec.c
	modified:   sys/kern/kern_jail.c
	new file:   sys/kern/kern_pax.c
	modified:   sys/sys/jail.h
	new file:   sys/sys/pax.h
	modified:   sys/vm/vm_map.c
	modified:   sys/vm/vm_map.h
	modified:   sys/vm/vm_mmap.c
	new file:   tools/build/options/WITH_PIE
	modified:   usr.sbin/apmd/Makefile
	modified:   usr.sbin/auditd/Makefile
	modified:   usr.sbin/auditdistd/Makefile
	modified:   usr.sbin/bsnmpd/bsnmpd/Makefile
	modified:   usr.sbin/ctld/Makefile
	modified:   usr.sbin/daemon/Makefile
	modified:   usr.sbin/iscsid/Makefile
	modified:   usr.sbin/jail/Makefile
	modified:   usr.sbin/jexec/Makefile
	modified:   usr.sbin/mountd/Makefile
	modified:   usr.sbin/moused/Makefile
	modified:   usr.sbin/nfsd/Makefile
	modified:   usr.sbin/nfsuserd/Makefile
	modified:   usr.sbin/powerd/Makefile
	modified:   usr.sbin/rpc.lockd/Makefile
	modified:   usr.sbin/rpc.statd/Makefile
	modified:   usr.sbin/rpc.yppasswdd/Makefile
	modified:   usr.sbin/rpc.ypupdated/Makefile
	modified:   usr.sbin/rpc.ypxfrd/Makefile
	modified:   usr.sbin/rpcbind/Makefile
	modified:   usr.sbin/syslogd/Makefile
	modified:   usr.sbin/tcpdump/tcpdump/Makefile
	modified:   usr.sbin/watchdogd/Makefile

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PaX ASLR: fixed tunables in kern_pax.c

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: remove dirty hack to determine which pax_init should use

probably this fixed some issue with linuxulator on amd64

bump __FreeBSD_version to 1000706

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>

Conflicts:
	sys/sys/param.h
PAX ASLR: updated debug messages

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: removed unused variable

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PaX ASLR: added more debug messages

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: fix debug messages, added new line

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: use the right sysent, before this commit called wrong sv_pax_aslr_init

this fixed some compat issues with COMPAT_FREEBSD32 and linuxulator

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: eliminate Shawn's do {} while hack imgact_elf.c

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: PoC - fix freebsd32 and linuxulator

NOT-TESTED, only a Proof of Concept

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: fix typo in vmspace

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: change CTLFLAG_RW|CTLFLAG_TUN to CTLFLAGS_RWTUN

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: change hard-coded function names in debug messages

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: Fix a bug regarding ASLR sysctl knobs
PAX ASLR: when CTLFLAGS_RWTUN exist, then CTLFLAG_RW not needed

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: provide the same logic as normal sysctls in compat case

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR:  Fix a bug regarding ASLR sysctl knobs - part 2.

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: typo fix

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: apply style(9) part 1.

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: added vm == NULL check to _pax_aslr_init{,32} functions

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>