Index: stable/12/share/man/man4/linux.4 =================================================================== --- stable/12/share/man/man4/linux.4 (revision 364527) +++ stable/12/share/man/man4/linux.4 (revision 364528) @@ -1,149 +1,138 @@ .\" Copyright (c) 2000 Sheldon Hearn .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" -.Dd August 1, 2017 +.Dd November 13, 2019 .Dt LINUX 4 .Os .Sh NAME .Nm linux .Nd Linux ABI support .Sh SYNOPSIS To compile support for this ABI into an i386 kernel place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options COMPAT_LINUX" .Ed .Pp for an amd64 kernel use: .Bd -ragged -offset indent .Cd "options COMPAT_LINUX32" .Ed .Pp Alternatively, to load the ABI as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent linux_load="YES" .Ed .Sh DESCRIPTION The .Nm -module provides limited -Linux ABI (application binary interface) compatibility -for userland applications. -The module provides the following significant facilities: +module provides limited Linux ABI (application binary interface) compatibility, +making it possible to run many unmodified Linux applications and libraries +without the need for virtualization or emulation. +Some of the facilities provided are: .Bl -bullet .It An image activator for correctly branded .Xr elf 5 executable images .It Special signal handling for activated images .It Linux to native system call translation +.It +Linux-specific system calls .El .Pp -It is important to note that the Linux ABI support -it not provided through an emulator. -Rather, a true (albeit limited) ABI implementation is provided. +Note that dynamically linked Linux executables +will require a suitable environment in +.Pa /compat/linux . +This includes native Linux shared libraries, and Linux-specific virtual +filesystems. +To set it up, install the +.Pa emulators/linux_base-c7 +port or the linux_base-c7 +package, and add the following line to the +.Xr rc.conf 5 +file: .Pp -The following +.Dl linux_enable="YES" +.Pp +To avoid mounting Linux-specific filesystems at startup, also add the following +line: +.Pp +.Dl linux_mounts_enable="NO" +.Sh SYSCTL VARIABLES +The following variables are available as both .Xr sysctl 8 -tunable variables are available: -.Bl -tag -width compat.linux.oss_version -.It compat.linux.osname +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va compat.linux.osname Linux kernel operating system name. -.It compat.linux.osrelease +.It Va compat.linux.osrelease Linux kernel operating system release. Changing this to something else is discouraged on non-development systems, because it may change the way Linux programs work. Recent versions of GNU libc are known to use different syscalls depending on the value of this sysctl. -.It compat.linux.oss_version +.It Va compat.linux.oss_version Linux Open Sound System version. -.El -.Pp -The -.Nm -module can be linked into the kernel statically with the -.Dv COMPAT_LINUX -kernel configuration option -or loaded as required. -The following command will load the module -if it is neither linked into the kernel -nor already loaded as a module: -.Bd -literal -offset indent -if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then - kldload linux > /dev/null 2>&1 -fi -.Ed -.Pp -Note that dynamically linked Linux executables -will require a suitable environment in -.Pa /compat/linux . -Specifically, the Linux run-time linker's hints files -should be correctly initialized. -For this reason, it is common to execute the following commands -to prepare the system to correctly run Linux executables: -.Bd -literal -offset indent -if [ -x /compat/linux/sbin/ldconfig ]; then - /compat/linux/sbin/ldconfig -r /compat/linux -fi -.Ed -.Pp -For information on loading the -.Nm -kernel loadable module automatically on system startup, -see -.Xr rc.conf 5 . -This information applies -regardless of whether the -.Nm -module is statically linked into the kernel -or loaded as a module. .Sh FILES -.Bl -tag -width /compat/linux/dev/fd -compact +.Bl -tag -width /compat/linux/dev/shm -compact .It Pa /compat/linux minimal Linux run-time environment .It Pa /compat/linux/dev/fd -limited Linux file-descriptor file system +file-descriptor file system, see +.Xr fdescfs 5 +.It Pa /compat/linux/dev/shm +in-memory file system, see +.Xr tmpfs 5 .It Pa /compat/linux/proc -limited Linux process file system +Linux process file system, see +.Xr linprocfs 5 .It Pa /compat/linux/sys -limited Linux system file system +Linux kernel objects file system, see +.Xr linsysfs 5 .El .Sh SEE ALSO .Xr brandelf 1 , .Xr pty 4 , .Xr elf 5 , .Xr fdescfs 5 , .Xr linprocfs 5 , -.Xr linsysfs 5 +.Xr linsysfs 5 , +.Xr tmpfs 5 .Sh HISTORY Linux ABI support first appeared in .Fx 2.1 . +.Sh BUGS +Support for some of the Linux-specific system calls and system call arguments +is missing. Index: stable/12/share/man/man5/linprocfs.5 =================================================================== --- stable/12/share/man/man5/linprocfs.5 (revision 364527) +++ stable/12/share/man/man5/linprocfs.5 (revision 364528) @@ -1,98 +1,99 @@ .\" $FreeBSD$ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.Dd August 10, 1994 +.Dd November 13, 2019 .Dt LINPROCFS 5 .Os .Sh NAME .Nm linprocfs .Nd Linux process file system .Sh SYNOPSIS .Bd -literal linproc /compat/linux/proc linprocfs rw 0 0 .Ed .Sh DESCRIPTION The Linux process file system, or .Nm , emulates a subset of Linux' process file system and is required for the complete operation of some Linux binaries. .Pp The .Nm provides a two-level view of process space. At the highest level, processes themselves are named, according to their process ids in decimal, with no leading zeros. There is also a special node called .Pa self which always refers to the process making the lookup request. .Pp Each node is a directory containing several files: .Bl -tag -width status .It Pa exe A reference to the vnode from which the process text was read. This can be used to gain access to the process' symbol table, or to start another copy of the process. .It Pa mem The complete virtual memory image of the process. Only those addresses which exist in the process can be accessed. Reads and writes to this file modify the process. Writes to the text segment remain private to the process. .El .Pp Each node is owned by the process's user, and belongs to that user's primary group, except for the .Pa mem node, which belongs to the .Li kmem group. .Sh FILES .Bl -tag -width /compat/linux/proc/self/XXXXXXX -compact .It Pa /compat/linux/proc The normal mount point for the .Nm . .It Pa /compat/linux/proc/cpuinfo CPU vendor and model information in human-readable form. .It Pa /compat/linux/proc/meminfo System memory information in human-readable form. .It Pa /compat/linux/proc/pid A directory containing process information for process .Pa pid . .It Pa /compat/linux/proc/self A directory containing process information for the current process. .It Pa /compat/linux/proc/self/exe The executable image for the current process. .It Pa /compat/linux/proc/self/mem The complete virtual address space of the current process. .El .Sh EXAMPLES To mount a .Nm file system on .Pa /compat/linux/proc : .Pp .Dl "mount -t linprocfs linproc /compat/linux/proc" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , +.Xr linux 4 , .Xr procfs 5 , .Xr pseudofs 9 .Sh HISTORY The .Nm first appeared in .Fx 4.0 . .Sh AUTHORS .An -nosplit The .Nm was derived from .Nm procfs by .An Pierre Beyssac . This manual page was written by .An Dag-Erling Sm\(/orgrav , based on the .Xr procfs 5 manual page by .An Garrett Wollman . Index: stable/12/share/man/man5/linsysfs.5 =================================================================== --- stable/12/share/man/man5/linsysfs.5 (revision 364527) +++ stable/12/share/man/man5/linsysfs.5 (revision 364528) @@ -1,99 +1,100 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" .\" $FreeBSD$ .\" -.Dd February 5, 2007 +.Dd November 13, 2019 .Dt LINSYSFS 5 .Os .Sh NAME .Nm linsysfs -.Nd Linux system file system +.Nd Linux kernel objects file system .Sh SYNOPSIS .Bd -literal linsys /compat/linux/sys linsysfs rw 0 0 .Ed .Sh DESCRIPTION The .Tn Linux system file system, or .Nm , emulates a subset of the .Tn Linux sys file system and is required for the complete operation of some .Tn Linux binaries. .Pp The .Nm provides a two-level view of devices. At the highest level, PCI devices themselves are named, according to their bus, slot and function in the system hierarchy. PCI storage devices are listed in the .Pa scsi_host class with a device symlink to the PCI directories of the devices. .Pp Each device node is a directory containing some files and directories: .Bl -tag -width ".Pa status" .It Pa host A place holder for storage host information. .It Pa pci_id A directory for the .Pa pci_id that contains either the device information or another directory structure for a PCI bridge. .El .Pp Each host node of scsi_host is a directory containing some files and directories: .Bl -tag -width ".Pa proc_name" .It Pa proc_name The .Tn Linux registered driver name for these devices. .It Pa device A symlink to the PCI device directory. .El .Sh FILES .Bl -tag -width ".Pa /compat/linux/sys/devices/pci0000:00" -compact .It Pa /compat/linux/sys The normal mount point for .Nm . .It Pa /compat/linux/sys/class/scsi_host The storage host node. .It Pa /compat/linux/sys/devices/pci0000:00 The PCI device hierarchy node. .El .Sh EXAMPLES The most common usage follows: .Pp .Dl "mount -t linsysfs linsys /compat/linux/sys" .Pp where .Pa /compat/linux/sys is a mount point. .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , +.Xr linux 4 , .Xr linprocfs 5 , .Xr pseudofs 9 .Sh HISTORY The .Nm driver first appeared in .Fx 6.2 . .Sh AUTHORS .An -nosplit The .Nm driver was derived from .Nm linprocfs by .An Doug Ambrisko . This manual page was edited by .An Doug Ambrisko , based on the .Xr linprocfs 5 manual page by .An Garrett Wollman . Index: stable/12 =================================================================== --- stable/12 (revision 364527) +++ stable/12 (revision 364528) Property changes on: stable/12 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r354691