]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agosqlite: clean a couple of invocations of memcpy(3)
pfg [Thu, 16 Jul 2015 22:07:13 +0000 (22:07 +0000)]
sqlite: clean a couple of invocations of memcpy(3)

Found almost accidentally by our native gcc when enhanced with
FORTIFY_SOURCE.

Submitted by: Oliver Pinter
Sponosored by: Google Inc. GSoC 2015

8 years agoWhen checking for the valid value of the frame pointer, verify that it
kib [Thu, 16 Jul 2015 19:40:18 +0000 (19:40 +0000)]
When checking for the valid value of the frame pointer, verify that it
belongs to the kernel stack address range for the thread.  Right now,
code checks that new frame is not farther then KSTACK_PAGES pages from
the current frame, which allows the address to point past the top of
the stack.

Reviewed by: andrew, emaste, markj
Differential revision: https://reviews.freebsd.org/D3108
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agossh: canonicize the host name before looking it up in the host file
vangyzen [Thu, 16 Jul 2015 18:44:18 +0000 (18:44 +0000)]
ssh: canonicize the host name before looking it up in the host file

Re-apply r99054 by des in 2002.  This was accidentally dropped
by the update to OpenSSH 6.5p1 (r261320).

This change is actually taken from r387082 of
ports/security/openssh-portable/files/patch-ssh.c

PR: 198043
Differential Revision: https://reviews.freebsd.org/D3103
Reviewed by: des
Approved by: kib (mentor)
MFC after: 3 days
Relnotes: yes
Sponsored by: Dell Inc.

8 years agoAdd a sysentvec for CloudABI on x86-64.
ed [Thu, 16 Jul 2015 18:24:06 +0000 (18:24 +0000)]
Add a sysentvec for CloudABI on x86-64.

Summary:
For CloudABI we need to put two things on the stack of new processes:
the argument data (a binary blob; not strings) and a startup data
structure. The startup data structure contains interesting things such
as a pointer to the ELF program header, the thread ID of the initial
thread, a stack smashing protection canary, and a pointer to the
argument data.

Fetching system call arguments and setting the return value is similar
to FreeBSD. The only differences are that system call 0 does not exist
and that we call into cloudabi_convert_errno() to convert the error
code. We also need this function in a couple of other places, so we'd
better reuse it here.

Reviewers: dchagin, kib

Reviewed By: kib

Subscribers: imp

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

8 years agoDocument r285550, w(1) now displays the full IPv6 address of a remote
gjb [Thu, 16 Jul 2015 17:48:37 +0000 (17:48 +0000)]
Document r285550, w(1) now displays the full IPv6 address of a remote
connected host.

Sponsored by: The FreeBSD Foundation

8 years agoAdd an adapter CORE lock in the DDB hook em_dump_queue to avoid WITNESS
sbruno [Thu, 16 Jul 2015 16:32:57 +0000 (16:32 +0000)]
Add an adapter CORE lock in the DDB hook em_dump_queue to avoid WITNESS
panic in em_init_locked() while debugging.

MFC after: 2 weeks
Sponsored by: Limelight Networks

8 years agoOptimise the DWC OTG host mode driver's transmit path:
hselasky [Thu, 16 Jul 2015 16:08:40 +0000 (16:08 +0000)]
Optimise the DWC OTG host mode driver's transmit path:

1) Use the TX FIFO empty interrupts to poll the transmit FIFO usage,
instead of using own software counters and waiting for SOF
interrupts. Assume that enough FIFO space is available to execute one
USB OUT transfer of any kind when the TX FIFO is empty.

2) Use the host channel halted event to asynchronously wait for host
channels to be disabled instead of waiting for SOF interrupts. This
results in less turnaround time for re-using host channels and at the
same time increases the performance.

The network transmit performance measured by "iperf" for the "RPi-B v1
2011/12" board, increased from 45MBit/s to 65Mbit/s after applying the
changes above.

No regressions seen using:
 - High Speed (BULK, CONTROL, INTERRUPT)
 - Full Speed (All transfer types)
 - Low Speed (Control and Interrupt)

MFC after: 1 month
Submitted by: Daisuke Aoyama <aoyama@peach.ne.jp>

8 years agoFix a small typo: "the the".
ed [Thu, 16 Jul 2015 15:43:55 +0000 (15:43 +0000)]
Fix a small typo: "the the".

Spotted by: wblock

8 years agofd: partially deduplicate fdescfree and fdescfree_remapped
mjg [Thu, 16 Jul 2015 15:26:37 +0000 (15:26 +0000)]
fd: partially deduplicate fdescfree and fdescfree_remapped

This also moves vrele of cdir/rdir/jdir vnodes earlier, which should not
matter.

