dim [Tue, 30 May 2017 19:24:09 +0000 (19:24 +0000)]
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304222, and update
build glue.
dim [Tue, 30 May 2017 17:37:44 +0000 (17:37 +0000)]
Vendor import of clang trunk r304222:
https://llvm.org/svn/llvm-project/cfe/trunk@304222
dim [Tue, 30 May 2017 17:37:31 +0000 (17:37 +0000)]
Vendor import of llvm trunk r304222:
https://llvm.org/svn/llvm-project/llvm/trunk@304222
dim [Mon, 29 May 2017 22:25:56 +0000 (22:25 +0000)]
Add one more file to libllvm.
dim [Mon, 29 May 2017 22:25:33 +0000 (22:25 +0000)]
Merge ^/head r318964 through r319164.
dim [Mon, 29 May 2017 22:09:23 +0000 (22:09 +0000)]
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.
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
dim [Mon, 29 May 2017 16:26:10 +0000 (16:26 +0000)]
Vendor import of libc++ trunk r304149:
https://llvm.org/svn/llvm-project/libcxx/trunk@304149
dim [Mon, 29 May 2017 16:25:46 +0000 (16:25 +0000)]
Vendor import of clang trunk r304149:
https://llvm.org/svn/llvm-project/cfe/trunk@304149
dim [Mon, 29 May 2017 16:25:25 +0000 (16:25 +0000)]
Vendor import of llvm trunk r304149:
https://llvm.org/svn/llvm-project/llvm/trunk@304149
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
mmel [Sun, 28 May 2017 06:13:38 +0000 (06:13 +0000)]
Implement sincos, sincosf, and sincosl.
The primary benefit of these functions is that argument
reduction is done once instead of twice in independent
calls to sin() and cos().
* lib/msun/Makefile:
. Add s_sincos[fl].c to the build.
. Add sincos.3 documentation.
. Add appropriate MLINKS.
* lib/msun/Symbol.map:
. Expose sincos[fl] symbols in dynamic libm.so.
* lib/msun/man/sincos.3:
. Documentation for sincos[fl].
* lib/msun/src/k_sincos.h:
. Kernel for sincos() function. This merges the individual kernels
for sin() and cos(). The merger offered an opportunity to re-arrange
the individual kernels for better performance.
* lib/msun/src/k_sincosf.h:
. Kernel for sincosf() function. This merges the individual kernels
for sinf() and cosf(). The merger offered an opportunity to re-arrange
the individual kernels for better performance.
* lib/msun/src/k_sincosl.h:
. Kernel for sincosl() function. This merges the individual kernels
for sinl() and cosl(). The merger offered an opportunity to re-arrange
the individual kernels for better performance.
* lib/msun/src/math.h:
. Add prototytpes for sincos[fl]().
* lib/msun/src/math_private.h:
. Add RETURNV macros. This is needed to reset fpsetprec on I386
hardware for a function with type void.
* lib/msun/src/s_sincos.c:
. Implementation of sincos() where sin() and cos() were merged into
one routine and possibly re-arranged for better performance.
* lib/msun/src/s_sincosf.c:
. Implementation of sincosf() where sinf() and cosf() were merged into
one routine and possibly re-arranged for better performance.
* lib/msun/src/s_sincosl.c:
. Implementation of sincosl() where sinl() and cosl() were merged into
one routine and possibly re-arranged for better performance.
PR: 215977, 218300
Submitted by: Steven G. Kargl <sgk@troutmask.apl.washington.edu>
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D10765
ngie [Sun, 28 May 2017 05:31:18 +0000 (05:31 +0000)]
Fix a -Wunused-but-set-variable warning reported by gcc 6.3.0
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 05:26:45 +0000 (05:26 +0000)]
Fix -Wunused and -Wshadow warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:43:02 +0000 (04:43 +0000)]
getgr_test: fix -Wunused warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:41:06 +0000 (04:41 +0000)]
getpw_test: fix -Wunused warnings
- Mark unused parameters __unused.
- Put dump_passwd under DEBUG as it's only used in that case.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:34:57 +0000 (04:34 +0000)]
gethostby_test: fix multiple warning types
- Fix -Wmissing-declaration warning by staticizing run_tests.
- Fix -Wsign-compare warnings by casting size_t types to int
for comparisons.
Reindent some of the code in sdump_hostent(..) to accomodate the
overall changes.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:15:57 +0000 (04:15 +0000)]
getproto_test: fix -Wunused warnings
Mark unused parameters __unused in functions.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:15:05 +0000 (04:15 +0000)]
getrpc_test: fix -Wunused warnings
- Mark unused function parameters unused.
- Remove an unused function prototype.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:12:52 +0000 (04:12 +0000)]
getserv_test: mark unused parameters __unused to fix corresponding
warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:12:02 +0000 (04:12 +0000)]
getusershell_test: mark mdata parameter in compare_usershell __unused
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:11:04 +0000 (04:11 +0000)]
getaddrinfo_test: mark unused function parameters __unused to fix -Wunused
warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:05:19 +0000 (04:05 +0000)]
getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:04:32 +0000 (04:04 +0000)]
getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:03:45 +0000 (04:03 +0000)]
getaddrinfo_test: fix -Wsign-compare warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 04:03:06 +0000 (04:03 +0000)]
getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 03:58:36 +0000 (03:58 +0000)]
getusershell_test: staticize run_tests(..) to fix warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 03:47:58 +0000 (03:47 +0000)]
Fix -Wsign-compare warnings
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 03:42:49 +0000 (03:42 +0000)]
Staticize functions and remove unused variables to aid with bumping WARNS
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 03:39:24 +0000 (03:39 +0000)]
Sort make variables to suit style.Makefile(5)
This is being done prior to functional changes.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 02:55:04 +0000 (02:55 +0000)]
lib/libc/tests/nss: use calloc appropriately
The pattern used prior to this commit was `calloc(1, n * sizeof(type))`;
the pattern that should be used however is `calloc(n, sizeof(type))`.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sun, 28 May 2017 02:15:57 +0000 (02:15 +0000)]
pw: add some basic testcases for groupshow and usershow
- groupshow: test out -a/-g/-n .
- usershow: test out -a/-n/-u .
MFC after: 1 week
Sponsored by: Dell EMC Isilon
vangyzen [Sun, 28 May 2017 00:45:28 +0000 (00:45 +0000)]
Fix INSTALL_AS_USER with external nsswitch databases
The INSTALL_AS_USER option tells "install" to use the current
user name as the owner of the installed file. The "install"
command executed by the build is statically linked, so it does not
load nsswitch modules, such as nss_ldap.so, so it fails when
the user is only defined in such a database.
Fix it to use the current UID instead of user name. This works
for all users. I expect it is also slightly more efficient.
Reviewed by: sjg
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10862
vangyzen [Sun, 28 May 2017 00:43:12 +0000 (00:43 +0000)]
Fix INSTALL_AS_USER
Move INSTALL_AS_USER into bsd.init.mk to maximize the chance that
it has final authority over fooOWN and fooGRP.
Reviewed by: sjg
MFC after: 3 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10810
ngie [Sun, 28 May 2017 00:28:11 +0000 (00:28 +0000)]
Remove getpagesize(3) error checking added in r317312
getpagesize(3) no longer fails as of r317436.
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sat, 27 May 2017 23:57:09 +0000 (23:57 +0000)]
Use calloc instead of malloc + memset
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Sat, 27 May 2017 23:23:22 +0000 (23:23 +0000)]
Fix #if conditional added in r319008
I committed an earlier version of the file by accident
This is a no-op on ^/head and ^/stable/11.
MFC after: now
Sponsored by: Dell EMC Isilon
ngie [Sat, 27 May 2017 23:19:32 +0000 (23:19 +0000)]
kvm_geterr_test: Compile out the portions that require kvm_open2(3) on
systems that lack the libcall, based on __FreeBSD_version.
kvm_open2(3) wasn't made available until r291406, which is in ^/stable/11,
but not ^/stable/10. This makes some of kvm_geterr_test available for testing
on ^/stable/10.
MFC after: now
Sponsored by: Dell EMC Isilon
ngie [Sat, 27 May 2017 22:40:20 +0000 (22:40 +0000)]
:rgrep : use atf-check to check the exit code/save the output of grep -r instead
of calling grep -r without it, and saving the output to a file
This ensures that any errors thrown via grep -r are caught, not lost, and uses
existing atf-sh idioms for saving files.
Tested with: bsdgrep, gnu grep (base, ports)
Sponsored by: Dell EMC Isilon
alc [Sat, 27 May 2017 21:46:00 +0000 (21:46 +0000)]
After r118390, the variable "dmmax" was neither the correct strip size
nor the correct maximum block size. Moreover, after r318995, it serves
no purpose except to provide information to user space through a read-
sysctl.
This change eliminates the variable "dmmax" but retains the sysctl. It
also corrects the value returned by the sysctl.
Reviewed by: kib, markj
MFC after: 3 days
pfg [Sat, 27 May 2017 20:01:50 +0000 (20:01 +0000)]
Align text correctly by using tabs instead of spaces.
The text was copy-pasted from the lines that carry the bogus spaces.
This is a non-functional change.
bapt [Sat, 27 May 2017 18:46:00 +0000 (18:46 +0000)]
Update the comments concerning net_parse_rootpath to reflect what it is now
really doing
Reported by: rgrimes
Reviewed by: rgrimes
Differential Revision: https://reviews.freebsd.org/D10959
cy [Sat, 27 May 2017 18:01:14 +0000 (18:01 +0000)]
Fix return value of ip_sync_nat. Previously, regardless of error it
always returned a return code of 0.
Obtained from: NetBSD ip_sync.c r1.5
MFC after: 1 week
kib [Sat, 27 May 2017 17:00:30 +0000 (17:00 +0000)]
Use whole mnt_stat.f_fsid bits for st_dev.
Since ino64 expanded dev_t to 64bit, make VOP_GETATTR(9) provide all
bits of mnt_stat.f_fsid as va_fsid for vnodes on filesystems which use
f_fsid. In particular, NFSv3 and sometimes NFSv4, and ZFS use this
method or reporting st_dev by stat(2).
Provide a new helper vn_fsid() to avoid duplicating code to copy
f_fsid to va_fsid.
Note that the change is mostly cosmetic. Its motivation is to avoid
sign-extension of f_fsid[0] into 64bit dev_t value which happens after
dev_t becomes 64bit..
Reviewed by: avg(zfs), rmacklem (nfs) (both for previous version)
Sponsored by: The FreeBSD Foundation
jhb [Sat, 27 May 2017 16:53:39 +0000 (16:53 +0000)]
Add descriptions for AES-GCM IPSec authentication (AH) counters.
MFC after: 1 week
Sponsored by: Chelsio Communications
alc [Sat, 27 May 2017 16:40:00 +0000 (16:40 +0000)]
In r118390, the swap pager's approach to striping swap allocation over
multiple devices was changed. However, swapoff_one() was not fully and
correctly converted. In particular, with r118390's introduction of a per-
device blist, the maximum swap block size, "dmmax", became irrelevant to
swapoff_one()'s operation. Moreover, swapoff_one() was performing out-of-
range operations on the per-device blist that were silently ignored by
blist_fill().
This change corrects both of these problems with swapoff_one(), which will
allow us to potentially increase MAX_PAGEOUT_CLUSTER. Previously,
swapoff_one() would panic inside of blist_fill() if you increased
MAX_PAGEOUT_CLUSTER.
Reviewed by: kib, markj
MFC after: 3 days