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
bapt [Sat, 27 May 2017 14:07:46 +0000 (14:07 +0000)]
Catch with the change in the user class
bapt [Sat, 27 May 2017 14:06:57 +0000 (14:06 +0000)]
Use the usual FreeBSD spelling for the DHCP user class
Reported by: lidl
bapt [Sat, 27 May 2017 13:55:20 +0000 (13:55 +0000)]
Capitalize DHCP
Reported by: danfe
bapt [Sat, 27 May 2017 13:26:18 +0000 (13:26 +0000)]
Document recent changes on pxeboot
bapt [Sat, 27 May 2017 12:46:46 +0000 (12:46 +0000)]
Partially revert r314948
While it sounds like a good idea to extract the RFC1048 data from PXE, in the
end it is not and it is causing lots of issues. Our pxeloader might need
options which are incompatible with other pxe servers (for example iPXE, but
not only).
Our pxe loaders are also now settings their own user class, so it is useful to
issue our own pxe request at startup
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10953
bapt [Sat, 27 May 2017 12:35:01 +0000 (12:35 +0000)]
Always issue the pxe request
All the code are now only issueing one single dhcp request at startup of the
loader meaning we can always request a the PXE informations from the
dhcp server.
Previous code lost that information, meaning no option 55 anymore (meaning not
working with the kea dhcp server) and no request for rootpath etc, no user class
Remove the flags from the bootp function which is not needed anymore
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10952
bapt [Sat, 27 May 2017 12:20:13 +0000 (12:20 +0000)]
Always build tftpfs support along with nfs for pxeboot
This change was already done for loader.efi
bapt [Sat, 27 May 2017 12:06:52 +0000 (12:06 +0000)]
Support URI scheme for root-path in netbooting
Rather that previous attempts to add tftpfs support at the same time as NFS
support. This time decide on a proper URI parser rather than hacks.
root-path can now be define the following way:
For tftpfs:
tftp://ip/path
tftp:/path (this one will consider the tftp server is the same as the one where
the pxeboot file was fetched from)
For nfs:
nfs:/path
nfs://ip/path
The historical
ip:/path
/path
are kept on NFS
Reviewed by: tsoom, rgrimes
Differential Revision: https://reviews.freebsd.org/D10947
bapt [Sat, 27 May 2017 11:41:54 +0000 (11:41 +0000)]
add a comment on vendor index 19 and 20 to avoid confusion
Suggested by: tsoome
bapt [Sat, 27 May 2017 10:50:35 +0000 (10:50 +0000)]
Pass a "FREEBSD" user-class in PXE dhcp request
rfc3004 allows to pass multiple user classes on dhcp requests
this is used by dhcp servers to differentiate the caller if needed.
As an example with isc dhcp server it will be possible to make options
only for the FreeBSD loaders:
if exists user-class and option user-class = "FREEBSD" {
option root-path "tftp://192.168.42.1/FreeBSD;
}
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D10951
delphij [Sat, 27 May 2017 06:24:06 +0000 (06:24 +0000)]
Tighten /entropy permissions.
PR: 219527
Reported by: Lu Tung-Pin <lutungpin at openmailbox.org>
Submitted by: jilles
MFC after: 3 days
emaste [Sat, 27 May 2017 02:07:22 +0000 (02:07 +0000)]
uart: add AMT SOL PCI ID
I adjusted the description to be similar to existing AMT entries.
PR: 219384
Submitted by: "Tooker"
MFC after: 1 week
np [Sat, 27 May 2017 02:05:21 +0000 (02:05 +0000)]
libcxgb4: Use memcpy instead of copying WRs 8B at a time in the userspace
RDMA library for cxgbe(4).
MFC after: 3 days
Sponsored by: Chelsio Communications
mav [Fri, 26 May 2017 22:22:48 +0000 (22:22 +0000)]
Call VLAN_CAPABILITIES() when LAGG capabilities change.
This makes VLAN on top of LAGG to expose proper capabilities if they are
changed after creation.
MFC after: 1 week
cem [Fri, 26 May 2017 22:17:44 +0000 (22:17 +0000)]
procstat(1): Add TCP socket send/recv buffer size
Add TCP socket send and receive buffer size to procstat -f output.
Reviewed by: kib, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D10689
brooks [Fri, 26 May 2017 21:10:01 +0000 (21:10 +0000)]
Add missing usage and getopt(3) options
- Add the missing option 'n' to the getopt(3) string
- Add the missing options 'libxo' and 'N' to the usage message
- Add the missing options 'M' and 'N' to the man-page
Submitted by: Keegan Drake H.P. <kdrakehp@zoho.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D10915
jhb [Fri, 26 May 2017 20:20:40 +0000 (20:20 +0000)]
Fail large requests with EFBIG.
The adapter firmware in general does not accept PDUs larger than 64k - 1
bytes in size. Sending crypto requests larger than this size result in
hangs or incorrect output, so reject them with EFBIG. For requests
chaining an AES cipher with an HMAC, the firmware appears to require
slightly smaller requests (around 512 bytes).
Sponsored by: Chelsio Communications
mav [Fri, 26 May 2017 20:15:33 +0000 (20:15 +0000)]
Improve applying unified capabilities to the lagg ports.
Some NICs have some capabilities dependent, so that disabling one require
disabling some other (TXCSUM/RXCSUM on em). This code tries to reach the
consensus more insistently.
PR: 219453
MFC after: 1 week
avg [Fri, 26 May 2017 17:44:47 +0000 (17:44 +0000)]
Allow PROBE_SPINUP to fail in CAM ATA transport
The motivation for this is two-fold.
1. Some old WD SATA disks may appear as if they need to be spun up
when they are already spinning. Those disks would respond with
an error to the spin-up request.
2. Even if we really fail to spin up the disk, we still can try to
proceed to the subsequent phases. If we fail later on, then no
difference. Otherwise we get a chance to communicate with the
disk which is better than completely ignoring it, because a user
can try to recover the disk.
Reviewed by: mav
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D10896