]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFC r293354:
jimharris [Mon, 11 Jan 2016 17:33:51 +0000 (17:33 +0000)]
MFC r293354:

  nvme: replace NVME_CEILING macro with howmany()

8 years agoMFC r293352:
jimharris [Mon, 11 Jan 2016 17:32:56 +0000 (17:32 +0000)]
MFC r293352:

  nvme: add hw.nvme.min_cpus_per_ioq tunable

  Due to FreeBSD system-wide limits on number of MSI-X vectors
  (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199321),
  it may be desirable to allocate fewer than the maximum number
  of vectors for an NVMe device, in order to save vectors for
  other devices (usually Ethernet) that can take better
  advantage of them and may be probed after NVMe.

  This tunable is expressed in terms of minimum number of CPUs
  per I/O queue instead of max number of queues per controller,
  to allow for a more even distribution of CPUs per queue.  This
  avoids cases where some number of CPUs have a dedicated queue,
  but other CPUs need to share queues.  Ideally the PR referenced
  above will eventually be fixed and the mechanism implemented
  here becomes obsolete anyways.

  While here, fix a bug in the CPUs per I/O queue calculation to
  properly account for the admin queue's MSI-X vector.

8 years agoMFC r293328:
jimharris [Mon, 11 Jan 2016 17:31:18 +0000 (17:31 +0000)]
MFC r293328:

  nvme: do not revert to single I/O queue when per-CPU queues not available

  Previously nvme(4) would revert to a single I/O queue if it could not
  allocate enought interrupt vectors or NVMe submission/completion queues
  to have one I/O queue per core.  This patch determines how to utilize a
  smaller number of available interrupt vectors, and assigns (as closely
  as possible) an equal number of cores to each associated I/O queue.

8 years agoMFC r293327:
jimharris [Mon, 11 Jan 2016 17:29:42 +0000 (17:29 +0000)]
MFC r293327:

  nvme: break out interrupt setup code into a separate function

8 years agoMFC r293326:
jimharris [Mon, 11 Jan 2016 17:28:47 +0000 (17:28 +0000)]
MFC r293326:

  nvme: do not pre-allocate MSI-X IRQ resources

  The issue referenced here was resolved by other changes
  in recent commits, so this code is no longer needed.

8 years agoMFC r293325:
jimharris [Mon, 11 Jan 2016 17:27:20 +0000 (17:27 +0000)]
MFC r293325:

  nvme: remove per_cpu_io_queues from struct nvme_controller

  Instead just use num_io_queues to make this determination.

  This prepares for some future changes enabling use of multiple
  queues when we do not have enough queues or MSI-X vectors
  for one queue per CPU.

8 years agoMFC r293324:
jimharris [Mon, 11 Jan 2016 17:26:06 +0000 (17:26 +0000)]
MFC r293324:

  nvme: simplify some of the nested ifs in interrupt setup code

  This prepares for some follow-up commits which do more work in
  this area.

8 years agoMFC r293323:
jimharris [Mon, 11 Jan 2016 17:24:18 +0000 (17:24 +0000)]
MFC r293323:

  nvd: submit bios directly when BIO_ORDERED not set or in flight

  This significantly improves parallelism in the most common case.
  The taskqueue is still used whenever BIO_ORDERED bios are in flight.

  This patch is based heavily on a patch from gallatin@.

8 years agoMFC r293322:
jimharris [Mon, 11 Jan 2016 17:22:57 +0000 (17:22 +0000)]
MFC r293322:

  nvd: break out submission logic into separate function

  This enables a future patch using this same logic to submit
  I/O directly bypassing the taskqueue.

8 years agoMFC r293321:
jimharris [Mon, 11 Jan 2016 17:21:38 +0000 (17:21 +0000)]
MFC r293321:

  nvd: skip BIO_ORDERED logic when bio fails submission

  This ensures the bio flags are not read after biodone().
  The ordering will still be enforced, after the bio is
  submitted successfully.

8 years agoMFC r293320:
jimharris [Mon, 11 Jan 2016 17:20:30 +0000 (17:20 +0000)]
MFC r293320:

  nvd: do not wait for previous bios before submitting ordered bio

  Still wait until all in-flight bios (including the ordered bio)
  complete before processing more bios from the queue.