8 years agoGet rid of lim_update_thread and cred_update_thread.
mjg [Thu, 16 Jul 2015 14:30:11 +0000 (14:30 +0000)]
Get rid of lim_update_thread and cred_update_thread.

Their primary use was in thread_cow_update to free up old resources.
Freeing had to be done with proc lock held and _cow_ funcs already knew
how to free old structs.

8 years agovfs: implement v_holdcnt/v_usecount manipulation using atomic ops
mjg [Thu, 16 Jul 2015 13:57:05 +0000 (13:57 +0000)]
vfs: implement v_holdcnt/v_usecount manipulation using atomic ops

Transitions 0->1 and 1->0 (which decide e.g. on putting the vnode on the free
list) of either counter are still guarded with vnode interlock.

Reviewed by: kib (earlier version)
Tested by: pho

8 years agoSplit out the arm and armv6 parts of atomic.h to new files. While here use
andrew [Thu, 16 Jul 2015 13:33:03 +0000 (13:33 +0000)]
Split out the arm and armv6 parts of atomic.h to new files. While here use
__ARM_ARCH to determine which revision of the architecture is applicable.

Sponsored by: ABT Systems Ltd

8 years agoAdd a -s option which adds a column listing the connection state if
des [Thu, 16 Jul 2015 13:09:21 +0000 (13:09 +0000)]
Add a -s option which adds a column listing the connection state if
applicable (currently only for TCP).

PR: 201585
MFC after: 3 weeks

8 years agoFix warnings about unused functions for UP build.
kib [Thu, 16 Jul 2015 12:16:42 +0000 (12:16 +0000)]
Fix warnings about unused functions for UP build.

Sponsored by: The FreeBSD Foundation

8 years agoActually recognize all Intel Lynx Point devices we have device IDs for.
brueffer [Thu, 16 Jul 2015 11:14:59 +0000 (11:14 +0000)]
Actually recognize all Intel Lynx Point devices we have device IDs for.

PR: 195851
Submitted by: ftigeot@wolfpond.org
MFC after: 1 week

8 years agoFix KSTACK_PAGES issue when the default value was changed in KERNCONF
zbb [Thu, 16 Jul 2015 10:46:52 +0000 (10:46 +0000)]
Fix KSTACK_PAGES issue when the default value was changed in KERNCONF

If KSTACK_PAGES was changed to anything alse than the default,
the value from param.h was taken instead in some places and
the value from KENRCONF in some others. This resulted in
inconsistency which caused corruption in SMP envorinment.

Ensure all places where KSTACK_PAGES are used the opt_kstack_pages.h
is included.

The file opt_kstack_pages.h could not be included in param.h
because was breaking the toolchain compilation.

Reviewed by:   kib
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3094

8 years agoSet-up proper TCR values for memory related to Translation Table Walking
zbb [Thu, 16 Jul 2015 10:22:57 +0000 (10:22 +0000)]
Set-up proper TCR values for memory related to Translation Table Walking

This commit adds proper cache and shareability attributes to
the TCR register.
Set memory attributes to Normal, outer and inner cacheable WBWA.
Set shareability to inner and outer shareable when SMP is enabled.

Reviewed by:   andrew
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3093

8 years agoFix typo in register definition.
kevlo [Thu, 16 Jul 2015 08:03:23 +0000 (08:03 +0000)]
Fix typo in register definition.

Submitted by: James Hung
Reviewed by: sbruno

8 years agoImplement CloudABI's exec() call.
ed [Thu, 16 Jul 2015 07:05:42 +0000 (07:05 +0000)]
Implement CloudABI's exec() call.

Summary:
In a runtime that is purely based on capability-based security, there is
a strong emphasis on how programs start their execution. We need to make
sure that we execute an new program with an exact set of file
descriptors, ensuring that credentials are not leaked into the process
accidentally.

Providing the right file descriptors is just half the problem. There
also needs to be a framework in place that gives meaning to these file
descriptors. How does a CloudABI mail server know which of the file
descriptors corresponds to the socket that receives incoming emails?
Furthermore, how will this mail server acquire its configuration
parameters, as it cannot open a configuration file from a global path on
disk?

CloudABI solves this problem by replacing traditional string command
line arguments by tree-like data structure consisting of scalars,
sequences and mappings (similar to YAML/JSON). In this structure, file
descriptors are treated as a first-class citizen. When calling exec(),
file descriptors are passed on to the new executable if and only if they
are referenced from this tree structure. See the cloudabi-run(1) man
page for more details and examples (sysutils/cloudabi-utils).

Fortunately, the kernel does not need to care about this tree structure
at all. The C library is responsible for serializing and deserializing,
but also for extracting the list of referenced file descriptors. The
system call only receives a copy of the serialized data and a layout of
what the new file descriptor table should look like:

    int proc_exec(int execfd, const void *data, size_t datalen, const int *fds,
              size_t fdslen);

