aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/linux
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2023-05-29 08:16:46 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2023-05-29 08:16:46 +0000
commitfd745e1db6b561900b8e5e9caa4ed05cf15398b3 (patch)
tree70a8872a57c71fc4bbf7818c5c5c51db03d2c836 /sys/i386/linux
parent3d2fec7db856c67e1a94a87a846d8ffe6f48b61f (diff)
linux(4): Use pwd_altroot() to tell namei() about ABI root path
PR: 72920 Differential Revision: https://reviews.freebsd.org/D40090 MFC after: 2 month
Diffstat (limited to 'sys/i386/linux')
-rw-r--r--sys/i386/linux/linux_machdep.c15
-rw-r--r--sys/i386/linux/linux_sysvec.c7
2 files changed, 4 insertions, 18 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index d86cbdb4d816..92b37646d28d 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -715,7 +715,6 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
vm_offset_t vmaddr;
unsigned long file_offset;
unsigned long bss_size;
- char *library;
ssize_t aresid;
int error;
bool locked, opened, textset;
@@ -726,17 +725,9 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args)
textset = false;
opened = false;
- if (!LUSECONVPATH(td)) {
- NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1,
- UIO_USERSPACE, args->library);
- error = namei(&ni);
- } else {
- LCONVPATHEXIST(args->library, &library);
- NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1,
- UIO_SYSSPACE, library);
- error = namei(&ni);
- LFREEPATH(library);
- }
+ NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1,
+ UIO_USERSPACE, args->library);
+ error = namei(&ni);
if (error)
goto cleanup;
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 55b20200cadf..ab6eaa97075d 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -584,7 +584,6 @@ struct sysentvec linux_sysvec = {
.sv_szsigcode = &linux_szsigcode,
.sv_name = "Linux a.out",
.sv_coredump = NULL,
- .sv_imgact_try = linux_exec_imgact_try,
.sv_minsigstksz = LINUX_MINSIGSTKSZ,
.sv_minuser = VM_MIN_ADDRESS,
.sv_maxuser = VM_MAXUSER_ADDRESS,
@@ -626,7 +625,6 @@ struct sysentvec elf_linux_sysvec = {
.sv_elf_core_osabi = ELFOSABI_NONE,
.sv_elf_core_abi_vendor = LINUX_ABI_VENDOR,
.sv_elf_core_prepare_notes = __linuxN(prepare_notes),
- .sv_imgact_try = linux_exec_imgact_try,
.sv_minsigstksz = LINUX_MINSIGSTKSZ,
.sv_minuser = VM_MIN_ADDRESS,
.sv_maxuser = VM_MAXUSER_ADDRESS,
@@ -667,7 +665,7 @@ linux_on_exec_vmspace(struct proc *p, struct image_params *imgp)
error = linux_map_vdso(p, linux_vdso_obj,
linux_vdso_base, LINUX_VDSOPAGE_SIZE, imgp);
if (error == 0)
- linux_on_exec(p, imgp);
+ error = linux_on_exec(p, imgp);
return (error);
}
@@ -806,7 +804,6 @@ static Elf32_Brandinfo linux_brand = {
.brand = ELFOSABI_LINUX,
.machine = EM_386,
.compat_3_brand = "Linux",
- .emul_path = linux_emul_path,
.interp_path = "/lib/ld-linux.so.1",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
@@ -818,7 +815,6 @@ static Elf32_Brandinfo linux_glibc2brand = {
.brand = ELFOSABI_LINUX,
.machine = EM_386,
.compat_3_brand = "Linux",
- .emul_path = linux_emul_path,
.interp_path = "/lib/ld-linux.so.2",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,
@@ -830,7 +826,6 @@ static Elf32_Brandinfo linux_muslbrand = {
.brand = ELFOSABI_LINUX,
.machine = EM_386,
.compat_3_brand = "Linux",
- .emul_path = linux_emul_path,
.interp_path = "/lib/ld-musl-i386.so.1",
.sysvec = &elf_linux_sysvec,
.interp_newpath = NULL,