8 years agoMFC r293319:
jimharris [Mon, 11 Jan 2016 17:19:11 +0000 (17:19 +0000)]
MFC r293319:

  nvd: set DISKFLAG_DIRECT_COMPLETION

8 years agoMFC r286967 by imp: use -mno-aes and -mno-avx flags only with Clang
emaste [Mon, 11 Jan 2016 15:30:19 +0000 (15:30 +0000)]
MFC r286967 by imp: use -mno-aes and -mno-avx flags only with Clang

The flags -mno-aes -mno-avx only exist for clang, not [base] gcc, so
add them only to the clang CFLAGS.

8 years agoMove -msoft-float compiler flag into x86/i386 cases to fix ia64
emaste [Mon, 11 Jan 2016 04:25:03 +0000 (04:25 +0000)]
Move -msoft-float compiler flag into x86/i386 cases to fix ia64

Direct commit to stable/10 as ia64 support does not exist in HEAD.

8 years agoMerge r293423, r293469:
glebius [Mon, 11 Jan 2016 01:09:50 +0000 (01:09 +0000)]
Merge r293423, r293469:

  ntp 4.2.8p5

Relnotes: yes

8 years agoMFC r281027: Clean up more x86 only options in the efi code.
emaste [Mon, 11 Jan 2016 00:43:50 +0000 (00:43 +0000)]
MFC r281027: Clean up more x86 only options in the efi code.

8 years agoMFC r293370:
pfg [Sun, 10 Jan 2016 22:30:39 +0000 (22:30 +0000)]
MFC r293370:
ext2fs: reading mmaped file in Ext4 causes panic

Always call brelse(path.ep_bp), fixing reading EXT4 files using mmap().

Patch by Damjan Jovanovic.

PR: 205938

8 years agoUnbreak stable/10 buildworlds on arm/arm, mips/mips, mips/mips64, mips/mipsel,
ngie [Sun, 10 Jan 2016 17:39:49 +0000 (17:39 +0000)]
Unbreak stable/10 buildworlds on arm/arm, mips/mips, mips/mips64, mips/mipsel,
mips/mipsn32, powerpc/powerpc, powerpc/powerpc64, sparc64/sparc64 with gcc
after r293307 (some of the BURN_BRIDGES code)

MFC after: 3 days
Pointyhat to: markj
Sponsored by: EMC / Isilon Storage Division

MFC r279017:

r279017 (by glebius):

Burn bridges to FreeBSD 7.x IGMP stats.

8 years agoMFC r292057:
ae [Sun, 10 Jan 2016 13:53:57 +0000 (13:53 +0000)]
MFC r292057:
  Make detection of GPT a bit more reliable.

  When we are detecting a partition table and didn't find PMBR, try to
  read backup GPT header from the last sector and if it is correct,
  assume that we have GPT.

  Differential Revision: https://reviews.freebsd.org/D4282

MFC r292058:
  Remove a note about damaged PMBR. Now GPT will be detected automatically
  with such corruption.

Relnotes: yes

8 years agoMFC SVN revisions 293340, 293379
dteske [Sat, 9 Jan 2016 23:44:41 +0000 (23:44 +0000)]
MFC SVN revisions 293340, 293379

