| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Approved by: so
Security: CVE-2018-6920
Security: CVE-2018-6921
Security: FreeBSD-EN-18:05.mem
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
Reported by: Ilja van Sprundel
Approved by: so
Security: CVE-2018-6919
Security: FreeBSD-EN-18:04.mem
|
| |
| |
| |
| | |
This reverts commit 4c9907d21517c211b27a3cf5b7a2a976623820cc.
|
| |
| |
| |
| | |
This reverts commit 5dad0dd804a33b8a372d49fa342b24c67b1c2fb3.
|
|/
|
|
|
|
|
| |
Move struct syscall_args syscall arguments parameters container into
struct thread.
(cherry picked from commit 985b26c6741218c134a15526fd32b736bd73fa8a)
|
|
|
|
|
|
| |
Approved by: so
Security: FreeBSD-SA-17:10.kldstat
Security: CVE-2017-1088
|
|
|
|
|
|
|
| |
Omit v_cache_count when computing the number of free pages, since its
value is always 0.
Approved by: re (gjb, kib)
|
|
|
|
|
|
| |
free tags
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
| |
On success, getrandom() Linux system call returns the number of bytes that
were copied to the buffer supplied by the user.
PR: 219464
Submitted by: Maciej Pasternacki
Reported by: Maciej Pasternacki
Approved by: re (kib)
|
|
|
|
|
|
| |
Allow cpuset_{get,set}affinity in capabilities mode
Approved by: re (marius)
|
|
|
|
|
|
|
|
|
| |
Fix regression in ndis(4) after r286410. This adds a bunch of checks for
whether this is a Ethernet or 802.11 device and does proper dereferencing.
PR: 213237
Submitted by: <ota j.email.ne.jp>
Approved by: re (marius)
|
|
|
|
|
|
|
| |
Fix symlinkat() which use the newdfd argument to look up the old path,
while it should use it for the new path instead.
Approved by: re (kib)
|
|
|
|
|
|
|
|
|
|
|
| |
Adding SIOCGIFNAME support in Linuxulator. This should silence the console warning associated
with linux-opera:
linux: pid 23492 (opera): ioctl fd=5, cmd=0x8910 ('\M^I',16) is not implemented
linux: pid 23492 (opera): ioctl fd=28, cmd=0x8910 ('\M^I',16) is not implemented
...
Reviewed by: kib, marcel, dchagin
Tested with: linux-opera-12.16_3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r317845:
Provide a freebsd32 implementation of sigqueue()
The previous misuse of sys_sigqueue() was sending random register or
stack garbage to 64-bit targets. The freebsd32 implementation preserves
the sival_int member of value when signaling a 64-bit process.
Document the mixed ABI implementation of union sigval and the
incompability of sival_ptr with pointer integrity schemes.
Reviewed by: kib, wblock
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10605
r317846:
Regen post r317845.
MFC with: r317845
Sponsored by: DARPA, AFRL
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Fix NULL pointer dereference in futex_wake_op() in case when the same
address specified for arguments uaddr and uaddr2.
PR: 218987
|
|
|
|
| |
Drop Giant before sleeping in linux_wait_for_{timeout_,}common().
|
|
|
|
|
| |
Use the kern_clock_nanosleep() to implement Linux clock_nanosleep() with
the proper handling of the TIMER_ABSTIME flag.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add clock_nanosleep()
Add a clock_nanosleep() syscall, as specified by POSIX.
Make nanosleep() a wrapper around it.
Attach the clock_nanosleep test from NetBSD. Adjust it for the
FreeBSD behavior of updating rmtp only when interrupted by a signal.
I believe this to be POSIX-compliant, since POSIX mentions the rmtp
parameter only in the paragraph about EINTR. This is also what
Linux does. (NetBSD updates rmtp unconditionally.)
Copy the whole nanosleep.2 man page from NetBSD because it is complete
and closely resembles the POSIX description. Edit, polish, and reword it
a bit, being sure to keep any relevant text from the FreeBSD page.
Regenerate syscall files.
Relnotes: yes
Sponsored by: Dell EMC
|
|
|
|
| |
Map Linux CLOCK_BOOTTIME to native CLOCK_UPTIME.
|
|
|
|
|
|
| |
Add Evdev ioctl handler to the Linuxulator.
PR: 218627
|
|
|
|
|
|
|
|
|
|
|
| |
linux_ioctl: Refactor some v4l2 struct converters
According to the C standard, it is invalid to copy beyond the end of an
object, even if that object is obviously a member of a larger object (a
struct, in this case).
Appease the standard and Coverity by refactoring the copy in a
straightforward way. No functional change.
|
|
|
|
| |
Use kern_mincore() helper instead of abusing syscall entry.
|
|
|
|
|
| |
Implement Linux mincore() system call.
This is necessary for the upcoming drm-next.
|
|
|
|
|
| |
Glibc get_nprocs() and get_nprocs_conf() uses the sysfs cpu infrastructure
to get number of processors. Implement /sys/devices/system/cpu/.
|
|
|
|
|
| |
Implement getrandom() syscall.
Note. GRND_RANDOM option is not supported for now.
|
|
|
|
| |
To reduce code duplication move socket defines to the MI path.
|
|
|
|
| |
Remove excess tv_nsec test as this is done by linux_to_native_timespec().
|
|
|
|
| |
The value in the tv_nsec field should be in the range 0 to 999999999.
|
|
|
|
|
|
| |
As noted by bde@ negative tv_sec values are not checked for overflow,
so overflow can still occur. Fix that. Also remove the extra check for
tv_sec size as under COMPAT_LINUX32 it is always true.
|
|
|
|
|
| |
Check for negative nanoseconds.
Linux do that in timespec_valid().
|
|
|
|
|
| |
Prevent ushort values overflow when convert new Linux 64-bit ipc
struct to the old Linux ipc struct.
|
|
|
|
|
| |
Linux semop system call return EINVAL in case when the invalid nsops
or semid values specified.
|
|
|
|
|
| |
Linux kernel does not export to the user space ipc_perm.mode values
other than S_IRWXUGO (0777).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Style(9).
|
|
|
|
|
|
|
|
| |
Remove attribute __packed from some IPC struct definition since
Linuxulator is x86 only.
The only notable differences in algnment for an LP64 64-bit system
when compared to a 32-bit system is an eight or large byte types
alignment.
|
|
|
|
|
|
|
|
| |
Add UNIMPLEMENTED() placeholder macro for
the syscalls that are not implemented in Linux kernel itself.
Cleanup DUMMY() macros.
Approved by: trasz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r312353, r312354 and r312355:
Sync in the latest CloudABI generated source files.
Languages like C++17 and Go provide direct support for slice types:
pointer/length pairs. The CloudABI generator now has more complete for
this, meaning that for the C binding, pointer/length pairs now use an
automatic naming scheme of ${name} and ${name}_len.
Apart from this change and some reformatting, the ABI definitions are
identical. Binary compatibility is preserved entirely.
MFC r315700:
Make file descriptor passing work for CloudABI's sendmsg().
Reduce the potential amount of code duplication between cloudabi32 and
cloudabi64 by creating a cloudabi_sock_recv() utility function. The
cloudabi32 and cloudabi64 modules will then only contain code to convert
the iovecs to the native pointer size.
In cloudabi_sock_recv(), we can now construct an SCM_RIGHTS cmsghdr in
an mbuf and pass that on to kern_sendit().
MFC r315736:
Make file descriptor passing for CloudABI's recvmsg() work.
Similar to the change for sendmsg(), create a pointer size independent
implementation of recvmsg() and let cloudabi32 and cloudabi64 call into
it. In case userspace requests one or more file descriptors, call
kern_recvit() in such a way that we get the control message headers in
an mbuf. Iterate over all of the headers and copy the file descriptors
to userspace.
|
|
|
|
|
|
|
|
|
| |
Get rid of foo_sys() in linuxulator code. It was commented out, and it
would be useless anyway - there is no point in pretending to have block
devices; our "block" devices are in fact character ones, and can only
be accessed as such.
Sponsored by: DARPA, AFRL
|
|
|
|
|
|
|
|
|
|
|
| |
Include <sys/systm.h> to obtain the memcpy() prototype.
I got a report of this source file not building on Raspberry Pi. It's
interesting that this only fails for that target and not for others.
Again, that's no reason not to include the right headers.
PR: 217969
Reported by: Johannes Jost Meixner
|
|
|
|
|
| |
Linux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
file descriptor fd is already registered with this epoll instance.
|
|
|
|
|
| |
Linux epoll return ENOENT error in case when op is EPOLL_CTL_MOD or
EPOLL_CTL_DEL, and fd is not registered with this epoll instance.
|
|
|
|
|
|
|
| |
FreeBSD does not have analgue for epoll EPOLLPRI event type.
So, do not set EPOLLPRI event acidently.
Also, do not set EPOLLWRNORM and EPOLLRDNORM events as epoll
do not set this events.
|
|
|
|
| |
Return EINVAL when an invalid file descriptor specified.
|
|
|
|
| |
Unify eventfd ioctl method and use it for other similar interfaces.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Restore signal mask in epoll_pwait.
|