| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Add better spinlock debug names when WITNESS_ALL is defined.
2) Make sure that the calling thread gets bound to the current CPU
while a spinlock is locked. Some Linux kernel code depends on that the
CPU ID doesn't change while a spinlock is locked.
3) Add support for using LinuxKPI spinlocks during a panic().
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=314044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tasklets are implemented using a taskqueue and a small statemachine on
top. The additional statemachine is required to ensure all LinuxKPI
tasklets get serialized. FreeBSD taskqueues do not guarantee
serialisation of its tasks, except when there is only one worker
thread configured.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=314043
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A set of helper functions have been added to manage the life of the
LinuxKPI task struct. When an external system call or task is invoked,
a check is made to create the task struct by demand. A thread
destructor callback is registered to free the task struct when a
thread exits to avoid memory leaks.
This change lays the ground for emulating the Linux kernel more
closely which is a dependency by the code using the LinuxKPI APIs.
Add new dedicated td_lkpi_task field has been added to struct thread
instead of abusing td_retval[1].
Fix some header file inclusions to make LINT kernel build properly
after this change.
Bump the __FreeBSD_version to force a rebuild of all kernel modules.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=314040
|
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=313995
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameter to mmap(2), even if MAP_FIXED is not explicitly specified.
Android ART is one example. Implement bug compatibility for this case
in linuxulator.
Reviewed by: dchagin@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9373
Notes:
svn path=/head/; revision=313947
|
|
|
|
|
|
|
| |
MFC after: 2 week
Notes:
svn path=/head/; revision=313940
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=313914
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=313913
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert linux_recv(), linux_send() and linux_accept() system call arguments
to the register_t type too.
PR: 217161
MFC after: 3 days
xMFC with: r313284,r313285,r313684
Notes:
svn path=/head/; revision=313912
|
|
|
|
|
|
|
|
|
|
|
| |
Define all FreeBSD native GFP bits as GFP_NATIVE_MASK.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=313872
|
|
|
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=313810
|
|
|
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=313808
|
|
|
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=313807
|
|
|
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=313806
|
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=313804
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getdents64() with wrapper over kern_getdirentries().
The patch was originally written by emaste@ and then adapted by trasz@
and me.
Note:
1. I divided linux_getdents() and linux_readdir() as in case when the
getdents() called with count = 1 (readdir() case) it can overwrite
user stack (by writing to user buffer pointer more than 1 byte).
2. Linux returns EINVAL in case when user supplied buffer is not enough
to contain fetched dirent.
3. Linux returns ENOTDIR in case when fd points to not a directory.
Reviewed by: trasz@
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D2210
Notes:
svn path=/head/; revision=313740
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename kern_vm_* functions to kern_*. Move the prototypes to
syscallsubr.h. Also change Mach VM types to uintptr_t/size_t as
needed, to avoid headers pollution.
Requested by: alc, jhb
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D9535
Notes:
svn path=/head/; revision=313696
|
|
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Notes:
svn path=/head/; revision=313692
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Reported by: Oleg V. Nauman
MFC after: 1 week
Notes:
svn path=/head/; revision=313684
|
|
|
|
|
|
|
|
| |
One of the ibcs2 files contains some actual changes (new headers) as
it hasn't been regenerated after older changes to makesyscalls.sh.
Notes:
svn path=/head/; revision=313566
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats
instead of their sys_*() counterparts.
Reviewed by: ed, dchagin, kib
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9378
Notes:
svn path=/head/; revision=313352
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Submitted by: trasz
MFC after: 2 week
Differential Revision: https://reviews.freebsd.org/D9381
Notes:
svn path=/head/; revision=313284
|
|
|
|
|
|
|
|
|
|
|
|
| |
error.
Reviewed by: dchagin
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9425
Notes:
svn path=/head/; revision=313283
|
|
|
|
|
|
|
|
|
|
|
|
| |
and use it in compats instead of their sys_*() counterparts.
Reviewed by: kib, jhb, dchagin
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9383
Notes:
svn path=/head/; revision=313281
|
|
|
|
|
|
|
|
|
|
|
|
| |
of their sys_*() counterparts. The svr4 is left unchanged.
Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9379
Notes:
svn path=/head/; revision=313018
|
|
|
|
|
|
|
|
|
|
|
|
| |
by debugger.
Reviewed by: dchagin@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9361
Notes:
svn path=/head/; revision=313017
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9371
Notes:
svn path=/head/; revision=313016
|
|
|
|
|
|
|
|
|
|
|
|
| |
in compat32 instead of their sub_*() counterparts.
Reviewed by: jhb@, kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9382
Notes:
svn path=/head/; revision=313015
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of their sys_*() counterparts in various compats. The svr4
is left untouched, because there's no point.
Reviewed by: ed@, kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9367
Notes:
svn path=/head/; revision=312988
|
|
|
|
|
|
|
|
|
|
|
|
| |
I didn't touch svr4/, there's no point.
Reviewed by: ed@, kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9366
Notes:
svn path=/head/; revision=312987
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9368
Notes:
svn path=/head/; revision=312986
|
|
|
|
| |
Notes:
svn path=/head/; revision=312927
|
|
|
|
| |
Notes:
svn path=/head/; revision=312926
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The intended use is to annotate frequently used globals which either rarely
change (and thus can be grouped in the same cacheline) or are an atomic counter
(which means it may benefit from being the only variable in the cacheline).
Linker script support is provided only for amd64. Architectures without it risk
having other variables put in, i.e. as if they were not annotated. This is
harmless from correctness point of view.
Reviewed by: bde (previous version)
MFC after: 1 month
Notes:
svn path=/head/; revision=312888
|
|
|
|
|
|
|
| |
Pointer/length pairs are now always named ${name} and ${name}_len.
Notes:
svn path=/head/; revision=312355
|
|
|
|
| |
Notes:
svn path=/head/; revision=312354
|
|
|
|
|
|
|
| |
Reviewed by: dchagin
Notes:
svn path=/head/; revision=311474
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now size of the structure is 472 bytes on amd64, which is
already large and stack allocations are indesirable. With the ino64
work, MNAMELEN is increased to 1024, which will make it impossible to have
struct statfs on the stack.
Extracted from: ino64 work by gleb
Discussed with: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Notes:
svn path=/head/; revision=311452
|
|
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Notes:
svn path=/head/; revision=311447
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D8854
Notes:
svn path=/head/; revision=310639
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This argument is not a bitmask of flags, but only accepts a single value.
Fail with EINVAL if an invalid value is passed to 'flag'. Rename the
'flags' argument to getmntinfo(3) to 'mode' as well to match.
This is a followup to r308088.
Reviewed by: kib
MFC after: 1 month
Notes:
svn path=/head/; revision=310638
|
|
|
|
|
|
|
|
|
|
|
| |
Add definition guard for the list_head structure.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=310589
|
|
|
|
|
|
|
|
|
| |
Found by: mmel @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=310583
|
|
|
|
|
|
|
|
|
| |
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=310559
|
|
|
|
|
|
|
|
|
|
|
| |
for kmem_alloc_contig().
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=310557
|
|
|
|
|
|
|
|
|
|
|
|
| |
the ones obtained through devclass_get_device(). Some minor code
cleanups while at it.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=310553
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux list_for_each_entry() does not neccessarily end with the iterator
NULL (it may be an offset from NULL if the list member is not the first
element of the member struct).
Reported by: Coverity
CID: 1366940
Reviewed by: hselasky@
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8780
Notes:
svn path=/head/; revision=310031
|
|
|
|
|
|
|
|
|
|
| |
My plan is to change this function's prototype at some point in the
future to add a new label argument, which can be used to export all of
sysctl as metrics that can be scraped by Prometheus. Switch over this
caller to use the macro wrapper counterpart.
Notes:
svn path=/head/; revision=310014
|
|
|
|
|
|
|
|
|
| |
Obtained from: kmacy @
Sponsored by: Mellanox Technologies
MFC after: 1 week
Notes:
svn path=/head/; revision=309737
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=309736
|