r293340: Increase maximum buffer size for `-x cmd' value
r293379: Bump copyright

8 years agoMFC r290275: Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi)
dteske [Sat, 9 Jan 2016 23:33:44 +0000 (23:33 +0000)]
MFC r290275: Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi)

8 years agoBump __FreeBSD_version after Linux changes merge.
dchagin [Sat, 9 Jan 2016 18:40:20 +0000 (18:40 +0000)]
Bump __FreeBSD_version after Linux changes merge.

8 years agoMFC r289055 (by mjg@):
dchagin [Sat, 9 Jan 2016 18:32:52 +0000 (18:32 +0000)]
MFC r289055 (by mjg@):

 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.

8 years agoMFC r288994 (by bdrewery):
dchagin [Sat, 9 Jan 2016 18:28:15 +0000 (18:28 +0000)]
MFC r288994 (by bdrewery):

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.

8 years agoMFC r287395 (by trasz):
dchagin [Sat, 9 Jan 2016 18:24:53 +0000 (18:24 +0000)]
MFC r287395 (by trasz):

Fixes a panic triggered by threaded Linux applications when running
with RACCT/RCTL enabled.

8 years agoMFC r284626:
dchagin [Sat, 9 Jan 2016 18:23:34 +0000 (18:23 +0000)]
MFC r284626:

Add EPOLLRDHUP support.

8 years agoMFC r284166 (by jkim):
dchagin [Sat, 9 Jan 2016 18:22:09 +0000 (18:22 +0000)]
MFC r284166 (by jkim):

Properly initialize flags for accept4(2) not to return spurious EINVAL.
Note this fixes a Linuxulator regression introduced in r283490.

PR:             200662

8 years agoMFC r284159:
dchagin [Sat, 9 Jan 2016 18:19:18 +0000 (18:19 +0000)]
MFC r284159:

Futex is an aligned 32-bit integer. Use the proper instruction and
operand when dereferencing futex pointer.

8 years agoMFC r284051:
dchagin [Sat, 9 Jan 2016 18:17:58 +0000 (18:17 +0000)]
MFC r284051:

Finish r283544. In exec case properly detach threads from user space
before suicide.

8 years agoMFC r283680, r283681:
dchagin [Sat, 9 Jan 2016 18:16:36 +0000 (18:16 +0000)]
MFC r283680, r283681:

Move linux64 and linux_common to it's right place and make them not
depend on bhyve.

8 years agoMFC r283569 (by nyan):
dchagin [Sat, 9 Jan 2016 18:09:07 +0000 (18:09 +0000)]
MFC r283569 (by nyan):

MFi386: r283407
  Implement vdso - virtual dynamic shared object.

MFi386: r283474
  Rework signal code to allow using it by other modules, like linprocfs.

MFi386: r283506
  For objcopy, use --input-target and --output-target.

This fixes pc98 build.

8 years agoMFC r283544:
dchagin [Sat, 9 Jan 2016 18:07:48 +0000 (18:07 +0000)]
MFC r283544:

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.

8 years agoMFC r283506 (by rodrigc):
dchagin [Sat, 9 Jan 2016 18:06:38 +0000 (18:06 +0000)]
MFC r283506 (by rodrigc):

For objcopy, use --input-target and --output-target

When building with gcc 4.9 and binutils 2.25,
using '--input' and '--output' returns an error
message:
   objcopy: option `--input' is ambiguous

8 years agoMFC r283498:
dchagin [Sat, 9 Jan 2016 18:05:04 +0000 (18:05 +0000)]
MFC r283498:

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.

8 years agoMFC r283497:
dchagin [Sat, 9 Jan 2016 18:04:10 +0000 (18:04 +0000)]
MFC r283497:

Convert SCM_TIMESTAMP in recvmsg().

8 years agoMFC r283496:
dchagin [Sat, 9 Jan 2016 18:03:09 +0000 (18:03 +0000)]
MFC r283496:

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.

8 years agoMFC r283495:
dchagin [Sat, 9 Jan 2016 18:02:08 +0000 (18:02 +0000)]
MFC r283495:

Hide vfs.pfs.trace variable if it is not used.

8 years agoMFC r283494:
dchagin [Sat, 9 Jan 2016 18:00:51 +0000 (18:00 +0000)]
MFC r283494:

Fix an mbuf(9) leak in sendmsg() under failure condition and
remove unneeded check for failed M_WAITOK allocation.

8 years agoRegen for r293592.
dchagin [Sat, 9 Jan 2016 17:56:04 +0000 (17:56 +0000)]
Regen for r293592.

8 years agoMFC r283492:
dchagin [Sat, 9 Jan 2016 17:54:37 +0000 (17:54 +0000)]
MFC r283492:

Implement Linux specific syncfs() system call.

8 years agoMFC r283491:
dchagin [Sat, 9 Jan 2016 17:53:32 +0000 (17:53 +0000)]
MFC r283491:

Properly check tv_nsec value. The tv_nsec field can also be one
of the special value UTIME_NOW or UTIME_OMIT.