This change introduces a set of fd*_remapped() functions:

- fdcopy_remapped() pulls a copy of a file descriptor table, remapping
  all of the file descriptors according to the provided mapping table.
- fdinstall_remapped() replaces the file descriptor table of the process
  by the copy created by fdcopy_remapped().
- fdescfree_remapped() frees the table in case we aborted before
  fdinstall_remapped().

We then add a function exec_copyin_data_fds() that builds on top these
functions. It copies in the data and constructs a new remapped file
descriptor. This is used by cloudabi_sys_proc_exec().

Test Plan:
cloudabi-run(1) is capable of spawning processes successfully, providing
it data and file descriptors. procstat -f seems to confirm all is good.
Regular FreeBSD processes also work properly.

Reviewers: kib, mjg

Reviewed By: mjg

Subscribers: imp

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

8 years agoFix formatting.
jhibbits [Thu, 16 Jul 2015 05:14:20 +0000 (05:14 +0000)]
Fix formatting.

8 years agoFix userland program exception handling for powerpc64.
jhibbits [Thu, 16 Jul 2015 05:13:08 +0000 (05:13 +0000)]
Fix userland program exception handling for powerpc64.

It appears that the linker will not handle 64-bit relocations at addresses that
are not aligned to 8-byte boundaries.  Prior to this change the line:

  .llong generictrap

was aligned to a 4-byte address, and the linker replaced that with an 8-byte
0x0.  Aligning that address to 8 bytes caused the linker to generate the proper
relocation.  As a follow-through, the dblow from trap_subr33.S used the code
sequence 'lwz %r1, TRAP_GENTRAP(0)', so this reproduces the analogue of that for
64-bit.

8 years agoIf uart interrupts are not functioning then schedule the callout to do the
neel [Thu, 16 Jul 2015 04:15:22 +0000 (04:15 +0000)]
If uart interrupts are not functioning then schedule the callout to do the
polling at device attach time [1].

Add tunables 'debug.uart_force_poll' and 'debug.uart_poll_freq' to control
uart polling.

Submitted by: Aleksey Kuleshov (rndfax@yandex.ru) [1]

8 years agoFix a warning spotted by gcc4.9: dereferencing type-punned pointer will break
araujo [Thu, 16 Jul 2015 02:34:22 +0000 (02:34 +0000)]
Fix a warning spotted by gcc4.9: dereferencing type-punned pointer will break
strict-aliasing rules.

Declare some variables as statics as well as some functions that are internal
helpers. Update the function broadcast_result() to a post-K&R definition.

Differential Revision: D2690
Reviewed by: rodrigc, dim

8 years agoComment out usr/sbin/mailwrapper removal
ache [Thu, 16 Jul 2015 02:08:54 +0000 (02:08 +0000)]
Comment out usr/sbin/mailwrapper removal
because for no mailwrapper case we have:
/usr/sbin/sendmail -> /usr/sbin/mailwrapper
/usr/sbin/mailwrapper -> /usr/libexec/sendmail/sendmail
Add comment explaining it.

9 years agoDo not use atomic_swap_int(9), it is not available on all
kib [Wed, 15 Jul 2015 21:44:16 +0000 (21:44 +0000)]
Do not use atomic_swap_int(9), it is not available on all
architectures.  Atomic_cmpset_int(9) is a direct replacement, due to
loop.  The change fixes arm, arm64, mips an sparc64, which lack
atomic_swap().

Suggested and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agofix the docs, the number of frags per inode (NFPI) changed in r228794
jmg [Wed, 15 Jul 2015 21:35:09 +0000 (21:35 +0000)]
fix the docs, the number of frags per inode (NFPI) changed in r228794
to 2 from 4, but the man page didn't get updated...

other minor changes to make igor happy...

MFC after: 3 days

9 years agoFix trimming spaces writing at index -1 if an empty string is passed
bapt [Wed, 15 Jul 2015 18:49:15 +0000 (18:49 +0000)]
Fix trimming spaces writing at index -1 if an empty string is passed

Submitted by: Gennady Proskurin <gprspb@mail.ru>

9 years agoReset non-zero it_need indicator to zero atomically with fetching its
kib [Wed, 15 Jul 2015 17:36:35 +0000 (17:36 +0000)]
Reset non-zero it_need indicator to zero atomically with fetching its
current value.  It is believed that the change is the real fix for the
issue which was covered over by the r252683.

With the current code, if the interrupt handler sets it_need between
read and consequent reset, the update could be lost and
ithread_execute_handlers() would not be called in response to the lost
update.

