summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/releng/10.3' into RELENG_2_3Renato Botelho2016-03-171-3/+4
|\
| * MFC r296908:kib2016-03-161-3/+4
| | | | | | | | | | | | Force the desired alignment of the user save area. Approved by: re (marius)
* | Remove ixgbe from wrap kernelsRenato Botelho2016-02-262-2/+0
| |
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-02-031-5/+6
|\ \ | |/
| * MFC r294311:kib2016-02-021-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear whole XMM register file instead of only XMM0. Also clear x87 registers. This brings amd64 on par with i386, providing consistent initial FPU state. PR: 206370 MFC r294312: Use ANSI definitions. Wrap long line. MFC r294313: Adjust i386 comment to match amd64 one after r294311. Approved by: re (gjb)
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-271-1/+3
|\ \ | |/
| * MFC r294900:delphij2016-01-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Implement AT_SECURE properly. AT_SECURE auxv entry has been added to the Linux 2.5 kernel to pass a boolean flag indicating whether secure mode should be enabled. 1 means that the program has changes its credentials during the execution. Being exported AT_SECURE used by glibc issetugid() call. Submitted by: imp, dchagin Security: FreeBSD-SA-16:10.linux Security: CVE-2016-1883
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-256-43/+22
|\ \ | |/
| * MFC r293045, r293046:ian2016-01-241-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the 'env' directive described in config(5) work on all architectures, providing compiled-in static environment data that is used instead of any data passed in from a boot loader. Previously 'env' worked only on i386 and arm xscale systems, because it required the MD startup code to examine the global envmode variable and decide whether to use static_env or an environment obtained from the boot loader, and set the global kern_envp accordingly. Most startup code wasn't doing so. Making things even more complex, some mips startup code uses an alternate scheme that involves calling init_static_kenv() to pass an empty buffer and its size, then uses a series of kern_setenv() calls to populate that buffer. Now all MD startup code calls init_static_kenv(), and that routine provides a single point where envmode is checked and the decision is made whether to use the compiled-in static_kenv or the values provided by the MD code. The routine also continues to serve its original purpose for mips; if a non-zero buffer size is passed the routine installs the empty buffer ready to accept kern_setenv() values. Now if the size is zero, the provided buffer full of existing env data is installed. A NULL pointer can be passed if the boot loader provides no env data; this allows the static env to be installed if envmode is set to do so. Most of the work here is a near-mechanical change to call the init function instead of directly setting kern_envp. A notable exception is in xen/pv.c; that code was originally installing a buffer full of preformatted env data along with its non-zero size (like mips code does), which would have allowed kern_setenv() calls to wipe out the preformatted data. Now it passes a zero for the size so that the buffer of data it installs is treated as non-writeable. Also, revert accidental change that snuck into r293045.
| * MFC 290728:jhb2016-01-181-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Export various helper variables describing the layout and size of certain kernel structures for use by debuggers. This mostly aids in examining cores from a kernel without debug symbols as a debugger can infer these values if debug symbols are available. One set of variables describes the layout of 'struct linker_file' to walk the list of loaded kernel modules. A second set of variables describes the layout of 'struct proc' and 'struct thread' to walk the list of processes in the kernel and the threads in each process. The 'pcb_size' variable is used to index into the stoppcbs[] array. The 'vm_maxuser_address' is used to distinguish kernel virtual addresses from user addresses. This doesn't have to be perfect, and 'vm_maxuser_address' is a cheap and simple way to differentiate kernel pointers from simple values like TIDs and PIDs. While here, annotate the fields in struct pcb used by kgdb on amd64 and i386 to note that their ABI should be preserved. Annotations for other platforms will be added in the future.
| * MFC r293343: Move amd64 metadata.h to x86 and share with i386emaste2016-01-181-33/+3
| |
| * MFC r293613:dchagin2016-01-163-0/+4
| | | | | | | | | | Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall instead of vdso. An upcoming linux_base-c6 needs it.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-141-2/+2
|\ \ | |/
| * o Fix SCTP ICMPv6 error message vulnerability. [SA-16:01.sctp]glebius2016-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | o Fix Linux compatibility layer incorrect futex handling. [SA-16:03.linux] o Fix Linux compatibility layer setgroups(2) system call. [SA-16:04.linux] o Fix TCP MD5 signature denial of service. [SA-16:05.tcp] o Fix insecure default bsnmpd.conf permissions. [SA-16:06.bsnmpd] Security: FreeBSD-SA-16:01.sctp, CVE-2016-1879 Security: FreeBSD-SA-16:03.linux, CVE-2016-1880 Security: FreeBSD-SA-16:04.linux, CVE-2016-1881 Security: FreeBSD-SA-16:05.tcp, CVE-2016-1882 Security: FreeBSD-SA-16:06.bsnmpd, CVE-2015-5677
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-1317-457/+970
|\ \ | |/
| * MFC r289055 (by mjg@):dchagin2016-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | linux: fix handling of out-of-bounds syscall attempts Due to an off by one the code would read an entry past the table, as opposed to the last entry which contains the nosys handler. This fixes my fault. MFC r289058 (by cem@): Fix missing semi-colon from r289055. MFC r289768 (by jhb@): Merge r289055 to amd64/linux32: linux: fix handling of out-of-bounds syscall attempts Due to an off by one the code would read an entry past the table, as opposed to the last entry which contains the nosys handler.
| * MFC r283544:dchagin2016-01-091-9/+0
| | | | | | | | | | | | When I merged the lemul branch I missied kib@'s r282708 commit. This is not the final fix as I need properly cleanup thread resources before other threads suicide.
| * Regen for r293592.dchagin2016-01-095-8/+20
| |
| * MFC r283492:dchagin2016-01-092-2/+1
| | | | | | | | Implement Linux specific syncfs() system call.
| * Regen for r293588.dchagin2016-01-095-10/+69
| |
| * MFC r283488:dchagin2016-01-092-4/+6
| | | | | | | | Implement recvmmsg() and sendmmsg() system calls.
| * MFC r283487:dchagin2016-01-091-16/+0
| | | | | | | | | | Reduce duplication between MD Linux code by moving msg related struct definitions out into the compat/linux/linux_socket.h
| * Regen for r293585.dchagin2016-01-095-7/+7
| |
| * MFC r283484:dchagin2016-01-092-2/+1
| | | | | | | | Implement epoll_pwait() system call.
| * Regen for r293582.dchagin2016-01-095-8/+35
| |
| * MFC r283480:dchagin2016-01-092-2/+2
| | | | | | | | Add utimensat() system call.
| * MFC r283479:dchagin2016-01-091-8/+0
| | | | | | | | | | | | | | | | | | The kernel sends signals to the processes via ABI specific sv_sendsig method. Native ABI do not need signal conversion, only emulators may want this. Usually emulators implements its own sv_sendsig method. For now only ibcs2 emulator does not have own sv_sendsig implementation and depends on native sendsig() method. So, remove any extra attempts to convert signal numbers from native sendsig() methods except from i386 where ibsc2 is living.
| * MFC r283474:dchagin2016-01-094-94/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework signal code to allow using it by other modules, like linprocfs: 1. Linux sigset always 64 bit on all platforms. In order to move Linux sigset code to the linux_common module define it as 64 bit int. Move Linux sigset manipulation routines to the MI path. 2. Move Linux signal number definitions to the MI path. In general, they are the same on all platforms except for a few signals. 3. Map Linux RT signals to the FreeBSD RT signals and hide signal conversion tables to avoid conversion errors. 4. Emulate Linux SIGPWR signal via FreeBSD SIGRTMIN signal which is outside of allowed on Linux signal numbers. PR: 197216
| * MFC r283471:dchagin2016-01-092-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | According to Linux man sigaltstack(3) shall return EINVAL if the ss argument is not a null pointer, and the ss_flags member pointed to by ss contains flags other than SS_DISABLE. However, in fact, Linux also allows SS_ONSTACK flag which is simply ignored. For buggy apps (at least mono) ignore other than SS_DISABLE flags as a Linux do. While here move MI part of sigaltstack code to the appropriate place.
| * Regen for r293569.dchagin2016-01-094-5/+7
| |
| * MFC r283467:dchagin2016-01-092-1/+4
| | | | | | | | | | | | Call nosys in case when the incorrect syscall number is specified. Its my fault, fixed by mjg@ at r289055.
| * Regen for r293567.dchagin2016-01-095-7/+34
| |
| * MFC r283465:dchagin2016-01-092-3/+2
| | | | | | | | | | Add preliminary fallocate system call implementation to emulate posix_fallocate() function.
| * Regen for r293555.dchagin2016-01-095-8/+40
| |
| * MFC r283451:dchagin2016-01-092-2/+2
| | | | | | | | Implement ppoll() system call.
| * Regen for r293549.dchagin2016-01-095-10/+39
| |
| * MFC r283444:dchagin2016-01-092-4/+2
| | | | | | | | Implement eventfd system call.
| * MFC r283443:dchagin2016-01-091-0/+1
| | | | | | | | | | Put the correct value for the abi_nfdbits parameter of kern_select() for all supported Linuxulators.
| * Regen for r293546.dchagin2016-01-095-19/+129
| |
| * MFC r283441:dchagin2016-01-092-9/+8
| | | | | | | | | | | | | | | | | | | | | | Implement epoll family system calls. This is a tiny wrapper around kqueue() to implement epoll subset of functionality. The kqueue user data are 32bit on i386 which is not enough for epoll user data, so we keep user data in the proc emuldata. Initial patch developed by rdivacky@ in 2007, then extended by Yuri Victorovich @ r255672 and finished by me in collaboration with mjg@ and jillies@.
| * MFC r283437:dchagin2016-01-091-36/+1
| | | | | | | | | | To avoid code duplication move open/fcntl definitions to the MI header file.
| * MFC r283436:dchagin2016-01-091-6/+2
| | | | | | | | | | Use the BSD_TO_LINUX_SIGNAL() wherever there is no need to check the ABI as it is known.
| * MFC r283432:dchagin2016-01-091-2/+2
| | | | | | | | | | | | | | Being exported through vdso the note.Linux section used by glibc to determine the kernel version (this saves one uname call). Temporarily disable the export of a note.Linux section until I figured out how to change the kernel version in the note.Linux on the fly.
| * MFC r283431:dchagin2016-01-092-1/+27
| | | | | | | | | | Add AT_RANDOM and AT_EXECFN auxiliary vector entries which are used by glibc. At list since glibc version 2.16 using AT_RANDOM is mandatory.
| * Regen for r293533.dchagin2016-01-095-10/+5
| |
| * MFC r283428:dchagin2016-01-091-1/+2
| | | | | | | | | | | | | | | | | | Change linux faccessat syscall definition to match actual linux one. The AT_EACCESS and AT_SYMLINK_NOFOLLOW flags are actually implemented within the glibc wrapper function for faccessat(). If either of these flags are specified, then the wrapper function employs fstatat() to determine access permissions.
| * MFC r283421:dchagin2016-01-092-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new module linux_common.ko which is intended for the following primary purposes: 1. Remove the dependency of linsysfs and linprocfs modules from linux.ko, which will be architecture specific on amd64. 2. Incorporate into linux_common.ko general code for platforms on which we'll support two Linuxulator modules (for both instruction set - 32 & 64 bit). 3. Move malloc(9) declaration to linux_common.ko, to enable getting memory usage statistics properly. Currently linux_common.ko incorporates a code from linux_mib.c and linux_util.c and linprocfs, linsysfs and linux kernel modules depend on linux_common.ko. Temporarily remove dtrace garbage from linux_mib.c and linux_util.c
| * MFC r283416:dchagin2016-01-091-0/+10
| | | | | | | | | | | | x86_64 Linux do not use multiplexing on ipc system calls. Move struct ipc_perm definition to the MD path as it differs for 64 and 32 bit platform.
| * MFC r283411:dchagin2016-01-091-1/+0
| | | | | | | | | | Remove stale comment about a signal trampoline which is moved to the shared page at r219609.
| * MFC r283410:dchagin2016-01-091-4/+4
| | | | | | | | | | Put linux_platform into the vdso to avoid copying it onto the stack at every exec.
OpenPOWER on IntegriCloud