| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Implement BLKSSZGET ioctl for the Linuxulator.
PR: 212700
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
MFC r302518, r302626:
Add linux_mmap.c to the appropriate conf/files.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a bug introduced in r283433.
[1] Remove unneeded sockaddr conversion before kern_recvit() call as the from
argument is used to record result (the source address of the received message) only.
[2] In Linux the type of msg_namelen member of struct msghdr is signed but native
msg_namelen has a unsigned type (socklen_t). So use the proper storage to fetch fromlen
from userspace and than check the user supplied value and return EINVAL if it is less
than 0 as a Linux do.
Reported by: Thomas Mueller <tmueller at sysgo dot com> [1]
Tested by: Thomas Mueller <tmueller at sysgo dot com> [both]
Reviewed by: kib@
|
|
|
|
|
|
| |
Fix style issues around existing SDT probes.
** Changes to sys/netinet/in_kdtrace.c and sys/netinet/in_kdtrace.h skipped.
|
|
|
|
| |
cred: add proc_set_cred helper
|
|
|
|
|
|
|
|
| |
Convert proto family in both directions. The linux and native values for
local and inet are identical, but for inet6 values differ.
PR: 155040
Reported by: Simon Walton
|
|
|
|
|
|
| |
Don't leak fp in case where fo_ioctl() returns an error.
Reported by: C Turt <ecturt@gmail.com>
|
|
|
|
|
|
|
| |
Add a missing errno translation for SO_ERROR optname.
PR: 135458
Reported by: Stefan Schmidt
|
|
|
|
|
|
|
|
|
|
| |
Due to lack the priority propagation feature replace sx by mutex. WIth this
commit NPTL tests are ends in 1 minute faster.
MFC r300414:
For future use move futex timeout code to the separate function and
switch to the high resolution sbintime_t.
|
|
|
|
|
| |
Add my copyright as I rewrote most of the futex code. Minor style(9) cleanup
while here.
|
|
|
|
| |
Minor style(9) cleanup, no functional changes.
|
|
|
|
|
|
|
| |
Fix kernel stack disclosures in the Linux and 4.3BSD compat layers.
Security: SA-16:20
Security: SA-16:21
|
|
|
|
| |
sys/compat/linux*: minor spelling fixes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement /proc/$$/limits.
MFC r297781 (by dchagin@):
More complete implementation of /proc/self/limits.
Fix the way the code accesses process limits struct - pointed out by mjg@.
MFC r298318, 298319 (by cem@):
Don't print uninitialized values and initialize error return before use.
PR: 207386
|
|
|
|
|
|
| |
Cleanup redundant parenthesis from existing howmany()/roundup() macro uses.
Requested by: dchagin
|
|
|
|
| |
Move Linux specific times tests up to guarantee the values are defined.
|
|
|
|
| |
Whitespaces and style(9) fix. No functional changes.
|
|
|
|
| |
When write(2) on eventfd object fails with the error EAGAIN do not return the number of bytes written.
|
|
|
|
| |
Implement O_NONBLOCK flag via fcntl(F_SETFL) for eventfd object.
|
| |
|
|
|
|
|
|
| |
Link the newly created process to the corresponding parent as
if CLONE_PARENT is set, then the parent of the new process will be
the same as that of the calling process.
|
|
|
|
|
|
|
|
|
| |
1. Limit secs to INT32_MAX / 2 to avoid errors from kern_setitimer().
Assert that kern_setitimer() returns 0.
Remove bogus cast of secs.
Fix style(9) issues.
2. Increment the return value if the remaining tv_usec value more than 500000 as a Linux does.
|
|
|
|
| |
Linux accept() system call return EOPNOTSUPP errno instead of EINVAL for UDP sockets.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whitespaces, style(9) fixes. No functional changes.
MFC r297070:
Return EOVERFLOW in case when actual statfs values are large enough and
not fit into 32 bit fileds of a Linux struct statfs.
MFC r297072:
Check bsd_to_linux_statfs() return value.
|
|
|
|
|
|
|
| |
Implement fstatfs64 system call.
PR: 181012
Submitted by: John Wehle
|
|
|
|
|
| |
Add support for IPPROTO_IPV6 socket layer for getsockopt/setsockopt calls.
Also add mapping for several options from RFC 3493 and 3542.
|
|
|
|
|
| |
Prevent double free of control in common sendmsg path as sosend
already freeing it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename remaining linux32 symbols from linux_* to linux32_*.
289769:
Rename remaining linux32 symbols such as linux_sysent[] and
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.
289822:
Fix build for the KTR-enabled kernels.
290143:
Fix build with DEBUG defined.
290144:
Update for LINUX32 rename. The assembler didn't complain about undefined
symbols but just used 0 after the rename.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------------------------------------------------------------------
r292743 | dchagin | 2015-12-26 01:04:47 -0800 (сб, 26 дек. 2015) | 5 lines
Do not allow access to emuldata for non Linux processes.
------------------------------------------------------------------------
r293627 | dchagin | 2016-01-09 23:36:43 -0800 (сб, 09 янв. 2016) | 6 lines
Unlock process lock when return error from getrobustlist call and add
an forgotten dtrace probe when return the same error.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers.
r161611 added some of the code from sys_vfork() directly into the Linux
module wrappers since they use RFSTOPPED. In r232240, the RFFPWAIT handling
was moved to syscallret(), thus this code in the Linux module is no longer
needed as it will be called later.
This also allows the Linux wrappers to benefit from the fix in r275616 for
threads not getting suspended if their vforked child is stopped while they
wait on them.
|
|
|
|
|
| |
Fixes a panic triggered by threaded Linux applications when running
with RACCT/RCTL enabled.
|
|
|
|
| |
Add EPOLLRDHUP support.
|
|
|
|
|
|
|
| |
Properly initialize flags for accept4(2) not to return spurious EINVAL.
Note this fixes a Linuxulator regression introduced in r283490.
PR: 200662
|
|
|
|
|
| |
Finish r283544. In exec case properly detach threads from user space
before suicide.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux nanosleep() and clock_nanosleep() system calls always
writes the remaining time into the structure pointed to by rmtp
unless rmtp is NULL. The value of *rmtp can then be used to call
nanosleep() again and complete the specified pause if the previous
call was interrupted.
Note. clock_nanosleep() with an absolute time value does not write
the remaining time.
While here fix whitespaces and typo in SDT_PROBE.
|
|
|
|
| |
Convert SCM_TIMESTAMP in recvmsg().
|
|
|
|
|
|
|
| |
The latest cp tool is trying to use the btrfs clone operation that is
implemented via ioctl interface. First of all return ENOTSUP for this
operation as a cp fallback to usual method in that case. Secondly, do
not print out the message about unimplemented operation.
|
|
|
|
|
| |
Fix an mbuf(9) leak in sendmsg() under failure condition and
remove unneeded check for failed M_WAITOK allocation.
|
|
|
|
| |
Implement Linux specific syncfs() system call.
|
|
|
|
|
| |
Properly check tv_nsec value. The tv_nsec field can also be one
of the special value UTIME_NOW or UTIME_OMIT.
|
|
|
|
|
| |
Since FreeBSD supports SOCK_CLOEXEC & SOCK_NONBLOCK options
remove its emulation via fcntl call from Linuxulator.
|
|
|
|
| |
Implement recvmmsg() and sendmmsg() system calls.
|
|
|
|
|
| |
Reduce duplication between MD Linux code by moving msg related
struct definitions out into the compat/linux/linux_socket.h
|
|
|
|
| |
Implement epoll_pwait() system call.
|
|
|
|
|
|
| |
Convert signal number to native for VT_SETMODE ioctl and remove
strange and invalid ISSIGVALID macro.
The code has not been tested right way but it was originally broken.
|
|
|
|
| |
Add utimensat() system call.
|
|
|
|
| |
Convert Linux signal number to the FreeBSD.
|