HBSD: drop unused variables from hardening_features structure

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: refactor kern/kern_pax.c -> hardenedbsd/hbsd_pax_common.c

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: refactor: kern/kern_pax_aslr.c -> hardenedbsd/hbsd_pax_aslr.c

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
HBSD: refacor: kern/kern_pax_hardening.c -> hardenedbsd/hbsd_pax_hardening.c

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: refactor: kern/kern_pax_segvguard.c -> hardenedbsd/hbsd_pax_segvguard.c

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: refactor kern/kern_hardening_log.c -> hardenedbsd/hbsd_pax_log.c

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: refactor: kern/kern_ptrace_hardening.c -> hardenedbsd/hbsd_ptrace_hardening.c

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: refactor opt_ptrace_hardening.h -> opt_pax.h

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: fix fatal error in ptrace hardening

op@opn sys> git grep PTRACE_HARDENING_MODE_ROOTONLY
sys/ptrace_hardening.h:#define PTRACE_HARDENING_MODE_ROOTONLY   0x0
hardenedbsd/hbsd_ptrace_hardening.c:                    flags |=PTRACE_HARDENING_MODE_ROOTONLY;

ergo flags |= 0 ...

github-issue: #60
CC: David Carlier <david.carlier@hardenedbsd.org>
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
HBSD PTRACE: cleanup headers

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD PTRACE: whitespace fixes

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD LOG: add ; to the end of the template lines

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: paxify ptrace - log

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
HBSD: delete defined but unused ptrace_hardening_mode(...) function and related things

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Fix the following -Werror warning from clang 3.5.0, while building the
ath kernel module:

sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) {
                    ^
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: note: remove the call to '__builtin_abs' since unsigned values cannot be negative
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
1 error generated.

This warning occurs because both lp[0] and target are unsigned, so the
subtraction expression is also unsigned, and calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by:	adrian
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1212
\n at end of panicstr is redundant.

Submitted by:	alc
HBSD: fix build, corrected typo log

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: remove unused variable and bogous extern

github-issue: #60
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: paxify ptrace hardening

github-issue: #60 #62
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: make PTRACE_HARDENING_GRP compile time configurable

github-issue: #60 #62
Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>