The r252683 could have hide the issue since at the moment of commit,
atomic_load_acq_int() did locked cmpxchg on the variable, which puts
the cache line into the exclusive owned state and clears store
buffers.  Then the immediate store of zero has very high chance of
reusing the exclusive state of the cache line and make the load and
store sequence operate as atomic swap.

For now, add the acq+rel fence immediately after the swap, to not
disturb current (but excessive) ordering.  Acquire is needed for the
ih_need reads after the load, while release does not serve a useful
purpose [*].

Reviewed by: alc
Noted by: alc [*]
Discussed with: bde
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoStyle. Remove excessive brackets. Compare non-boolean with zero.
kib [Wed, 15 Jul 2015 17:14:05 +0000 (17:14 +0000)]
Style.  Remove excessive brackets.  Compare non-boolean with zero.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoFix an infinite loop when a node doesn't have an interrupt-parent property.
andrew [Wed, 15 Jul 2015 13:28:25 +0000 (13:28 +0000)]
Fix an infinite loop when a node doesn't have an interrupt-parent property.

Submitted by: Aleksey Kuleshov <rndfax@yandex.ru>
Differential Revision: https://reviews.freebsd.org/D3041

9 years agoMULTI_ID supported does not mean it is used.
mav [Wed, 15 Jul 2015 12:04:12 +0000 (12:04 +0000)]
MULTI_ID supported does not mean it is used.

9 years agoImplement the trivial socket system calls: shutdown() and listen().
ed [Wed, 15 Jul 2015 11:27:34 +0000 (11:27 +0000)]
Implement the trivial socket system calls: shutdown() and listen().

9 years agoAdd identify_cpu() to ARM64 init_secondary routine
zbb [Wed, 15 Jul 2015 09:24:45 +0000 (09:24 +0000)]
Add identify_cpu() to ARM64 init_secondary routine

Identify current CPU. This is necessary to setup
affinity registers and to provide support for
runtime chip identification.

Reviewed by:   andrew
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3095

9 years agoMake posix_fallocate() and posix_fadvise() work.
ed [Wed, 15 Jul 2015 09:14:06 +0000 (09:14 +0000)]
Make posix_fallocate() and posix_fadvise() work.

We can map these system calls directly to the FreeBSD counterparts. The
other filesystem related system calls will be sent out for review
separately, as they are a bit more complex to get right.

