MCPcopy Create free account
hub / github.com/F-Stack/f-stack / protmax_status

Function protmax_status

freebsd/kern/kern_procctl.c:445–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445static int
446protmax_status(struct thread *td, struct proc *p, int *data)
447{
448 int d;
449
450 switch (p->p_flag2 & (P2_PROTMAX_ENABLE | P2_PROTMAX_DISABLE)) {
451 case 0:
452 d = PROC_PROTMAX_NOFORCE;
453 break;
454 case P2_PROTMAX_ENABLE:
455 d = PROC_PROTMAX_FORCE_ENABLE;
456 break;
457 case P2_PROTMAX_DISABLE:
458 d = PROC_PROTMAX_FORCE_DISABLE;
459 break;
460 }
461 if (kern_mmap_maxprot(p, PROT_READ) == PROT_READ)
462 d |= PROC_PROTMAX_ACTIVE;
463 *data = d;
464 return (0);
465}
466
467static int
468aslr_ctl(struct thread *td, struct proc *p, int state)

Callers 1

kern_procctl_singleFunction · 0.85

Calls 1

kern_mmap_maxprotFunction · 0.85

Tested by

no test coverage detected