delphij [Thu, 1 Jun 2017 06:12:25 +0000 (06:12 +0000)]
* limit size of buffers to RPC_MAXDATASIZE
* don't leak memory
* be more picky about bad parameters
From:
https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt
https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt
via NetBSD.
Reviewed by: emaste, cem (earlier version)
Differential Revision: https://reviews.freebsd.org/D10922
MFC after: 3 days
rene [Thu, 1 Jun 2017 02:31:14 +0000 (02:31 +0000)]
Welcome back bapt@ to portmgr
jkim [Thu, 1 Jun 2017 00:01:19 +0000 (00:01 +0000)]
jkim [Wed, 31 May 2017 22:40:24 +0000 (22:40 +0000)]
stevek [Wed, 31 May 2017 21:31:15 +0000 (21:31 +0000)]
parse.c parse_string
When parse_semi fails, free s before returning
parse.c parse_numeric_aggregate
The memory assigned to bufp is complicated, it can either be from the input
parameter buf or allocated locally. Introduce a new variable lbufp to track
when it is assigned locally and to free it when appropriate.
Submitted by: Thomas Rix <trix@juniper.net>
Reviewed by: jhb
Approved by: sjg (mentor)
Obtained from: Juniper Networks, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9899
stevek [Wed, 31 May 2017 21:18:11 +0000 (21:18 +0000)]
Add MD_VERIFY option to enable O_VERIFY in open for vnode type.
Add -o [no]verify option to mdconfig (and document in man page.)
Implement GEOM attribute MNT::verified to ask md if the backing vnode is
verified.
Check for MNT::verified in cd9660 mount to flag the mount as MNT_VERIFIED if
the underlying device has been verified.
Reviewed by: rwatson
Approved by: sjg (mentor)
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D2902
hselasky [Wed, 31 May 2017 21:05:24 +0000 (21:05 +0000)]
Minor code optimisation.
Avoid locking the global CUSE lock when the polling flags are zero.
MFC after: 1 week
jkim [Wed, 31 May 2017 19:37:23 +0000 (19:37 +0000)]
MFV: r319352
Merge byacc
20170430.
ivadasz [Wed, 31 May 2017 19:20:27 +0000 (19:20 +0000)]
Fix typo in Driver Type A/C/D capability checks in sdhci.
Use the SDHCI_CAN_DRIVE_TYPE_A/_C/_D masks to check for Driver Type support,
instead of using the SDHCI_CTRL2_DRIVER_TYPE_A/_C/_D values which are meant
for setting the Driver Type in the HOST_CONTROL2 register.
Approved by: adrian (mentor), jmcneill
Differential Revision: https://reviews.freebsd.org/D10999
adrian [Wed, 31 May 2017 16:32:33 +0000 (16:32 +0000)]
[ar71xx] rename AR724X_BASE -> std.AR724X
emaste [Wed, 31 May 2017 16:28:29 +0000 (16:28 +0000)]
makefs: free buf in case of error
CID: 270190
Submitted by: Siva Mahadevan <smahadevan@freebsdfoundation.org>
Reported by: Coverity
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11011
hselasky [Wed, 31 May 2017 16:24:02 +0000 (16:24 +0000)]
Implement print_hex_dump(), print_hex_dump_bytes() and
printk_ratelimited() in the LinuxKPI.
While at it fix the inclusion guard of printk.h to be similar to the
rest of the LinuxKPI header files.
MFC after: 1 week
Sponsored by: Mellanox Technologies
hselasky [Wed, 31 May 2017 16:08:30 +0000 (16:08 +0000)]
Properly implement idr_preload() and idr_preload_end() in the
LinuxKPI.
MFC after: 1 week
Sponsored by: Mellanox Technologies
asomers [Wed, 31 May 2017 16:07:32 +0000 (16:07 +0000)]
Fix integer overflow detection in dd
dd(1) tried to detect whether the seek offset would overflow, but it failed
to account for the case where the provided argument was negative and the
file was a regular file (negative seeks are allowed for character devices).
I fixed it, and added a regression test.
Reported by: Coverity
CID: 1368659
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
hselasky [Wed, 31 May 2017 15:05:44 +0000 (15:05 +0000)]
Implement in_atomic() function in the LinuxKPI.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
asomers [Wed, 31 May 2017 14:59:03 +0000 (14:59 +0000)]
Fix integer overflow in "camcontrol format"
Reported by: Coverity
CID: 1011426
MFC after: 1 week
Sponsored by: Spectra Logic Corp
asomers [Wed, 31 May 2017 14:53:50 +0000 (14:53 +0000)]
Fix uninitialized variable in bootparamd.c
Restore line that was accidentally deleted in change 318790
Reported by: Coverity
CID: 1375855
MFC after: 1 week
X-MFC-With: 318790
Sponsored by: Spectra Logic Corp
hselasky [Wed, 31 May 2017 13:11:06 +0000 (13:11 +0000)]
Properly set the .d_name field in the cdevsw structure for the
LinuxKPI.
Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies
hselasky [Wed, 31 May 2017 13:07:05 +0000 (13:07 +0000)]
Make sure the VMAP's "vm_file" field is referenced in a Linux
compatible way by the linux_dev_mmap_single() function in the
LinuxKPI.
MFC after: 1 week
Sponsored by: Mellanox Technologies
hselasky [Wed, 31 May 2017 13:05:54 +0000 (13:05 +0000)]
Remove the VMA handle from its list before calling the LinuxKPI VMA
close operation to prevent other threads from reusing the VM object
handle pointer.
MFC after: 1 week
Sponsored by: Mellanox Technologies
hselasky [Wed, 31 May 2017 13:01:27 +0000 (13:01 +0000)]
Don't acquire a reference on the VM-space when allocating the LinuxKPI
task structure to avoid deadlock when tearing down the VM object
during a process exit.
Found by: markj @
MFC after: 1 week
Sponsored by: Mellanox Technologies
hselasky [Wed, 31 May 2017 12:08:25 +0000 (12:08 +0000)]
Fix a reference count leak in the LinuxKPI due to calling VM open when
it shouldn't be called.
Background:
The Linux VM open operation is called when a new VMA is
created on top of the current VMA. This is done through either mremap
flow or split_vma, usually due to mlock, madvise, munmap and so
on. This is currently not supported by the LinuxKPI.
MFC after: 1 week
Sponsored by: Mellanox Technologies
hselasky [Wed, 31 May 2017 12:02:59 +0000 (12:02 +0000)]
Fixes for refcounting "struct linux_file" in the LinuxKPI.
- Allow "struct linux_file" to be refcounted when its "_file" member
is NULL by using its "f_count" field. The reference counts are
transferred to the file structure when the file descriptor is
installed.
- Add missing vdrop() calls for error cases during open().
- Set the "_file" member of "struct linux_file" during open. This
allows use of refcounting through get_file() and fput() with LinuxKPI
character devices.
MFC after: 1 week
Sponsored by: Mellanox Technologies
hselasky [Wed, 31 May 2017 10:01:15 +0000 (10:01 +0000)]
Make sure the thread's priority is restored for all three cases inside
linux_synchronize_rcu_cb() in the LinuxKPI.
MFC after: 1 week
Sponsored by: Mellanox Technologies
ngie [Wed, 31 May 2017 08:01:12 +0000 (08:01 +0000)]
Update the usr.bin/mkimg golden test output files after ^/head@r319125
^/head@r319125 changed the location of the backup pmbr, requiring the
output files to be regenerated, since they're binary disk dumps.
The output files were regenerated with "make rebase"--fixed in
^/head@r319294.
MFC with: r319125, r319294
PR: 219673
Sponsored by: Dell EMC Isilon
ngie [Wed, 31 May 2017 07:49:49 +0000 (07:49 +0000)]
Fix "make rebase" after ^/head@r315776
"make rebase" can be used for rebasing the output files from mkimg
after making a change to mkimg. This will come in handy soon, per
bug 219673.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Wed, 31 May 2017 07:42:14 +0000 (07:42 +0000)]
Formalize the dependent/dependency relationship for <foo>.gz.uu vs <foo>
This helps ensure that the output files are regenerated if the input files
change, after the output files have been created.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
danfe [Wed, 31 May 2017 03:44:31 +0000 (03:44 +0000)]
- Add a simple example to uname(1) manual page to show how the hardware
platform (returned by -m) can be different from the machine's processor
architecture (-p)
- Document that make(1) sets universal MACHINE and MACHINE_ARCH variables
based on these values
Reviewed by: imp, manpages (bjk)
Approved by: bjk, imp (implied)
Differential Revision: https://reviews.freebsd.org/D10489
cy [Wed, 31 May 2017 03:11:25 +0000 (03:11 +0000)]
Remove NORESOLVE (-R) option from poollist() (ippool -l). It is not
used in poollist().
kib [Tue, 30 May 2017 21:20:54 +0000 (21:20 +0000)]
Fix bug in r318997: remove the line which overrides vn_fsid()
calculation.
Noted by: jhb
Reviewed by: rmacklem
Sponsored by: The FreeBSD Foundation
ngie [Tue, 30 May 2017 18:06:19 +0000 (18:06 +0000)]
Regenerate src.conf(5)
This contains a number of content changes due to src.opts.mk changes.
Sponsored by: Dell EMC Isilon
ngie [Tue, 30 May 2017 18:03:34 +0000 (18:03 +0000)]
Use .Xr to reference libblacklist(3), blacklistctl(8), and blacklistd(8)
MFC after: now
Sponsored by: Dell EMC Isilon
markj [Tue, 30 May 2017 17:16:08 +0000 (17:16 +0000)]
Add some miscellaneous definitions to support DRM drivers.
Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10985
emaste [Tue, 30 May 2017 15:51:48 +0000 (15:51 +0000)]
add a rescue/sh sanity check before installworld on the running system
FreeBSD does not guarantee kernel forward compatibility (that is,
running a newer userland on an older kernel). The documented upgrade
procedure specifies that installkernel should be performed, followed by
a reboot and then installworld. As a sanity check when installing onto
the running system (DESTDIR is / or unset), attempt to run "sh echo OK"
using rescue from the objdir. If rescue fails (e.g., because the system
has not been rebooted and the "old" kernel lacks a system call required
by the to-be-installed world), abort the installation.
This should avoid ino64 foot-shooting when the proper upgrade procedure
is not followed.
Reviewed by: allanjude, gjb, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10987
jtl [Tue, 30 May 2017 14:50:28 +0000 (14:50 +0000)]
Fix an unnecessary/incorrect check in the PKTOPT_EXTHDRCPY macro.
This macro allocates memory and, if malloc does not return NULL, copies
data into the new memory. However, it doesn't just check whether malloc
returns NULL. It also checks whether we called malloc with M_NOWAIT. That
is not necessary.
While it may be that malloc() will only return NULL when the M_NOWAIT flag
is set, we don't need to check for this when checking malloc's return
value. Further, in this case, the check was not completely accurate,
because it checked for flags == M_NOWAIT, rather than treating it as a bit
field and checking for (flags & M_NOWAIT).
Reviewed by: ae
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D10942
jtl [Tue, 30 May 2017 14:41:31 +0000 (14:41 +0000)]
Fix two places in the ICMP6 code where we could dereference a NULL pointer
in the icmp6_input() function.
When processing an ICMP6_ECHO_REQUEST, if IP6_EXTHDR_GET fails, it will
set nicmp6 and n to NULL. Therefore, we should condition our modification
to nicmp6 on n being not NULL.
And, when processing an ICMP6_WRUREQUEST in the (mode != FQDN) case, if
m_dup_pkthdr() fails, the code will set n to NULL. However, the very next
line dereferences n. Therefore, when m_dup_pkthdr() fails, we should
discontinue further processing and follow the same path as when m_gethdr()
fails.
Reported by: clang static analyzer
Reviewed by: ae
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D10941
jtl [Tue, 30 May 2017 14:32:44 +0000 (14:32 +0000)]
Enforce the limit on ICMP messages before doing work to formulate the
response.
Delete an unneeded rate limit for UDP under IPv6. Because ICMP6
messages have their own rate limit, it is unnecessary to apply a
second rate limit to UDP messages.
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D10387
avg [Tue, 30 May 2017 13:53:03 +0000 (13:53 +0000)]
fix indentation
MFC after: 4 days
zbb [Tue, 30 May 2017 12:00:56 +0000 (12:00 +0000)]
Introduce additional locks when releasing TX resources and buffers in ENA
There could be race condition with TX cleaning routine when cleaning mbufs,
when it was called directly from main sending thread (ena_mq_start).
Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon.com Inc.
Differential revision: https://reviews.freebsd.org/D10927
zbb [Tue, 30 May 2017 11:58:51 +0000 (11:58 +0000)]
Move ENA's hw stats updating routine to separate task
Initially, stats were being updated each time OS was requesting for
the first statistic.
To read statistics from hw, condvar was used. cv_timedwait cannot be
called when unsleepable lock is held, and this happens when FreeBSD
is requesting statistic.
Seperate task is reading statistics from NIC each 1 second.
Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon.com Inc.
Differential revision: https://reviews.freebsd.org/D10926
zbb [Tue, 30 May 2017 11:56:54 +0000 (11:56 +0000)]
Add error handling to the ENA driver if init of the reset task fails
Also, to simplify cleaning routine, reset task is initialized before
allocating statistics and other resources.
Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon.com Inc.
Differential revision: https://reviews.freebsd.org/D10925
zbb [Tue, 30 May 2017 11:55:02 +0000 (11:55 +0000)]
Add locks before each ena_up and ena_down
Lock only ena_up and ena_down calls in ioctl handler, instead of whole
ioctl. Locking ioctl with sx lock that is sleepable, is not allowed in
some cases, e.g. when multicast options are being changed.
Additional locking was added in deatch function to prevent race condition
with ioctl function.
Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon.com Inc.
Differential revision: https://reviews.freebsd.org/D10924
zbb [Tue, 30 May 2017 11:53:18 +0000 (11:53 +0000)]
Add mbuf defragmentation to the ENA driver
When mbuf chain is too long and device cannot handle that number
of segments in DMA transaction, mbuf chain will be defragmented.
Initially, driver was dropping all mbuf chains that were exceeding
supported number of segments.
Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon.com Inc.
Differential revision: https://reviews.freebsd.org/D10923
mjg [Tue, 30 May 2017 02:25:47 +0000 (02:25 +0000)]
mtx: fix whitespace damage in _mtx_trylock_flags_
MFC after: 3 days
wulf [Mon, 29 May 2017 20:43:00 +0000 (20:43 +0000)]
psm: add support for evdev protocol
Both relative and absolute multitouch modes are supported.
To enable psm(4) evdev support one should:
1. Add `device evdev` and `options EVDEV_SUPPORT` to kernel config file
2. Add hw.psm.elantech_support=1 or hw.psm.synaptics_support=1 to
/boot/loader.conf for activation of absolute mode on touchpads
3. Add kern.evdev.rcpt_mask=12 to /etc/sysctl.conf to enable psm event
sourcing and disable sysmouse
Reviewed by: gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D10265
Tested by: wulf, Jan Kokemueller (Lenovo devs)
kwm [Mon, 29 May 2017 20:27:31 +0000 (20:27 +0000)]
Also add libzfs and libmilter to the 64-bit inode library bump list.
Make the comment more generic.
Approved by: emaste@
kwm [Mon, 29 May 2017 20:11:27 +0000 (20:11 +0000)]
64-bit inode commit bumped libarchive library version, record the old one.
Approved by: emaste@
ngie [Mon, 29 May 2017 19:02:52 +0000 (19:02 +0000)]
:dnvlist_get_string__default_value: fix a bogus string comparison test
Check actual_value vs "5", not "5" vs itself.
MFC after: 3 days
Reported by: Coverity
CID: 1362021
Sponsored by: Dell EMC Isilon
ngie [Mon, 29 May 2017 18:49:28 +0000 (18:49 +0000)]
logarithm_test: assert that feclearexcept succeeds
This helps ensure that test preconditons are fulfilled.
MFC after: 3 days
Reported by: Coverity
CID: 1346572
Sponsored by: Dell EMC Isilon
ngie [Mon, 29 May 2017 18:45:10 +0000 (18:45 +0000)]
fma_test: mute a warning about unreachable code on amd64 by restructuring
the #ifdef block to only handle the rest of the logic in the loop in the
#else case.
MFC after: 3 days
Reported by: Coverity
CID: 1346844
Sponsored by: Dell EMC Isilon
ngie [Mon, 29 May 2017 18:39:28 +0000 (18:39 +0000)]
:nvlist_unpack__duplicate_key : check the result of nvlist_pack(3)
This fixes a potential NULL pointer dereference.
MFC after: 3 days
Reported by: Coverity
CID: 1362051
Sponsored by: Dell EMC Isilon
ngie [Mon, 29 May 2017 18:34:45 +0000 (18:34 +0000)]
lib/libnv/tests/dnv_test: fix memory leaks for memory allocated via
either strdup or one of the dnvlist* libcalls.
Reported by: Coverity
CID: 1362056-1362060
Sponsored by: Dell EMC Isilon
kib [Mon, 29 May 2017 13:38:26 +0000 (13:38 +0000)]
Document direct execution mode for rtld.
Reviewed by: emaste, jonathan (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D10826
kib [Mon, 29 May 2017 13:36:32 +0000 (13:36 +0000)]
Correct explanation of the dynamic tokens handling.
Reviewed by: emaste, jonathan
Sponsored by: The FreeBSD Foundation
X-Differential Revision: https://reviews.freebsd.org/D10826
emaste [Mon, 29 May 2017 13:10:01 +0000 (13:10 +0000)]
bsdgrep: bump version number and add Kyle Evans copyright
The following changes have been made over the last couple of months:
Features:
- With bsdgrep -r, the working directory is implied if no directory is
specified
- bsdgrep will now behave as bsdgrep -r does when it's named rgrep
- bsdgrep now understands -z/--null-data to use \0 as EOL
- GNU regex compatibility is now indicated with a "GNU compatible" in
the version string
Fixes:
- --mmap no longer hangs when coming across an EOF without an
accompanying EOL
- -o/--color matching generally improved, now produces earliest /
longest matches
- Context output now more closely aligns with GNU grep
- Zero-length matches no longer exhibit broken behavior
- Every output line now honors -b/-H/-n flags
Tests have been added for previous regressions as well as other
previously untested behaviors.
Various other fixes have been commited, and refactoring for further /
later improvements has taken place.
(The original submission changed the version string to 2.5.2, but I
decided to use 2.6.0 to reflect the addition of new features.)
Submitted by: Kyle Evans <kevans91@ksu.edu>
Differential Revision: https://reviews.freebsd.org/D10982
manu [Mon, 29 May 2017 12:51:02 +0000 (12:51 +0000)]
mkimg: Correct an off by one error in the PMBR size
The PMBR last sector should be number of sector - 1 (As stated in UEFI Spec
2.6 page 118 table 17).
This fixes warning printed by linux tools like parted or fdisk.
Sponsored by: Gandi.net
ae [Mon, 29 May 2017 09:30:38 +0000 (09:30 +0000)]
Disable IPsec debugging code by default when IPSEC_DEBUG kernel option
is not specified.
Due to the long call chain IPsec code can produce the kernel stack
exhaustion on the i386 architecture. The debugging code usually is not
used, but it requires a lot of stack space to keep buffers for strings
formatting. This patch conditionally defines macros to disable building
of IPsec debugging code.
IPsec currently has two sysctl variables to configure debug output:
* net.key.debug variable is used to enable debug output for PF_KEY
protocol. Such debug messages are produced by KEYDBG() macro and
usually they can be interesting for developers.
* net.inet.ipsec.debug variable is used to enable debug output for
DPRINTF() macro and ipseclog() function. DPRINTF() macro usually
is used for development debugging. ipseclog() function is used for
debugging by administrator.
The patch disables KEYDBG() and DPRINTF() macros, and formatting buffers
declarations when IPSEC_DEBUG is not present in kernel config. This reduces
stack requirement for up to several hundreds of bytes.
The net.inet.ipsec.debug variable still can be used to enable ipseclog()
messages by administrator.
PR: 219476
Reported by: eugen
No objection from: #network
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10869
wma [Mon, 29 May 2017 09:22:53 +0000 (09:22 +0000)]
Introduce Genesys GL3224 quirks
The Genesys chip is failing when issueing READ_CAP(16) command.
Force a quirk to disable it and use READ_CAP(10) instead.
Also, depending on used firmware, GL3224 can be recognized
either as 'storage device' or 'mass storage class' -
enable both variants in scsi_quirk_table.
Submitted by: Wojciech Macek <wma@semihalf.com>
Konrad Adamczyk <ka@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: mav
Differential revision: https://reviews.freebsd.org/D10902
wma [Mon, 29 May 2017 09:21:38 +0000 (09:21 +0000)]
Increase timeout in Atheros HAL
It turned out, that some models of the Atheros PCIe
adapters (e.g. AR983x family) may fail to attach
due to insufficient timeout value.
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: adrian
Differential revision: https://reviews.freebsd.org/D10903
wma [Mon, 29 May 2017 09:20:20 +0000 (09:20 +0000)]
Enable wireless Atheros cards in ARMADA38X
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Dominik Ermel <der@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10904
adrian [Mon, 29 May 2017 07:57:01 +0000 (07:57 +0000)]
[AP93] fix up the arge0/arge1 hints.
adrian [Mon, 29 May 2017 07:30:07 +0000 (07:30 +0000)]
[ar71xx] [ar724x] update to work
* add EARLY_PRINTF for debugging
* update module list to be much larger
* add random, otherwise well, stuff doesn't work.
* IPFIREWALL_DEFAULT_TO_ACCEPT
Tested:
* AP93 (AR7240 + AR9280)
TODO:
* rename to std.AR724X
* unify the built module list between all of the mips24k/mips74k atheros config files -
now that the HAL, hwpmc, USB, etc are per-chip/per-arch modules it is easy to just
compile them all and only include the ones you care about.
adrian [Mon, 29 May 2017 07:27:08 +0000 (07:27 +0000)]
Update AP93 support to the new world order.
* Map change: create a combined kernel+rootfs image. The instructions I'll post
on the wiki (which will be for a very outdated dev board, but at least will
explain the what/why for posterity) will include how to reset the boot command.
Tested:
* AP93 dev board (AR7240 + AR9280)
cy [Mon, 29 May 2017 07:15:28 +0000 (07:15 +0000)]
Revert r318789. It causes hanging NAT tcp sessions.
avg [Mon, 29 May 2017 06:30:34 +0000 (06:30 +0000)]
zfs_lookup: fix bogus arguments to lookup of "snapshot" directory
When a parent directory lookup is done at the root of a snapshot mounted
under .zfs/snapshot directory, we need to look up that directory in
the parent filesystem. We achieve that by doing a VOP_LOOKUP operation
on a .zfs vnode with "snapshot" as a target name. But previously we
also passed ISDOTDOT flag to the lookup and, because of that, the lookup
actually returned the parent of the .zfs vnode, that is, a root vnode of
the parent filesystem.
Reported by: lev
Tested by: lev
MFC after: 3 days
avos [Sun, 28 May 2017 22:51:06 +0000 (22:51 +0000)]
rtwn: fix connection problems with 'options RTWN_WITHOUT_UCODE'
sc_set_media_status() callback may involve some generic code in addition to
firmware-specific part (e.g., link status register setup for RTL8188E);
so, remove 'RTWN_WITHOUT_UCODE' ifdefs around it.
Tested with RTL8188CUS, RTL8188EU and RTL8821AU, STA mode.
avos [Sun, 28 May 2017 22:38:19 +0000 (22:38 +0000)]
rtwn_usb: fix build with 'options RTWN_WITHOUT_UCODE'
kib [Sun, 28 May 2017 21:42:47 +0000 (21:42 +0000)]
Mention that the basep argument to getdirentries(2) can be NULL.
Noted by: dim
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D10972
tsoome [Sun, 28 May 2017 21:30:01 +0000 (21:30 +0000)]
use the same option list for dhcp discovery and request
The DHCP client is supposed to use the same option request list for
both DHCP discovery and request.
This will also allow us to fill the list in single function.
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D10981
tsoome [Sun, 28 May 2017 21:20:55 +0000 (21:20 +0000)]
Small cleanup in dev_net.c
The variable servip is unused. One leftover printf and small cstyle nit.
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D10980
bapt [Sun, 28 May 2017 18:31:13 +0000 (18:31 +0000)]
Followup on the user-class changes
Reported by: Jose Luis Duran (via github)
trasz [Sun, 28 May 2017 18:13:44 +0000 (18:13 +0000)]
.Xr mount.conf(5) from boot(8).
MFC after: 2 weeks
trasz [Sun, 28 May 2017 18:09:49 +0000 (18:09 +0000)]
Fix Xrs; they were pointing to the wrong section.
MFC after: 2 weeks
trasz [Sun, 28 May 2017 18:07:53 +0000 (18:07 +0000)]
Move mount.conf(8) to mount.conf(5); it's a kernel configuration file
and not an administrative utility.
MFC after: 2 weeks
ngie [Sun, 28 May 2017 17:50:29 +0000 (17:50 +0000)]
Tweak r319058 slightly
- Specify an explicit mode when using O_CREAT per open(2).
- Fix the error message (add missing enclosing parentheses).
Submitted by: jilles
MFC after: 3 days
MFC with: r319058
Sponsored by: Dell EMC Isilon
pfg [Sun, 28 May 2017 17:48:54 +0000 (17:48 +0000)]
Fix potential memory leak.
Moving the allocation forward, just before it's actually needed, seems
sensible.
Add newline character at the last line while here.
Reported by: pluknet
Differential Revision: https://reviews.freebsd.org/D10974
trasz [Sun, 28 May 2017 17:25:47 +0000 (17:25 +0000)]
Declutter rctl(8) by moving kernel build instructions into newly
created rctl(4).
MFC after: 2 weeks
trasz [Sun, 28 May 2017 17:13:38 +0000 (17:13 +0000)]
Random tweaks to rctl(8).
MFC after: 2 weeks
trasz [Sun, 28 May 2017 17:02:29 +0000 (17:02 +0000)]
Minor tweaks to iscsi(4) and iscsid(8).
MFC after: 2 weeks
trasz [Sun, 28 May 2017 16:53:21 +0000 (16:53 +0000)]
Random tweaks to cfiscsi(4) man page.
MFC after: 2 weeks
trasz [Sun, 28 May 2017 16:41:42 +0000 (16:41 +0000)]
Make ctld(8) mention cfiscsi(4).
MFC after: 2 weeks
pfg [Sun, 28 May 2017 15:39:11 +0000 (15:39 +0000)]
Support for linux ext2fs posix-draft ACLs.
This is closely tied to the Extended Attribute implementation.
Submitted by: Fedor Uporov
Reviewed by: kevlo, pfg
Differential Revision: https://reviews.freebsd.org/D10807
mizhka [Sun, 28 May 2017 12:14:33 +0000 (12:14 +0000)]
[etherswitch] [rtl8366] add phy4cpu setting and support mdioproxy
Tested on WZR-HP-G301NH(RTL8366RB) and WZR-HP-G300NH(RTL8366SR).
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Differential Revision: https://reviews.freebsd.org/D10740
mizhka [Sun, 28 May 2017 12:05:16 +0000 (12:05 +0000)]
[mips] [bhnd] Support of old PMU for BMIPS and siba SoC
- Fix typo of PLL Type 4
- Don't panic of frequency getters
Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Differential Revision: https://reviews.freebsd.org/D10967
kib [Sun, 28 May 2017 09:29:53 +0000 (09:29 +0000)]
Update getdirentries(2) page for new struct dirent layout.
Sponsored by: The FreeBSD Foundation
ngie [Sun, 28 May 2017 09:21:28 +0000 (09:21 +0000)]
Send all of `data`, not just a portion of it
It was sending only a long's worth (4 or 8 bytes) of data previously
(instead of the entire buffer) via send(2).
MFC after: 1 week
Reported by: Coverity
CID: 1229966, 1229967, 1230004, 1230005
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 09:08:30 +0000 (09:08 +0000)]
Initial `srv` before using it in bind(2)
MFC after: 3 days
Reported by: Coverity
CID: 1357526
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 09:01:58 +0000 (09:01 +0000)]
Don't leak accept_fd on thread completion
MFC after: 3 days
Reported by: Coverity
CID: 1296068
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 08:57:08 +0000 (08:57 +0000)]
Use main(void) instead of main(argc __unused, argv __unused)
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 08:55:32 +0000 (08:55 +0000)]
Use an exit code of 1 instead of -1 for reasons noted in r319056
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 08:52:12 +0000 (08:52 +0000)]
Create a deterministic file in the kyua sandbox, instead of a
temporary file outside the kyua sandbox
This helps ensure that the file is removed at test exit, and as
a side effect, cures a warning about umasks with Coverity.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
dchagin [Sun, 28 May 2017 08:46:57 +0000 (08:46 +0000)]
In r246085 some bits that are MI movied out into headers in compat/linux,
but I missed that when I commited x86_64 Linuxulator. So remove the duplicates.
MFC after: 1 week
ngie [Sun, 28 May 2017 08:46:41 +0000 (08:46 +0000)]
tests/sys/file/ftruncate_test: use an exit code of 1 instead
of -1 with err*(3).
An exit code of -1 is implementation defined -- it's best to stick
with something well-defined (1).
MFC after: 3 days
Sponsored by: Dell EMC Isilon
adrian [Sun, 28 May 2017 07:44:55 +0000 (07:44 +0000)]
[ar71xx] undo read-after-write to flush; some bus devices dislike this.
This broke the PCI fixup on at least the AR7240 + AR9280 reference design
board that I have.
Tested:
* Atheros AP93 reference design - AR7240 + AR9280
ngie [Sun, 28 May 2017 07:40:42 +0000 (07:40 +0000)]
hostent_test_getaddrinfo_eq(..): call freeaddrinfo on `ai` when done
This plugs a leak of memory allocated via getaddrinfo.
MFC after: 1 week
Reported by: Coverity
CID: 1346866
Sponsored by: Dell EMC Isilon
dchagin [Sun, 28 May 2017 07:40:09 +0000 (07:40 +0000)]
On success, getrandom() Linux system call returns the number of bytes that
were copied to the buffer supplied by the user.
Also fix getrandom() if Linuxulator modules are built without the kernel.
PR: 219464
Submitted by: Maciej Pasternacki
Reported by: Maciej Pasternacki
MFC after: 1 week
dchagin [Sun, 28 May 2017 07:37:40 +0000 (07:37 +0000)]
Strip _binary_linux_locore_o_size from ${VDSO}.so as it is a low absolute
symbol, and this breaks symbol lookup in ddb.
Requested by: bde@
MFC after: 1 week
ngie [Sun, 28 May 2017 07:04:50 +0000 (07:04 +0000)]
hostent_test_getnameinfo_eq(..): initialize found_a_host to false
MFC after: 1 week
Reported by: Coverity
CID: 1368943
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 06:29:01 +0000 (06:29 +0000)]
Bump WARNS from 1 to 3 after recent commits to fix warnings in the
directory.
Tested with: clang 4.0, gcc 4.2.1, gcc 6.3.0
MFC after: 1 week
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 06:26:43 +0000 (06:26 +0000)]
Push `snapshot_file` copying down into run_tests function, and mark snapshot_file
const char *.
This fixes a bogus set of errors from gcc about strdup not being allowed a NULL
argument.
MFC after: 1 week
Sponsored by: Dell EMC Isilon