Add compat.linux.emul_path, so it can be set to something other
than "/compat/linux". Useful when you have several compat directories with different Linux versions and you don't want to clash with files installed by linux-c7 packages. Reviewed by: bcr (manpages) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D22574
This commit is contained in:
parent
83b75bb3cc
commit
b5f20658ee
@ -24,7 +24,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd November 13, 2019
|
||||
.Dd December 16, 2019
|
||||
.Dt LINUX 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -95,6 +95,10 @@ variables and
|
||||
.Xr loader 8
|
||||
tunables:
|
||||
.Bl -tag -width indent
|
||||
.It Va compat.linux.emul_path
|
||||
Path to the Linux run-time environment.
|
||||
Defaults to
|
||||
.Pa /compat/linux .
|
||||
.It Va compat.linux.osname
|
||||
Linux kernel operating system name.
|
||||
.It Va compat.linux.osrelease
|
||||
|
@ -836,7 +836,7 @@ static Elf64_Brandinfo linux_glibc2brand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_X86_64,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib64/ld-linux-x86-64.so.2",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
@ -848,7 +848,7 @@ static Elf64_Brandinfo linux_glibc2brandshort = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_X86_64,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib64/ld-linux.so.2",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
@ -860,7 +860,7 @@ static Elf64_Brandinfo linux_muslbrand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_X86_64,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib/ld-musl-x86_64.so.1",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
@ -992,7 +992,7 @@ static Elf32_Brandinfo linux_brand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib/ld-linux.so.1",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
@ -1004,7 +1004,7 @@ static Elf32_Brandinfo linux_glibc2brand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib/ld-linux.so.2",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
@ -1016,7 +1016,7 @@ static Elf32_Brandinfo linux_muslbrand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib/ld-musl-i386.so.1",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <compat/linux/linux_ioctl.h>
|
||||
#include <compat/linux/linux_mib.h>
|
||||
#include <compat/linux/linux_misc.h>
|
||||
#include <compat/linux/linux_util.h>
|
||||
#include <compat/linux/linux_vdso.h>
|
||||
|
||||
MODULE_VERSION(linux64elf, 1);
|
||||
@ -494,7 +495,7 @@ static Elf64_Brandinfo linux_glibc2brand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_AARCH64,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib64/ld-linux-x86-64.so.2",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
@ -46,11 +46,13 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sdt.h>
|
||||
#include <sys/syscallsubr.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <machine/stdarg.h>
|
||||
|
||||
#include <compat/linux/linux_mib.h>
|
||||
#include <compat/linux/linux_util.h>
|
||||
|
||||
MALLOC_DEFINE(M_LINUX, "linux", "Linux mode structures");
|
||||
@ -58,7 +60,11 @@ MALLOC_DEFINE(M_EPOLL, "lepoll", "Linux events structures");
|
||||
MALLOC_DEFINE(M_FUTEX, "futex", "Linux futexes");
|
||||
MALLOC_DEFINE(M_FUTEX_WP, "futex wp", "Linux futex waiting proc");
|
||||
|
||||
const char linux_emul_path[] = "/compat/linux";
|
||||
char linux_emul_path[MAXPATHLEN] = "/compat/linux";
|
||||
|
||||
SYSCTL_STRING(_compat_linux, OID_AUTO, emul_path, CTLFLAG_RWTUN,
|
||||
linux_emul_path, sizeof(linux_emul_path),
|
||||
"Linux runtime environment path");
|
||||
|
||||
/*
|
||||
* Search an alternate path before passing pathname arguments on to
|
||||
|
@ -50,7 +50,7 @@ MALLOC_DECLARE(M_EPOLL);
|
||||
MALLOC_DECLARE(M_FUTEX);
|
||||
MALLOC_DECLARE(M_FUTEX_WP);
|
||||
|
||||
extern const char linux_emul_path[];
|
||||
extern char linux_emul_path[];
|
||||
|
||||
int linux_emul_convpath(struct thread *, const char *, enum uio_seg, char **, int, int);
|
||||
|
||||
|
@ -974,7 +974,7 @@ static Elf32_Brandinfo linux_brand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib/ld-linux.so.1",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
@ -986,7 +986,7 @@ static Elf32_Brandinfo linux_glibc2brand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib/ld-linux.so.2",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
@ -998,7 +998,7 @@ static Elf32_Brandinfo linux_muslbrand = {
|
||||
.brand = ELFOSABI_LINUX,
|
||||
.machine = EM_386,
|
||||
.compat_3_brand = "Linux",
|
||||
.emul_path = "/compat/linux",
|
||||
.emul_path = linux_emul_path,
|
||||
.interp_path = "/lib/ld-musl-i386.so.1",
|
||||
.sysvec = &elf_linux_sysvec,
|
||||
.interp_newpath = NULL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user