8 years agoMFC r283490:
dchagin [Sat, 9 Jan 2016 17:52:27 +0000 (17:52 +0000)]
MFC r283490:

Since FreeBSD supports SOCK_CLOEXEC & SOCK_NONBLOCK options
remove its emulation via fcntl call from Linuxulator.

8 years agoRegen for r293588.
dchagin [Sat, 9 Jan 2016 17:51:17 +0000 (17:51 +0000)]
Regen for r293588.

8 years agoMFC r283488:
dchagin [Sat, 9 Jan 2016 17:50:13 +0000 (17:50 +0000)]
MFC r283488:

Implement recvmmsg() and sendmmsg() system calls.

8 years agoMFC r283487:
dchagin [Sat, 9 Jan 2016 17:49:05 +0000 (17:49 +0000)]
MFC r283487:

Reduce duplication between MD Linux code by moving msg related
struct definitions out into the compat/linux/linux_socket.h

8 years agoRegen for r293585.
dchagin [Sat, 9 Jan 2016 17:47:57 +0000 (17:47 +0000)]
Regen for r293585.

8 years agoMFC r283484:
dchagin [Sat, 9 Jan 2016 17:45:02 +0000 (17:45 +0000)]
MFC r283484:

Implement epoll_pwait() system call.

8 years agoMFC r283483:
dchagin [Sat, 9 Jan 2016 17:44:08 +0000 (17:44 +0000)]
MFC r283483:

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.

8 years agoRegen for r293582.
dchagin [Sat, 9 Jan 2016 17:42:25 +0000 (17:42 +0000)]
Regen for r293582.

8 years agoMFC r283480:
dchagin [Sat, 9 Jan 2016 17:41:00 +0000 (17:41 +0000)]
MFC r283480:

Add utimensat() system call.

8 years agoMFC r283479:
dchagin [Sat, 9 Jan 2016 17:39:41 +0000 (17:39 +0000)]
MFC r283479:

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.

8 years agoMFC r283478:
dchagin [Sat, 9 Jan 2016 17:35:09 +0000 (17:35 +0000)]
MFC r283478:

Simplify linprocfs_doprocenviron(). Remove extra proc visibility checks
and initialize pn_vis by well known procfs_candebug().

8 years agoMFC r283476:
dchagin [Sat, 9 Jan 2016 17:31:20 +0000 (17:31 +0000)]
MFC r283476:

Convert Linux signal number to the FreeBSD.

8 years agoMFC r283475:
dchagin [Sat, 9 Jan 2016 17:30:10 +0000 (17:30 +0000)]
MFC r283475:

Convert Linux sigsets before showing.
Linux kernel displays sigset always as 16x4 bit mask.

8 years agoMFC r283474:
dchagin [Sat, 9 Jan 2016 17:29:08 +0000 (17:29 +0000)]
MFC r283474:

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

8 years agoMFC r283473:
dchagin [Sat, 9 Jan 2016 17:27:36 +0000 (17:27 +0000)]
MFC r283473:

Add support for /proc/<pid>/auxv.

8 years agoMFC r283472:
dchagin [Sat, 9 Jan 2016 17:23:57 +0000 (17:23 +0000)]
MFC r283472:

Add vdso and stack names to the /proc/self/maps.

8 years agoMFC r283471:
dchagin [Sat, 9 Jan 2016 17:22:51 +0000 (17:22 +0000)]
MFC r283471:

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.

8 years agoMFC r283470:
dchagin [Sat, 9 Jan 2016 17:21:28 +0000 (17:21 +0000)]
MFC r283470:

Add EPOLLERR flag handling to epoll.

8 years agoRegen for r293569.
dchagin [Sat, 9 Jan 2016 17:20:19 +0000 (17:20 +0000)]
Regen for r293569.

8 years agoMFC r283467:
dchagin [Sat, 9 Jan 2016 17:18:03 +0000 (17:18 +0000)]
MFC r283467:

Call nosys in case when the incorrect syscall number is specified.

Its my fault, fixed by mjg@ at r289055.

8 years agoRegen for r293567.
dchagin [Sat, 9 Jan 2016 17:15:03 +0000 (17:15 +0000)]
Regen for r293567.

