Skip to content

Commit 2849541

Browse files
committed
Auto merge of #2376 - devnexen:fbsd_procctl_amd64, r=JohnTitor
freebsd procctl amd64 special flags additions.
2 parents f01492d + 21c034a commit 2849541

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ pub const RAND_MAX: ::c_int = 0x7fff_fffd;
205205
pub const PROC_ASLR_CTL: ::c_int = 13;
206206
pub const PROC_ASLR_STATUS: ::c_int = 14;
207207

208+
pub const PROC_PROCCTL_MD_MIN: ::c_int = 0x10000000;
209+
208210
pub const SO_DOMAIN: ::c_int = 0x1019;
209211

210212
pub const EINTEGRITY: ::c_int = 97;
@@ -244,3 +246,10 @@ cfg_if! {
244246
pub use self::b64::*;
245247
}
246248
}
249+
250+
cfg_if! {
251+
if #[cfg(target_arch = "x86_64")] {
252+
mod x86_64;
253+
pub use self::x86_64::*;
254+
}
255+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub const PROC_KPTI_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN;
2+
pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: ::c_int = 1;
3+
pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: ::c_int = 2;
4+
pub const PROC_KPTI_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 1;
5+
pub const PROC_KPTI_STATUS_ACTIVE: ::c_int = 0x80000000;

src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ pub const PROC_ASLR_CTL: ::c_int = 13;
223223
pub const PROC_ASLR_STATUS: ::c_int = 14;
224224
pub const PROC_PROTMAX_CTL: ::c_int = 15;
225225
pub const PROC_PROTMAX_STATUS: ::c_int = 16;
226+
pub const PROC_PROCCTL_MD_MIN: ::c_int = 0x10000000;
226227

227228
pub const LOCAL_CREDS_PERSISTENT: ::c_int = 3;
228229
pub const SCM_CREDS2: ::c_int = 0x08;
@@ -275,3 +276,10 @@ cfg_if! {
275276
pub use self::b64::*;
276277
}
277278
}
279+
280+
cfg_if! {
281+
if #[cfg(target_arch = "x86_64")] {
282+
mod x86_64;
283+
pub use self::x86_64::*;
284+
}
285+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub const PROC_KPTI_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN;
2+
pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: ::c_int = 1;
3+
pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: ::c_int = 2;
4+
pub const PROC_KPTI_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 1;
5+
pub const PROC_KPTI_STATUS_ACTIVE: ::c_int = 0x80000000;

0 commit comments

Comments
 (0)