| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reverts commit 4c9907d21517c211b27a3cf5b7a2a976623820cc.
|
|
|
|
| |
This reverts commit 5dad0dd804a33b8a372d49fa342b24c67b1c2fb3.
|
|
|
|
|
|
|
| |
Move struct syscall_args syscall arguments parameters container into
struct thread.
(cherry picked from commit 985b26c6741218c134a15526fd32b736bd73fa8a)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the "created from" line from files generated by makesyscalls.sh.
This information is less useful when the generated files are included in
source control along with the source. If needed it can be reconstructed
from the $FreeBSD$ tag in the generated file. Removing this information
from the generated output permits committing the generated files along
with the change to the system call master list without having inconsistent
metadata in the generated files.
Regenerate the affected files along with the MFC.
|
|
|
|
|
| |
Implement Linux mincore() system call.
This is necessary for the upcoming drm-next.
|
|
|
|
|
| |
Implement getrandom() syscall.
Note. GRND_RANDOM option is not supported for now.
|
|
|
|
| |
To reduce code duplication move socket defines to the MI path.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce code duplication between MD Linux code by moving SYSV IPC 64-bit
related struct definitions out into the MI path.
Invert the native ipc structs to the Linux ipc structs convesion logic.
Since 64-bit variant of ipc structs has more precision convert native ipc
structs to the 64-bit Linux ipc structs and then truncate 64-bit values
into the non 64-bit if needed. Unlike Linux, return EOVERFLOW if the
values do not fit.
Fix SYSV IPC for 64-bit Linuxulator which never sets IPC_64 bit.
|
|
|
|
|
|
|
|
|
|
| |
Trying to be more compatible with Linux if.h definitions:
- renaming l_ifreq::ifru_metric to l_ifreq::ifru_ivalue;
- adding a definition for ifr_ifindex which points to l_ifreq::ifru_ivalue.
A quick search indicates that Linux already got the above changes since 2.1.14.
Reviewed by: kib, marcel, dchagin
|
|
|
|
|
|
| |
Regenerated Linuxulator syscall tables for r314782
Approved by: trasz
|
|
|
|
|
|
|
|
| |
Add UNIMPLEMENTED() placeholder macro for
the syscalls that are not implemented in Linux kernel itself.
Cleanup DUMMY() macros.
Approved by: trasz
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change Linux epoll_pwait syscall definition to match Linux actual one.
MFC r314313:
Regen for r314312 (Linux epoll_pwait).
MFC r314314:
Return EINVAL in case when an invalid size of signal mask specified.
|
|
|
|
| |
Implement timerfd family syscalls.
|
|
|
|
| |
Regen after r314291 (timerfd definition).
|
|
|
|
| |
Change Linuxulator timerfd syscalls definition to match actual Linux one.
|
|
|
|
|
|
| |
Replace sys_ftruncate() with kern_ftruncate() in various compats.
Sponsored by: DARPA, AFRL
|
|
|
|
|
| |
Fix linux_fstatfs() to return proper value for f_frsize. Without it,
linux df(1) binary from Xenial shows garbage.
|
|
|
|
| |
Implement rt_tgsigqueueinfo system call used by glibc for pthread_sigqueue(3).
|
|
|
|
|
|
|
|
| |
Don't create pointless backups of generated files in "make sysent".
Any sensible workflow will include a revision control system from which
to restore the old files if required. In normal usage, developers just
have to clean up the mess.
|
|
|
|
|
|
| |
Add linux_preadv() and linux_pwritev() syscalls to Linuxulator.
Approved by: dchagin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update syscall.master to 4.10-rc6. Also fix comments, a typo,
and wrong numbering for a few unimplemented syscalls.
For 32-bit Linuxulator, socketcall() syscall was historically
the entry point for the sockets API. Starting in Linux 4.3, direct
syscalls are provided for the sockets API. Enable it.
The initial version of patch was provided by trasz@ and extended by me.
MFC r313285:
Regen after r313284.
MFC r313684:
Fix r313284.
Members of the syscall argument structures are padded to a word size. So,
for COMPAT_LINUX32 we should convert user supplied system call arguments
which is 32-bit in that case to the array of register_t.
MFC r313912:
Finish r313684.
Convert linux_recv(), linux_send() and linux_accept() system call arguments
to the register_t type too.
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a copy/paste bug introduced during X86_64 Linuxulator work.
FreeBSD support NX bit on X86_64 processors out of the box, for i386 emulation
use READ_IMPLIES_EXEC flag, introduced in r302515.
While here move common part of mmap() and mprotect() code to the files in compat/linux
to reduce code dupcliation between Linuxulator's
Approved by: re (gjb)
|
|
|
|
|
|
| |
Regen for r302515 (Linux personality).
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
| |
Implement Linux personality() system call mainly due to READ_IMPLIES_EXEC flag.
In Linux if this flag is set, PROT_READ implies PROT_EXEC for mmap().
Linux/i386 set this flag automatically if the binary requires executable stack.
READ_IMPLIES_EXEC flag will be used in the next Linux mmap() commit.
Approved by: re (gjb)
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
l_sched_param
does not defined due to it's nature.
MFC after: 1 week
|
|
|
|
| |
No functional change.
|
| |
|
|
|
|
|
|
| |
No functional change, only trivial cases are done in this sweep,
Discussed in: freebsd-current
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kern.features.linux: 1 meaning linux 32 bits binaries are supported
kern.features.linux64: 1 meaning linux 64 bits binaries are supported
The goal here is to help 3rd party applications (including ports) to determine
if the host do support linux emulation
Reviewed by: dchagin
MFC after: 1 week
Relnotes: yes
Differential Revision: D5830
|
|
|
|
| |
Pointed out by: ae@
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
| |
PR: 181012
Submitted by: John Wehle
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX requires these members to be of type void * rather than the
char * inherited from 4BSD. NetBSD and OpenBSD both changed their
fields to void * back in 1998. No new build failures were reported
via an exp-run.
PR: 206503 (exp-run)
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5092
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The set_robust_list system call request the kernel to record the head
of the list of robust futexes owned by the calling thread. The head
argument is the list head to record.
The get_robust_list system call should return the head of the robust
list of the thread whose thread id is specified in pid argument.
The list head should be stored in the location pointed to by head
argument.
In contrast, our implemenattion of get_robust_list system call copies
the known portion of memory pointed by recorded in set_robust_list
system call pointer to the head of the robust list to the location
pointed by head argument.
So, it is possible for a local attacker to read portions of kernel
memory, which may result in a privilege escalation.
Submitted by: mjg
Security: SA-16:03.linux
|
|
|
|
|
|
|
|
|
| |
instead of vdso. An upcoming linux_base-c6 needs it.
Differential Revision: https://reviews.freebsd.org/D1090
Reviewed by: kib, trasz
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sysent.
sv_prepsyscall is unused.
sv_sigsize and sv_sigtbl translate signal number from the FreeBSD
namespace into the ABI domain. It is only utilized on i386 for iBCS2
binaries. The issue with this approach is that signals for iBCS2 were
delivered with the FreeBSD signal frame layout, which does not follow
iBCS2. The same note is true for any other potential user if
sv_sigtbl. In other words, if ABI needs signal number translation, it
really needs custom sv_sendsig method instead.
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
symbols but just used 0 after the rename.
|
|
|
|
| |
Reported by: hselasky
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with
linux64.ko. While here, add support for linux64 binaries to systrace.
- Update NOPROTO entries in amd64/linux/syscalls.master to match the
main table to fix systrace build.
- Add a special case for union l_semun arguments to the systrace
generation.
- The systrace_linux32 module now only builds the systrace_linux32.ko.
module on amd64.
- Add a new systrace_linux module that builds on both i386 and amd64.
For i386 it builds the existing systrace_linux.ko. For amd64 it
builds a systrace_linux.ko for 64-bit binaries.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D3954
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
| |
Use the same scheme implemented to manage credentials.
Code needing to look at process's credentials (as opposed to thred's) is
provided with *_proc variants of relevant functions.
Places which possibly had to take the proc lock anyway still use the proc
pointer to access limits.
|
|
|
|
|
|
|
| |
This is not the final fix as I need properly cleanup thread resources
before other threads suicide.
Tested by: Ruslan Makhmatkhanov
|
| |
|
| |
|