8 years agoMFC r283465:
dchagin [Sat, 9 Jan 2016 17:13:43 +0000 (17:13 +0000)]
MFC r283465:

Add preliminary fallocate system call implementation
to emulate posix_fallocate() function.

8 years agoMFC r283464:
dchagin [Sat, 9 Jan 2016 17:12:45 +0000 (17:12 +0000)]
MFC r283464:

Delete the duplicate of linux_to_native_clockid() function.

8 years agoMFC r283463:
dchagin [Sat, 9 Jan 2016 17:11:25 +0000 (17:11 +0000)]
MFC r283463:

Do not use struct l_timespec without conversion. While here move
args->timeout handling before acquiring the futex key at FUTEX_WAIT path.

8 years agoMFC r283462:
dchagin [Sat, 9 Jan 2016 17:10:22 +0000 (17:10 +0000)]
MFC r283462:

Add prototypes for static futex functions.

8 years agoMFC r283461:
dchagin [Sat, 9 Jan 2016 17:08:33 +0000 (17:08 +0000)]
MFC r283461:

As for now our tmpfs is no longer being considered
"highly experimental" remove /dev/shm magic commited
in r218497 and convert tmpfs type to an expected magic number.

8 years agoMFC r283460:
dchagin [Sat, 9 Jan 2016 17:07:17 +0000 (17:07 +0000)]
MFC r283460:

Print out unsupported futex operation message only once for the process.

8 years agoMFC r283459:
dchagin [Sat, 9 Jan 2016 17:06:21 +0000 (17:06 +0000)]
MFC r283459:

Add some clock mappings used in glibc 2.20.

8 years agoMFC r283456:
dchagin [Sat, 9 Jan 2016 17:05:00 +0000 (17:05 +0000)]
MFC r283456:

Improve ktr(9) records in thread managment code.

8 years agoMFC r283455:
dchagin [Sat, 9 Jan 2016 17:03:53 +0000 (17:03 +0000)]
MFC r283455:

Use local struct proc * varable instead of dereferencing td->td_proc.

8 years agoMFC r283454:
dchagin [Sat, 9 Jan 2016 17:02:35 +0000 (17:02 +0000)]
MFC r283454:

Avoid unnecessary em zeroing in non-exec path
as it already zeroed by malloc with M_ZERO flag
and move zeroing to the proper place in exec path.

8 years agoMFC r283453:
dchagin [Sat, 9 Jan 2016 17:01:26 +0000 (17:01 +0000)]
MFC r283453:

Remove the unnecessary cast.

8 years agoRegen for r293555.
dchagin [Sat, 9 Jan 2016 17:00:15 +0000 (17:00 +0000)]
Regen for r293555.

8 years agoMFC r283451:
dchagin [Sat, 9 Jan 2016 16:58:57 +0000 (16:58 +0000)]
MFC r283451:

Implement ppoll() system call.

8 years agoMFC r283450:
dchagin [Sat, 9 Jan 2016 16:58:03 +0000 (16:58 +0000)]
MFC r283450:

td_sigmask of a newly created thread copied from td.
Remove excess initialization of td_sigmask.

8 years agoMFC r283449:
dchagin [Sat, 9 Jan 2016 16:57:03 +0000 (16:57 +0000)]
MFC r283449:

Update Linux compat revision to 32.

8 years agoMFC r283448:
dchagin [Sat, 9 Jan 2016 16:55:44 +0000 (16:55 +0000)]
MFC r283448:

Connect linux64 module to the build.

8 years agoMFC r283446:
dchagin [Sat, 9 Jan 2016 16:52:25 +0000 (16:52 +0000)]
MFC r283446:

Include opt_compat.h, so that COMPAT_LINUX32 is defined, and we can
access to the semop structs and functions.

8 years agoRegen for r293549.
dchagin [Sat, 9 Jan 2016 16:50:09 +0000 (16:50 +0000)]
Regen for r293549.

8 years agoMFC r283444:
dchagin [Sat, 9 Jan 2016 16:48:50 +0000 (16:48 +0000)]
MFC r283444:

Implement eventfd system call.

8 years agoMFC r283443:
dchagin [Sat, 9 Jan 2016 16:47:36 +0000 (16:47 +0000)]
MFC r283443:

