HBSD: move pax from security under to hardening sysctl node

github-issue: #22
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
HBSD: move PaX ASLR related related sysctls under hardening

github-issue: #22
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX: rename and make pax_{sys,}init static

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX: concretize pax feature status names

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
CC: HardenedBSD Developers <dev@hardenedbsd.org>
PAX: fix build after refactor

In file included from /usr/data/source/git/opBSD/hardenedBSD.git/sys/modules/aout/../../kern/imgact_aout.c:41:
@/sys/pax.h:219:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
SYSCTL_DECL(_hardening_pax);
^~~~~~~~~~~
@/sys/pax.h:219:13: error: a parameter list without types is only allowed in a function definition
SYSCTL_DECL(_hardening_pax);
            ^

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
HBSD LOG: refactor and rename

github-issue: #22
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR/LOG/HARDENING: big SYSINIT refactor

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
CC: HardenedBSD Developers <dev@hardenedbsd.org>
PAX ASLR: rename tunables too

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
CC: HardenedBSD Developers <dev@hardenedbsd.org>
HBSD: improve map_32bit code

Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
CC: Shawn Webb <shawn.webb@hardenedbsd.org>
PAX: feed new line in sysinit

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX ASLR: added compat ASLR's SYSINIT

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
HBSD LOG: don't compile sysctls, when PAX_SYSCTLS not set, and rename tunables

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
PAX: fixed SYSINIT related build failure

--- kern_pax_aslr.o ---
/usr/data/source/git/opBSD/hardenedBSD.git/sys/kern/kern_pax_aslr.c:663:1: error: redefinition of 'pax_sys_init'
SYSINIT(pax, SI_SUB_PAX, SI_ORDER_SECOND, pax_compat_aslr_sysinit, NULL);
^
/usr/data/source/git/opBSD/hardenedBSD.git/sys/sys/kernel.h:243:2: note: expanded from macro 'SYSINIT'
        C_SYSINIT(uniquifier, subsystem, order,                 \
        ^
/usr/data/source/git/opBSD/hardenedBSD.git/sys/sys/kernel.h:234:24: note: expanded from macro 'C_SYSINIT'
        static struct sysinit uniquifier ## _sys_init = {       \
                              ^
<scratch space>:12:1: note: expanded from here
pax_sys_init
^
/usr/data/source/git/opBSD/hardenedBSD.git/sys/kern/kern_pax_aslr.c:507:1: note: previous definition is here
SYSINIT(pax, SI_SUB_PAX, SI_ORDER_SECOND, pax_aslr_sysinit, NULL);
^
/usr/data/source/git/opBSD/hardenedBSD.git/sys/sys/kernel.h:243:2: note: expanded from macro 'SYSINIT'
        C_SYSINIT(uniquifier, subsystem, order,                 \
        ^
/usr/data/source/git/opBSD/hardenedBSD.git/sys/sys/kernel.h:234:24: note: expanded from macro 'C_SYSINIT'
        static struct sysinit uniquifier ## _sys_init = {       \
                              ^
<scratch space>:2:1: note: expanded from here
pax_sys_init
^
1 error generated.
--- kern_shutdown.o ---
--- kern_sig.o ---
--- kern_pax_aslr.o ---

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
HARDENING: fixed build, it's time to sleep..

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
HBSD LOG: opt_pax.h needed

Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
Merge remote-tracking branch 'freebsd/master' into hardened/current/master
Merge remote-tracking branch 'freebsd/master' into hardened/current/master
Merge branch 'hardened/current/master' into hardened/current/ptrace
adding optional logging in the same flavor than pax_log_* ones so if the pax log calls are refactored, it won t change a thing ... plus some formal changes.
Merge branch 'hardened/current/ptrace' of http://github.com/HardenedBSD/hardenedBSD into hardened/current/ptrace

Conflicts:
	sys/kern/kern_ptrace_hardening.c