Skip to content

Commit

Permalink
HBSD: added HardenedBSD_version
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Pinter <[email protected]>
  • Loading branch information
Oliver Pinter committed Nov 12, 2014
1 parent 86c15d0 commit 42be93b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sys/kern/kern_pax.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ __FBSDID("$FreeBSD$");
SYSCTL_NODE(_hardening, OID_AUTO, pax, CTLFLAG_RD, 0,
"PaX (exploit mitigation) features.");

static const int HardenedBSD_version = __HardenedBSD_version;
SYSCTL_INT(_hardening, OID_AUTO, version, CTLFLAG_RD|CTLFLAG_CAPRD,
&HardenedBSD_version, 0, "HardenedBSD version");

const char *pax_status_str[] = {
[PAX_FEATURE_DISABLED] = "disabled",
[PAX_FEATURE_OPTIN] = "opt-in",
Expand Down
2 changes: 2 additions & 0 deletions sys/sys/pax.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#ifndef __SYS_PAX_H
#define __SYS_PAX_H

#define __HardenedBSD_version 1

#if defined(_KERNEL) || defined(_WANT_PRISON)
struct hardening_features {
int hr_pax_aslr_status; /* (p) PaX ASLR enabled */
Expand Down

0 comments on commit 42be93b

Please sign in to comment.