Put the correct value for the abi_nfdbits parameter of kern_select() for
all supported Linuxulators.

8 years agoRegen for r293546.
dchagin [Sat, 9 Jan 2016 16:45:54 +0000 (16:45 +0000)]
Regen for r293546.

8 years agoMFC r283441:
dchagin [Sat, 9 Jan 2016 16:44:17 +0000 (16:44 +0000)]
MFC r283441:

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@.

8 years agoMFC r283440:
dchagin [Sat, 9 Jan 2016 16:39:15 +0000 (16:39 +0000)]
MFC r283440:

For future use in the Linuxulator:

1. Add a kern_kqueue() counterpart for kqueue() with flags parameter.

2. Be a bit secure. To avoid a double fp lookup add a kern_kevent_fp()
counterpart for kern_kevent() with file pointer parameter instead
of file descriptor an pass the buck to it.

Suggested by: mjg [2]

8 years agoMFC r283439:
dchagin [Sat, 9 Jan 2016 16:33:55 +0000 (16:33 +0000)]
MFC r283439:

Implement F_DUPFD_CLOEXEC fcntl flag.

8 years agoMFC r283438:
dchagin [Sat, 9 Jan 2016 16:32:35 +0000 (16:32 +0000)]
MFC r283438:

Add several fcntl flags.

8 years agoMFC r283437:
dchagin [Sat, 9 Jan 2016 16:31:10 +0000 (16:31 +0000)]
MFC r283437:

To avoid code duplication move open/fcntl definitions to the MI
header file.

8 years agoMFC r283436:
dchagin [Sat, 9 Jan 2016 16:29:51 +0000 (16:29 +0000)]
MFC r283436:

Use the BSD_TO_LINUX_SIGNAL() wherever there is no need
to check the ABI as it is known.

8 years agoMFC r283435:
dchagin [Sat, 9 Jan 2016 16:28:40 +0000 (16:28 +0000)]
MFC r283435:

Convert Linux wait options to the FreeBSD.
Check wait options as a Linux do.
Linux always set WEXITED option not a WUNTRACED|WNOHANG
which is a strange bug.

8 years agoMFC r283434:
dchagin [Sat, 9 Jan 2016 16:27:33 +0000 (16:27 +0000)]
MFC r283434:

Set WIFCONTINUED to the wait status if needed.

8 years agoMFC r283433:
dchagin [Sat, 9 Jan 2016 16:26:39 +0000 (16:26 +0000)]
MFC r283433:

Rewrite linux_recvfrom. To avoid double conversion of sockaddr use
kern_recvit() directly.
And check fromlen parameter before sockaddr copyin and conversion.

8 years agoMFC r283432:
dchagin [Sat, 9 Jan 2016 16:25:30 +0000 (16:25 +0000)]
MFC r283432:

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.

8 years agoMFC r283431:
dchagin [Sat, 9 Jan 2016 16:24:30 +0000 (16:24 +0000)]
MFC r283431:

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.

8 years agoRegen for r293533.
dchagin [Sat, 9 Jan 2016 16:23:11 +0000 (16:23 +0000)]
Regen for r293533.

8 years agoMFC r283428:
dchagin [Sat, 9 Jan 2016 16:21:39 +0000 (16:21 +0000)]
MFC r283428:

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.

8 years agoMFC r283427:
dchagin [Sat, 9 Jan 2016 16:20:29 +0000 (16:20 +0000)]
MFC r283427:

Where possible we will use M_LINUX malloc(9) type.
Move M_FUTEX defines to the linux_common.ko.

8 years agoRegen for r293530.
dchagin [Sat, 9 Jan 2016 16:16:16 +0000 (16:16 +0000)]
Regen for r293530.

8 years agoMFC r283424:
dchagin [Sat, 9 Jan 2016 16:14:24 +0000 (16:14 +0000)]
MFC r283424:

Add preliminary support for x86-64 Linux binaries.

8 years agoMFC r283423:
dchagin [Sat, 9 Jan 2016 16:12:37 +0000 (16:12 +0000)]
MFC r283423:

Move FEATURE macros for v4l and v4l2 to the common module.