mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-24 03:37:16 +00:00
sysentvec: Retire sv_imgact_try as unneeded anymore
The sysentvec sv_imgact_try was used by kern_exec() to allow non-native ABI to fixup shell path according to ABI root directory. Since the non-native ABI can now specify its root directory directly to namei() via pwd_altroot() call this facility is not needed anymore. Differential Revision: https://reviews.freebsd.org/D40092 MFC after: 2 month
This commit is contained in:
parent
57578deac7
commit
d706d02edb
|
@ -69,7 +69,6 @@ struct sysentvec elf64_freebsd_sysvec_la48 = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = VM_MAXUSER_ADDRESS_LA48,
|
||||
|
@ -112,7 +111,6 @@ struct sysentvec elf64_freebsd_sysvec_la57 = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = VM_MAXUSER_ADDRESS_LA57,
|
||||
|
|
|
@ -75,7 +75,6 @@ struct sysentvec elf32_freebsd_sysvec = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = VM_MAXUSER_ADDRESS,
|
||||
|
|
|
@ -94,7 +94,6 @@ static struct sysentvec elf32_freebsd_sysvec = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = elf32_prepare_notes,
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = FREEBSD32_MINUSER,
|
||||
.sv_maxuser = FREEBSD32_MAXUSER,
|
||||
|
|
|
@ -73,7 +73,6 @@ static struct sysentvec elf64_freebsd_sysvec = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = VM_MAXUSER_ADDRESS,
|
||||
|
|
|
@ -116,7 +116,6 @@ struct sysentvec ia32_freebsd_sysvec = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = elf32_prepare_notes,
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = FREEBSD32_MINUSER,
|
||||
.sv_maxuser = FREEBSD32_MAXUSER,
|
||||
|
|
|
@ -64,7 +64,6 @@ struct sysentvec elf32_freebsd_sysvec = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = VM_MAXUSER_ADDRESS,
|
||||
|
|
|
@ -82,7 +82,6 @@ struct sysentvec aout_sysvec = {
|
|||
.sv_szsigcode = &szsigcode,
|
||||
.sv_name = "FreeBSD a.out",
|
||||
.sv_coredump = NULL,
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = AOUT32_USRSTACK,
|
||||
|
@ -132,7 +131,6 @@ struct sysentvec aout_sysvec = {
|
|||
.sv_szsigcode = &aout_szsigcode,
|
||||
.sv_name = "FreeBSD a.out",
|
||||
.sv_coredump = NULL,
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = AOUT32_MINUSER,
|
||||
.sv_maxuser = AOUT32_USRSTACK,
|
||||
|
|
|
@ -424,7 +424,6 @@ struct sysentvec null_sysvec = {
|
|||
.sv_szsigcode = NULL,
|
||||
.sv_name = "null",
|
||||
.sv_coredump = NULL,
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = 0,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = VM_MAXUSER_ADDRESS,
|
||||
|
|
|
@ -390,7 +390,6 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p,
|
|||
uintptr_t stack_base;
|
||||
struct image_params image_params, *imgp;
|
||||
struct vattr attr;
|
||||
int (*img_first)(struct image_params *);
|
||||
struct pargs *oldargs = NULL, *newargs = NULL;
|
||||
struct sigacts *oldsigacts = NULL, *newsigacts = NULL;
|
||||
#ifdef KTRACE
|
||||
|
@ -644,25 +643,15 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p,
|
|||
}
|
||||
/* The new credentials are installed into the process later. */
|
||||
|
||||
/*
|
||||
* If the current process has a special image activator it
|
||||
* wants to try first, call it. For example, emulating shell
|
||||
* scripts differently.
|
||||
*/
|
||||
error = -1;
|
||||
if ((img_first = imgp->proc->p_sysent->sv_imgact_try) != NULL)
|
||||
error = img_first(imgp);
|
||||
|
||||
/*
|
||||
* Loop through the list of image activators, calling each one.
|
||||
* An activator returns -1 if there is no match, 0 on success,
|
||||
* and an error otherwise.
|
||||
*/
|
||||
error = -1;
|
||||
for (i = 0; error == -1 && execsw[i]; ++i) {
|
||||
if (execsw[i]->ex_imgact == NULL ||
|
||||
execsw[i]->ex_imgact == img_first) {
|
||||
if (execsw[i]->ex_imgact == NULL)
|
||||
continue;
|
||||
}
|
||||
error = (*execsw[i]->ex_imgact)(imgp);
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ struct sysentvec elf32_freebsd_sysvec = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_stackprot = VM_PROT_ALL,
|
||||
|
|
|
@ -75,7 +75,6 @@ struct sysentvec elf64_freebsd_sysvec_v1 = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = VM_MAXUSER_ADDRESS,
|
||||
|
@ -118,7 +117,6 @@ struct sysentvec elf64_freebsd_sysvec_v2 = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = VM_MAXUSER_ADDRESS,
|
||||
|
|
|
@ -75,7 +75,6 @@ static struct sysentvec elf64_freebsd_sysvec = {
|
|||
.sv_elf_core_osabi = ELFOSABI_FREEBSD,
|
||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
|
||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes),
|
||||
.sv_imgact_try = NULL,
|
||||
.sv_minsigstksz = MINSIGSTKSZ,
|
||||
.sv_minuser = VM_MIN_ADDRESS,
|
||||
.sv_maxuser = 0, /* Filled in during boot. */
|
||||
|
|
|
@ -117,7 +117,6 @@ struct sysentvec {
|
|||
const char *sv_elf_core_abi_vendor;
|
||||
void (*sv_elf_core_prepare_notes)(struct thread *,
|
||||
struct note_info_list *, size_t *);
|
||||
int (*sv_imgact_try)(struct image_params *);
|
||||
int (*sv_copyout_auxargs)(struct image_params *,
|
||||
uintptr_t);
|
||||
int sv_minsigstksz; /* minimum signal stack size */
|
||||
|
|
Loading…
Reference in a new issue