9 years agofix error message... errx since errno may not be set (if we didn't
jmg [Wed, 15 Jul 2015 06:14:04 +0000 (06:14 +0000)]
fix error message...  errx since errno may not be set (if we didn't
parse the full field), and err and errx add their own newline at the
end...

Sponsored by: Netflix, Inc.

9 years agoAdd a new option to gpart(8) to fix Lenovo BIOS boot issue
allanjude [Wed, 15 Jul 2015 02:23:55 +0000 (02:23 +0000)]
Add a new option to gpart(8) to fix Lenovo BIOS boot issue

PR: 184910
Reviewed by: ae, wblock
Approved by: marcel
MFC after: 3 days
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3065

9 years agoRevert inadvertent change to amd64/GENERIC.
pkelsey [Wed, 15 Jul 2015 01:04:54 +0000 (01:04 +0000)]
Revert inadvertent change to amd64/GENERIC.

9 years agoAdd netmap support for ixgbe SRIOV VFs (that is, to if_ixv).
pkelsey [Wed, 15 Jul 2015 01:02:01 +0000 (01:02 +0000)]
Add netmap support for ixgbe SRIOV VFs (that is, to if_ixv).

Differential Revision: https://reviews.freebsd.org/D2923
Reviewed by: erj, gnn
Approved by: jmallett (mentor)
Sponsored by: Norse Corp, Inc.

9 years agoRemove FreeBSD version check for deprecated M_FLOWID.
hiren [Wed, 15 Jul 2015 01:01:17 +0000 (01:01 +0000)]
Remove FreeBSD version check for deprecated M_FLOWID.

Reviewed by:     erj
Sponsored by:     Limelight Networks

9 years agoFix igxbe SRIOV VF (if_ixv) initialization bugs. The MAC address for
pkelsey [Wed, 15 Jul 2015 00:35:50 +0000 (00:35 +0000)]
Fix igxbe SRIOV VF (if_ixv) initialization bugs.  The MAC address for
an if_ixv instance can now set at creation time, and the receive ring
tail pointer is correctly initialized (previously, things still worked
because the receive ring tail pointer was being fixed up as a side
effect of other activity).

Differential Revision: https://reviews.freebsd.org/D2922
Reviewed by: erj, gnn
Approved by: jmallett (mentor)
Sponsored by: Norse Corp, Inc.

9 years agoRemove the r282727 entry for now, pending refinement based
gjb [Tue, 14 Jul 2015 23:41:13 +0000 (23:41 +0000)]
Remove the r282727 entry for now, pending refinement based
on feedback from andrew@ and ian@.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r279824, dtb module for AM335x systems.
gjb [Tue, 14 Jul 2015 21:45:51 +0000 (21:45 +0000)]
Document r279824, dtb module for AM335x systems.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278340, rpi.dtb installed into /boot/dtb for the
gjb [Tue, 14 Jul 2015 21:45:48 +0000 (21:45 +0000)]
Document r278340, rpi.dtb installed into /boot/dtb for the
Raspberry Pi by default.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278338, rpi.dtb module.
gjb [Tue, 14 Jul 2015 21:45:46 +0000 (21:45 +0000)]
Document r278338, rpi.dtb module.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r283514, sfxge(4) 7XXX-series NIC support.
gjb [Tue, 14 Jul 2015 21:45:43 +0000 (21:45 +0000)]
Document r283514, sfxge(4) 7XXX-series NIC support.
Add Solarflare Communications to sponsors.ent.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r282215, SIFTR kernel configuration option.
gjb [Tue, 14 Jul 2015 21:45:40 +0000 (21:45 +0000)]
Document r282215, SIFTR kernel configuration option.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r281495, PAE_TABLES option.
gjb [Tue, 14 Jul 2015 21:45:37 +0000 (21:45 +0000)]
Document r281495, PAE_TABLES option.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r273849, timeo, actimeo, noac, proto mount_nfs(8) options.
gjb [Tue, 14 Jul 2015 21:45:35 +0000 (21:45 +0000)]
Document r273849, timeo, actimeo, noac, proto mount_nfs(8) options.

Sponsored by: The FreeBSD Foundation

9 years agoFix the build after breaking it in r285549.
ed [Tue, 14 Jul 2015 20:45:24 +0000 (20:45 +0000)]
Fix the build after breaking it in r285549.

I performed the commit on a different system as where I wrote the
change. After pulling in the change from Phabricator, I didn't notice
that a single chunk did not apply.

Approved by: secteam (implicit, as intended change was approved)
Pointy hat to: me

9 years agoReword the r282731 entry.
gjb [Tue, 14 Jul 2015 20:10:16 +0000 (20:10 +0000)]
Reword the r282731 entry.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r279950, bzipfs support in EFI loader.
gjb [Tue, 14 Jul 2015 20:10:14 +0000 (20:10 +0000)]
Document r279950, bzipfs support in EFI loader.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r282731, ubldr is relocatable.
gjb [Tue, 14 Jul 2015 20:10:12 +0000 (20:10 +0000)]
Document r282731, ubldr is relocatable.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r282727, support for booting relocatable kernels extended
gjb [Tue, 14 Jul 2015 20:10:09 +0000 (20:10 +0000)]
Document r282727, support for booting relocatable kernels extended
beyond non-EFI systems.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277962, support for booting relocatable PowerPC kernels.
gjb [Tue, 14 Jul 2015 20:10:07 +0000 (20:10 +0000)]
Document r277962, support for booting relocatable PowerPC kernels.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277644, AUDMUX, SDMA, SSI support.
gjb [Tue, 14 Jul 2015 20:10:04 +0000 (20:10 +0000)]
Document r277644, AUDMUX, SDMA, SSI support.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r268838, support for Toradex Apalis i.MX6 board.
gjb [Tue, 14 Jul 2015 20:10:02 +0000 (20:10 +0000)]
Document r268838, support for Toradex Apalis i.MX6 board.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r266943, r267390: Support for Exynos 5420 and
gjb [Tue, 14 Jul 2015 20:09:59 +0000 (20:09 +0000)]
Document r266943, r267390: Support for Exynos 5420 and
SMP enabled by default.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277042, support to poweroff the BeagleBone Black via
gjb [Tue, 14 Jul 2015 20:09:57 +0000 (20:09 +0000)]
Document r277042, support to poweroff the BeagleBone Black via
shutdown(8) and poweroff(8) added.

Sponsored by: The FreeBSD Foundation

9 years agoMake bsdinstall's zfsboot script align partitions to 4k/1m when the user requests it
allanjude [Tue, 14 Jul 2015 19:57:10 +0000 (19:57 +0000)]
Make bsdinstall's zfsboot script align partitions to 4k/1m when the user requests it

PR: 195174
Reviewed by: darius
Approved by: brueffer
MFC after: 3 days
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3062

9 years agomdoc: minor Xr fixes
joel [Tue, 14 Jul 2015 19:45:35 +0000 (19:45 +0000)]
mdoc: minor Xr fixes

9 years agomdoc: add missing .El
joel [Tue, 14 Jul 2015 19:43:10 +0000 (19:43 +0000)]
mdoc: add missing .El

9 years agoSet a mountpoint on the root of the pool so user-created datasets have a mountpoint...
allanjude [Tue, 14 Jul 2015 19:42:40 +0000 (19:42 +0000)]
Set a mountpoint on the root of the pool so user-created datasets have a mountpoint to inherit

Reviewed by: darius
Approved by: brueffer
MFC after: 3 days
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3063

9 years agoHave bsdinstall's zfsboot script make /var/audit its own dataset, so it is not part...
allanjude [Tue, 14 Jul 2015 19:38:26 +0000 (19:38 +0000)]
Have bsdinstall's zfsboot script make /var/audit its own dataset, so it is not part of the OS boot environment

PR: 199864
Submitted by: Jason Unovitch
Approved by: brueffer
MFC after: 3 days
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D2861

9 years agoConvert atoi(3) to stronum(3) which allows to arguments and report proper errors
bapt [Tue, 14 Jul 2015 19:16:14 +0000 (19:16 +0000)]
Convert atoi(3) to stronum(3) which allows to arguments and report proper errors
to the users

Obtained from: OpenBSD

9 years agoAlso accept "ok" to enable a device, some vendor device trees use this when
andrew [Tue, 14 Jul 2015 19:11:16 +0000 (19:11 +0000)]
Also accept "ok" to enable a device, some vendor device trees use this when
they mean "okay"

9 years agoWiden the host field so that a full IPv6 address will be seen.
markm [Tue, 14 Jul 2015 18:53:24 +0000 (18:53 +0000)]
Widen the host field so that a full IPv6 address will be seen.

9 years agoImplement the CloudABI random_get() system call.
ed [Tue, 14 Jul 2015 18:45:15 +0000 (18:45 +0000)]
Implement the CloudABI random_get() system call.

The random_get() system call works similar to getentropy()/getrandom()
on OpenBSD/Linux. It fills a buffer with random data.

This change introduces a new function, read_random_uio(), that is used
to implement read() on the random devices. We can call into this
function from within the CloudABI compatibility layer.

Approved by: secteam
Reviewed by: jmg, markm, wblock
Obtained from: https://github.com/NuxiNL/freebsd
Differential Revision: https://reviews.freebsd.org/D3053

9 years agoFix some error-handling bugs when core dump compression is enabled:
markj [Tue, 14 Jul 2015 18:24:05 +0000 (18:24 +0000)]
Fix some error-handling bugs when core dump compression is enabled:
- Ensure that core dump parameters are initialized in the error path.
- Don't call gzio_fini() on a NULL stream.

Reported by: rpaulo

9 years agoFix another typo. Sigh.
gjb [Tue, 14 Jul 2015 17:01:55 +0000 (17:01 +0000)]
Fix another typo.  Sigh.

Submitted by: brueffer
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

9 years agoDocument r284125, cdce(4) support for RTL8153 chipset.
gjb [Tue, 14 Jul 2015 16:56:59 +0000 (16:56 +0000)]
Document r284125, cdce(4) support for RTL8153 chipset.

Submitted by: Ben Woods
Sponsored by: The FreeBSD Foundation

9 years agoFix typo.
gjb [Tue, 14 Jul 2015 15:38:45 +0000 (15:38 +0000)]
Fix typo.

Submitted by: matteo
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

9 years agoAdd a missing break statement, which made the code default to IPv6.
brueffer [Tue, 14 Jul 2015 15:24:50 +0000 (15:24 +0000)]
Add a missing break statement, which made the code default to IPv6.

PR: 201285
Submitted by: David Binderman
MFC after: 1 week

9 years ago.ie is not supposed to be used in manpages
bapt [Tue, 14 Jul 2015 15:21:00 +0000 (15:21 +0000)]
.ie is not supposed to be used in manpages

Submitted by: carsten.kunze@arcor.de

9 years agoRegenerate system call table for r285540.
ed [Tue, 14 Jul 2015 15:12:24 +0000 (15:12 +0000)]
Regenerate system call table for r285540.

9 years agoImplement thread_tcb_set() and thread_yield().
ed [Tue, 14 Jul 2015 15:11:50 +0000 (15:11 +0000)]
Implement thread_tcb_set() and thread_yield().

The first system call is used to set the user TLS address. Right now
this system call is invoked by the C library for both the initial thread
and additional threads unconditionally, but in the future we'll only
call this if the architecture does not support this. On recent x86-64
CPUs we could use the WRFSBASE instruction.

This system call was erroneously placed in sys/compat/cloudabi64, even
though it does not depend on any pointer size dependent datastructure.
Move it to the right place.

Obtained from: https://github.com/NuxiNL/freebsd

9 years agoImplement {,p}{read,write}{,v}().
ed [Tue, 14 Jul 2015 14:33:21 +0000 (14:33 +0000)]
Implement {,p}{read,write}{,v}().

Add a routine similar to copyinuio() and freebsd32_copyinuio() that
copies in CloudABI's struct iovecs. These are then translated into
FreeBSD format and placed in a 'struct uio', so we can call into the
kern_*() functions.

Obtained from: https://github.com/NuxiNL/freebsd

9 years agoCleanup; mostly language with a little bit of mdoc style.
brueffer [Tue, 14 Jul 2015 14:01:33 +0000 (14:01 +0000)]
Cleanup; mostly language with a little bit of mdoc style.

MFC after: 1 week

9 years agoSet memory to be inner-sharable. This isn't needed on device memory as the
andrew [Tue, 14 Jul 2015 12:37:47 +0000 (12:37 +0000)]
Set memory to be inner-sharable. This isn't needed on device memory as the
MMU will ignore the attribute there, howeverit simplifies to code to alwas
set it.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

9 years agoLet proc_raise() call into pksignal() directly.
ed [Tue, 14 Jul 2015 12:16:14 +0000 (12:16 +0000)]
Let proc_raise() call into pksignal() directly.

Summary:
As discussed with kib@ in response to r285404, don't call into
kern_sigaction() within proc_raise() to reset the signal to the default
action before delivery. We'd better do that during image execution.

Change the code to simply use pksignal(), so we don't waste cycles on
functions like pfind() to look up the currently running process itself.

Test Plan:
This change has also been pushed into the cloudabi branch on GitHub. The
raise() tests still seem to pass.

Reviewers: kib

Reviewed By: kib

Subscribers: imp

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

9 years agoFix secondary PIC initialization order
zbb [Tue, 14 Jul 2015 12:02:56 +0000 (12:02 +0000)]
Fix secondary PIC initialization order

Call arm_init_secondary before any other PIC-related functions
are called. This is necessary for GICv3 where PIC_INIT_SECONDARY
allocates resources needed for all further operations.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3066

9 years agoFix intr_machdep.c for ARM64
zbb [Tue, 14 Jul 2015 11:59:43 +0000 (11:59 +0000)]
Fix intr_machdep.c for ARM64

On ARMv8 IPIs are mapped to 0-15. Incrementing the number by 16
is wrong, because it sets a reserved bit in the IPI register.
This patch removes all "+16" to comply with specs.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3029

9 years agoUnbreak ggatec and ggatel on i386 after r238119, which added two more
brueffer [Tue, 14 Jul 2015 10:49:36 +0000 (10:49 +0000)]
Unbreak ggatec and ggatel on i386 after r238119, which added two more
'struct g_gate_ctl_create' fields.

While the behaviour was technically undefined on other architectures
as well, on the reporter's amd64 systems the uninitialized bytes the
kernel cares about were always zero so everything worked as expected.

PR: 197309, 199559
Submitted by: ota@j.email.ne.jp, Fabian Keil
Reviewed by: pjd
MFC after: 1 week

9 years agoSpell crypto correctly.
brueffer [Tue, 14 Jul 2015 10:47:56 +0000 (10:47 +0000)]
Spell crypto correctly.

9 years agoIf ggated's exports_find() fails, the connection is removed before
brueffer [Tue, 14 Jul 2015 09:25:10 +0000 (09:25 +0000)]
If ggated's exports_find() fails, the connection is removed before
(trying to) report the problem to the client.

sendfail() is called with an already closed socket and thus it
fails to inform the client about the problem.

Fix this by calling sendfail() before connection_remove().

PR: 195944
Submitted by: Fabian Keil
Reviewed by: pjd
MFC after: 1 week

9 years agoExpose full 32bit RSS hash from card regardless of whether RSS is defined or
hiren [Tue, 14 Jul 2015 09:13:18 +0000 (09:13 +0000)]
Expose full 32bit RSS hash from card regardless of whether RSS is defined or
not. When doing multiqueue, we are all setup to have full 32bit RSS hash from
the card. We do not need to hide that under "ifdef RSS" and should expose that
by default so others like lagg(4) can use that and avoid hashing the traffic by
themselves.

While here, delete the FreeBSD version check and use of deprecated M_FLOWID.

Reviewed by: adrian, erj
MFC after: 1 week
Sponsored by: Limelight Networks

9 years agocxgbe(4): Update T4 and T5 firmwares to 1.14.2.0.
np [Tue, 14 Jul 2015 08:02:05 +0000 (08:02 +0000)]
cxgbe(4): Update T4 and T5 firmwares to 1.14.2.0.

Obtained from: Chelsio Communications
MFC after: 3 days

9 years agoFix XTS, and name things a bit better...
jmg [Tue, 14 Jul 2015 07:45:18 +0000 (07:45 +0000)]
Fix XTS, and name things a bit better...

Though confusing, GCM using ICM_BLOCK_LEN, but ICM does not is
correct...  GCM is built on ICM, but uses a function other than
swcr_encdec...  swcr_encdec cannot handle partial blocks which is
why it must still use AES_BLOCK_LEN and is why XTS was broken by the
commit...

Thanks to the tests for helping sure I didn't break GCM w/ an earlier
patch...

I did run the tests w/o this patch, and need to figure out why they
did not fail, clearly more tests are needed...

Prodded by: peter

9 years agofix typos..
jmg [Tue, 14 Jul 2015 06:34:57 +0000 (06:34 +0000)]
fix typos..

Submitted by: brueffer

9 years agoPopulate hw.model with the CPU model information.
adrian [Tue, 14 Jul 2015 05:14:10 +0000 (05:14 +0000)]
Populate hw.model with the CPU model information.

Now you see something like:

# sysctl hw.model
hw.model: Atheros AR9330 rev 1

Tested:

* Carambola 2, AR9331 SoC

9 years agocryptodev is not needed for TCP_SIGNATURE...
jmg [Tue, 14 Jul 2015 05:09:58 +0000 (05:09 +0000)]
cryptodev is not needed for TCP_SIGNATURE...

Comment that cryptodev shouldn't be used unless you know what you're
doing...

The various arm/mips and one powerpc configs that have cryptodev in
them need to be addressed, audited if they provide benefit and removed
if they don't...

9 years agoFix cleanup race between unp_dispose and unp_gc
cem [Tue, 14 Jul 2015 02:00:50 +0000 (02:00 +0000)]
Fix cleanup race between unp_dispose and unp_gc

unp_dispose and unp_gc could race to teardown the same mbuf chains, which
can lead to dereferencing freed filedesc pointers.

This patch adds an IGNORE_RIGHTS flag on unpcbs marking the unpcb's RIGHTS
as invalid/freed. The flag is protected by UNP_LIST_LOCK.

To serialize against unp_gc, unp_dispose needs the socket object. Change the
dom_dispose() KPI to take a socket object instead of an mbuf chain directly.

PR: 194264
Differential Revision: https://reviews.freebsd.org/D3044
Reviewed by: mjg (earlier version)
Approved by: markj (mentor)
Obtained from: mjg
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division

9 years agoDocument r281440, psm(4) enhancements.
gjb [Tue, 14 Jul 2015 01:32:04 +0000 (01:32 +0000)]
Document r281440, psm(4) enhancements.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r275800, reaper facility.
gjb [Tue, 14 Jul 2015 01:32:02 +0000 (01:32 +0000)]
Document r275800, reaper facility.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r271918, fix for panic when destroying vnet jail with
gjb [Tue, 14 Jul 2015 01:31:59 +0000 (01:31 +0000)]
Document r271918, fix for panic when destroying vnet jail with
gre(4).

Sponsored by: The FreeBSD Foundation

9 years agoDocument r271917, fix for panic when destroying vnet jail with
gjb [Tue, 14 Jul 2015 01:31:57 +0000 (01:31 +0000)]
Document r271917, fix for panic when destroying vnet jail with
gif(4).

Sponsored by: The FreeBSD Foundation

9 years agoexec: textvp -> oldtextvp; binvp -> newtextvp
mjg [Tue, 14 Jul 2015 01:13:37 +0000 (01:13 +0000)]
exec: textvp -> oldtextvp; binvp -> newtextvp

This makes it consistent with the rest of the naming in do_execve.

No functional changes.

9 years agoexec plug a redundant vref + vrele of the image vnode
mjg [Tue, 14 Jul 2015 00:43:08 +0000 (00:43 +0000)]
exec plug a redundant vref + vrele of the image vnode

9 years agoracct: perform a lockless check for p_throttled
mjg [Mon, 13 Jul 2015 22:52:11 +0000 (22:52 +0000)]
racct: perform a lockless check for p_throttled

This reduces proc lock contention.

Reviewed by: trasz

9 years agoSwitch initiator IDs in target mode to the same address space as target
mav [Mon, 13 Jul 2015 21:01:24 +0000 (21:01 +0000)]
Switch initiator IDs in target mode to the same address space as target
IDs in initiator mode -- index in port database instead of handlers.

This makes initiator IDs persist across role changes and firmware resets,
when handlers previously assigned by firmware are lost and reused.

Sponsored by: iXsystems, Inc.

9 years agoDocument r272906, pfil(9) default hash change.
gjb [Mon, 13 Jul 2015 20:07:17 +0000 (20:07 +0000)]
Document r272906, pfil(9) default hash change.

Sponsored by: The FreeBSD Foundation