Provide storage for the process feature control flags in struct proc.
The flags are cleared on exec, it is up to the image activator to set them. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
This commit is contained in:
parent
fee65dfc37
commit
f5cf758998
@ -488,6 +488,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p)
|
||||
goto exec_fail_dealloc;
|
||||
|
||||
imgp->proc->p_osrel = 0;
|
||||
imgp->proc->p_fctl0 = 0;
|
||||
|
||||
/*
|
||||
* Implement image setuid/setgid.
|
||||
|
@ -92,9 +92,9 @@ _Static_assert(offsetof(struct proc, p_pid) == 0xbc,
|
||||
"struct proc KBI p_pid");
|
||||
_Static_assert(offsetof(struct proc, p_filemon) == 0x3d0,
|
||||
"struct proc KBI p_filemon");
|
||||
_Static_assert(offsetof(struct proc, p_comm) == 0x3e4,
|
||||
_Static_assert(offsetof(struct proc, p_comm) == 0x3e8,
|
||||
"struct proc KBI p_comm");
|
||||
_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8,
|
||||
_Static_assert(offsetof(struct proc, p_emuldata) == 0x4c0,
|
||||
"struct proc KBI p_emuldata");
|
||||
#endif
|
||||
#ifdef __i386__
|
||||
@ -112,9 +112,9 @@ _Static_assert(offsetof(struct proc, p_pid) == 0x74,
|
||||
"struct proc KBI p_pid");
|
||||
_Static_assert(offsetof(struct proc, p_filemon) == 0x27c,
|
||||
"struct proc KBI p_filemon");
|
||||
_Static_assert(offsetof(struct proc, p_comm) == 0x28c,
|
||||
_Static_assert(offsetof(struct proc, p_comm) == 0x290,
|
||||
"struct proc KBI p_comm");
|
||||
_Static_assert(offsetof(struct proc, p_emuldata) == 0x318,
|
||||
_Static_assert(offsetof(struct proc, p_emuldata) == 0x31c,
|
||||
"struct proc KBI p_emuldata");
|
||||
#endif
|
||||
|
||||
|
@ -642,6 +642,7 @@ struct proc {
|
||||
u_int p_magic; /* (b) Magic number. */
|
||||
int p_osrel; /* (x) osreldate for the
|
||||
binary (from ELF note, if any) */
|
||||
uint32_t p_fctl0; /* (x) ABI feature control, ELF note */
|
||||
char p_comm[MAXCOMLEN + 1]; /* (x) Process name. */
|
||||
struct sysentvec *p_sysent; /* (b) Syscall dispatch info. */
|
||||
struct pargs *p_args; /* (c) Process arguments. */
|
||||
|
Loading…
Reference in New Issue
Block a user