aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* loader: support com.delphix:removingToomas Soome2019-08-0812-34/+846
| | | | | | | | | | | | We should support removing vdev from boot pool. Update loader zfs reader to support com.delphix:removing. Reviewed by: allanjude MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18901 Notes: svn path=/head/; revision=350772
* First pass at a LINT for arm64.Warner Losh2019-08-082-0/+250
| | | | | | | | | | | Create a rough and ready NOTES file from GENERIC, remove the duplication from sys/conf/NOTES and add relevant no* directives to make this compile. Reviewed by: jhb, manu (earlier versions that differed only in comments) Differential Revision: https://reviews.freebsd.org/D21184 Notes: svn path=/head/; revision=350766
* Make arm64 32-bit mode compile with COMPAT_43Warner Losh2019-08-081-0/+28
| | | | | | | | | | | | | | | | The COMPAT_43 option isn't quite like the other compat options, and arm64 makes attempts to support it in 64-bit mode. In 32-bit compat mode, however, two syscall implementations that COMPAT_FREEBSD32 assumes will be there are missing. Provide implementations for these: ofreebsd32_sigreturn (which we'll never encounter, so implement it as nosys as is done in kern_sig.c) and ofreebsd32_getpagesize, where we'll always return 4096 since that's the only PAGE_SIZE we support, similar to how the ia32 implementation does things. Reviewed by: manu@ Differential Revision: https://reviews.freebsd.org/D21192 Notes: svn path=/head/; revision=350764
* Verify files loaded in chain command.Marcin Wojtas2019-08-082-0/+16
| | | | | | | | | | | | | | | | The chain command can be used to chain load another binary. If veriexec is enabled we should verify it first. Note that on EFI systems the verification was already done through firmware, assuming that Secure Boot was enabled there. Submitted by: Kornel Duleba <mindal@semihalf.com> Reviewed by: sjg MFC after: 1 week Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D20952 Notes: svn path=/head/; revision=350761
* Update to Zstandard 1.4.2Conrad Meyer2019-08-0875-2096/+3347
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The full release notes for 1.4.1 (skipped) and 1.4.2 can be found on Github: https://github.com/facebook/zstd/releases/tag/v1.4.1 https://github.com/facebook/zstd/releases/tag/v1.4.2 These are mostly minor updates; 1.4.1 purportedly brings something like 7% faster decompression speed. Relnotes: yes Notes: svn path=/head/; revision=350760
| * import zstd 1.4.2vendor/zstd/1.4.2Conrad Meyer2019-08-0824-606/+877
| | | | | | | | | | Notes: svn path=/vendor/zstd/dist/; revision=350754 svn path=/vendor/zstd/1.4.2/; revision=350755; tag=vendor/zstd/1.4.2
| * import zstd 1.4.1vendor/zstd/1.4.1Conrad Meyer2019-08-0862-1505/+2458
| | | | | | | | | | Notes: svn path=/vendor/zstd/dist/; revision=350752 svn path=/vendor/zstd/1.4.1/; revision=350753; tag=vendor/zstd/1.4.1
* | Fix mac_veriexec_parser build after r347938Marcin Wojtas2019-08-081-1/+3
| | | | | | | | | | | | | | | | | | | | In r347938 the definition of mac_veriexec_metadata_add_file so adjust the argument list accordingly. Submitted by: Kornel Duleba <mindal@semihalf.com> Notes: svn path=/head/; revision=350759
* | Fix stack grow for init.Konstantin Belousov2019-08-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During early stages of kern_exec(), including strings copyout, p_textvp for init is NULL. This prevented stack grow from working for init execution. Without stack gap enabled, initial stack segment size is enough for strings passed by kernel to init. With the gap enabled, the used address might fall out of the initial segment, which kills init. Exclude initproc from the check for contexts which should not cause stack grow in the target map. Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=350758
* | Update comment explaining create_init().Konstantin Belousov2019-08-081-5/+3
| | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=350757
* | mips: Fix register target for SP setting in libprocJustin Hibbits2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | Copy-paste-o from r233042 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D21188 Notes: svn path=/head/; revision=350756
* | Add TCP_RFC7413Warner Losh2019-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | We should be linting this This isn't enabled on all platforms, but compiles on them all. Noticed by: jhb in another review Notes: svn path=/head/; revision=350751
* | armv8crypto: add missing unlock for session (after r336439)Ed Maste2019-08-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | Attempts to use cryptodev (e.g. tests at /usr/src/tests/sys/opencrypto with armv8crypto added to the module lists) were causing a panic. Submitted by: Greg V <greg_unrelenting.technology> Differential Revision: https://reviews.freebsd.org/D21012 Notes: svn path=/head/; revision=350750
* | Rename IPPROTO 33 from SEP to DCCPTom Jones2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPPROTO 33 is DCCP in the IANA Registry: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml IPPROTO_SEP was added about 20 years ago in r33804. The entries were added straight from RFC1700, without regard to whether they were used. The reference in RFC1700 for SEP is '[JC120] <mystery contact>', this is an indication that the protocol number was probably in use in a private network. As RFC1700 is no longer the authoritative list of internet numbers and that IANA assinged 33 to DCCP in RFC4340, change the header to the actual authoritative source. Reviewed by: Richard Scheffenegger, bz Approved by: bz (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21178 Notes: svn path=/head/; revision=350749
* | frag6: move public structure into file local space.Bjoern A. Zeeb2019-08-082-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move ip6asfrag and the accompanying IP6_REASS_MBUF macro from ip6_var.h into frag6.c as they are not used outside frag6.c. Sadly struct ip6q is all over the mac framework so we have to leave it public. This reduces the public KPI space. MFC after: 3 months X-MFC: possibly MFC the #define only to stable branches Sponsored by: Netflix Notes: svn path=/head/; revision=350748
* | frag6.c: cleanup varaibles and return statements.Bjoern A. Zeeb2019-08-081-41/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consitently put () around return values. Do not assign variables at the time of variable declaration. Sort variables. Rename ia to ia6, remove/reuse some variables used only once or twice for temporary calculations. No functional changes intended. MFC after: 3 months Sponsored by: Netflix Notes: svn path=/head/; revision=350747
* | frag6.c: initial comment and whitespace cleanup.Bjoern A. Zeeb2019-08-081-71/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup some comments (start with upper case, ends in punctuation, use width and do not consume vertical space). Update comments to RFC8200. Some whitespace changes. No functional changes. MFC after: 3 months Sponsored by: Netflix Notes: svn path=/head/; revision=350746
* | Fix a typo.Michael Tuexen2019-08-081-1/+1
| | | | | | | | | | | | | | | | Submitted by: Thomas Dreibholz MFC after: 1 week Notes: svn path=/head/; revision=350745
* | Convert DDB_CTF to use newer version of ZLIB.Xin LI2019-08-083-22/+2
| | | | | | | | | | | | | | | | | | PR: 229763 Submitted by: Yoshihiro Ota <ota j email ne jp> Differential Revision: https://reviews.freebsd.org/D21176 Notes: svn path=/head/; revision=350744
* | Update bxe(4) to use new zlib.Xin LI2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | PR: 229763 Submitted by: Yoshihiro Ota <ota j email ne jp> Differential Revision: https://reviews.freebsd.org/D21175 Notes: svn path=/head/; revision=350743
* | Update geom_uzip to use new zlib:Xin LI2019-08-082-32/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use new zlib headers; - Removed z_alloc and z_free to use the common sys/dev/zlib version. - Replace z_compressBound with compressBound from zlib. While there, limit LZMA CFLAGS to apply only for g_uzip_lzma.c. PR: 229763 Submitted by: Yoshihiro Ota <ota j email ne jp> (with changes, bugs are mine) Differential Revision: https://reviews.freebsd.org/D20271 Notes: svn path=/head/; revision=350742
* | Ordinarily, during a superpage promotion or demotion within a pmap, theAlan Cox2019-08-082-36/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pmap's lock ensures that other operations on the pmap don't observe the old mapping being broken before the new mapping is established. However, pmap_kextract() doesn't acquire the kernel pmap's lock, so it may observe the broken mapping. And, if it does, it returns an incorrect result. This revision implements a lock-free solution to this problem in pmap_update_entry() and pmap_kextract() because pmap_kextract() can't acquire the kernel pmap's lock. Reported by: andrew, greg_unrelenting.technology Reviewed by: andrew, markj Tested by: greg_unrelenting.technology X-MFC with: r350579 Differential Revision: https://reviews.freebsd.org/D21169 Notes: svn path=/head/; revision=350741
* | r350739 try #2Conrad Meyer2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | For some inexplicable reason, C++ compilers reject the -Wno- flag, and also (ab)use CWARNFLAGS. Reported by: imp Notes: svn path=/head/; revision=350740
* | Disable useless -Wformat-zero-lengthConrad Meyer2019-08-082-2/+7
| | | | | | | | | | | | | | | | | | It is part of -Wformat, which is enabled by -Wall. Empty format strings are well defined and it is perfectly reasonable to expect them in a formatting interface. Notes: svn path=/head/; revision=350739
* | powerpc/pmap: Minor optimizations to 64-bit booke pmapJustin Hibbits2019-08-081-19/+7
| | | | | | | | | | | | | | | | Don't recalculate the VM page of the page table pages, just pass them down to free. Also, use the pmap's page zero function instead of bzero(). Notes: svn path=/head/; revision=350738
* | Change autounmountd(8) to use time_t for duration instead of doubleJustin Hibbits2019-08-081-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: autounmountd(8) uses doubles to handle mount time durations. However, it must convert to integer types, time_t in particular, to do anything meaningful. Additionally, even though it's a floating-point value in seconds, the sub-seconds component is never used, so it's unnecessary. Switching type to time_t fixes an assertion on powerpc64, which checks that a sleep value that's not -1.0 is greater than 0. On powerpc64, it happens that the value of -1.0 gets loaded as a float (perhaps a bug in gcc), but gets compared to a double. This compares as false, so follows through the 'sleep != -1.0' path, and fails the assert. Since the sub-second component isn't used in the double, just drop it and deal with whole-integer seconds. Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D21109 Notes: svn path=/head/; revision=350737
* | Fix !DDB kernel configurations after r350713Conrad Meyer2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | KDB is standard and the kdb_active variable is always available. So, de-conditionalize inclusion of sys/kdb.h in kern_sysctl.c. Reported by: Michael Butler <imb AT protected-networks.net> X-MFC-With: r350713 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=350715
* | Follow r350693 to add a link for sbuf_nl_terminate(9)Li-Wen Hsu2019-08-081-0/+1
| | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350714
* | ddb(4): Add 'sysctl' commandConrad Meyer2019-08-081-2/+536
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement `sysctl` in `ddb` by overriding `SYSCTL_OUT`. When handling the req, we install custom ddb in/out handlers. The out handler prints straight to the debugger, while the in handler ignores all input. This is intended to allow us to print just about any sysctl. There is a known issue when used from ddb(4) entered via 'sysctl debug.kdb.enter=1'. The DDB mode does not quite prevent all lock interactions, and it is possible for the recursive Giant lock to be unlocked when the ddb(4) 'sysctl' command is used. This may result in a panic on return from ddb(4) via 'c' (continue). Obviously, this is not a problem when debugging already-paniced systems. Submitted by: Travis Lane (formerly: <travis.lane AT isilon.com>) Reviewed by: vangyzen (earlier version), Don Morris <dgmorris AT earthlink.net> Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20219 Notes: svn path=/head/; revision=350713
* | rc.8: fix a typo in r350701Andriy Gapon2019-08-071-1/+1
| | | | | | | | | | | | | | | | | | I wronlgy expected that igor(1) checks spelling of all words. MFC after: 1 week Notes: svn path=/head/; revision=350702
* | rc.8: add a reference to service(8)Andriy Gapon2019-08-071-4/+10
| | | | | | | | | | | | | | | | | | | | | | While here: - use Xr macro for a reference to sysrc(8) - clarify that rc.shutdown invokes rc.d scripts with "faststop" argument MFC after: 1 week Notes: svn path=/head/; revision=350701
* | Get configuration variable with default value for not breaking default settingLi-Wen Hsu2019-08-071-5/+5
| | | | | | | | | | | | | | | | Reported by: markj Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350700
* | Remove the fuse.ko -> fusefs.ko symlinkAlan Somers2019-08-071-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On FreeBSD 13.0, the fuse driver will always be known as fusefs. The backwards compatibility symlink will still be used for stable/12 and stable/11, though. Reported by: jhibbits Reviewed by: rgrimes, imp, cem MFC after: Never Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21181 Notes: svn path=/head/; revision=350698
* | Fix a possible segfault in wcsxfrm(3) and wcsxfrm_l(3).Dimitry Andric2019-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the length of the source wide character string, passed in via the "size_t n" parameter, is set to zero, the function should only return the required length for the destination wide character string. In this case, it should *not* attempt to write to the destination, so the "dst" parameter is permitted to be NULL. However, when the internally called _collate_wxfrm() function returns an error, such as when using the "C" locale, as a fallback wcscpy(3) or wcsncpy(3) are used. But if the input length is zero, wcsncpy(3) will be called with a length of -1! If the "dst" parameter is NULL, this will immediately result in a segfault, or if "dst" is a valid pointer, it will most likely result in unexpectedly overwritten memory. Fix this by explicitly checking for an input length greater than zero, before calling wcsncpy(3). Note that a similar situation does not occur in strxfrm(3), the plain character version of this function, as it uses strlcpy(3) for the error case. The strlcpy(3) function does not write to the destination if the input length is zero. MFC after: 1 week Notes: svn path=/head/; revision=350697
* | Use designated initializers for vmm_ops.Mark Johnston2019-08-072-32/+32
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=350696
* | cap_filergs: limit size of the file nameMariusz Zaborski2019-08-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The limit of the name in fileargs is twice the size of the MAXPATH. The nvlist will not add an element with the longer name. We can detect at this point that the path is too big, and simple return the same error as open(2) would. PR: 239700 Reported by: markj Tested by: markj MFC after: 2 weeks Notes: svn path=/head/; revision=350695
* | GEOM: Reduce unnecessary log interleaving with sbufsConrad Meyer2019-08-0773-368/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to what was done for device_printfs in r347229. Convert g_print_bio() to a thin shim around g_format_bio(), which acts on an sbuf; documented in g_bio.9. Reviewed by: markj Discussed with: rlibby Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21165 Notes: svn path=/head/; revision=350694
* | sbuf(9): Add sbuf_nl_terminate() APIConrad Meyer2019-08-073-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is used to gracefully terminate text line(s) with a single \n. If the formatted buffer was empty or already ended in \n, it is unmodified. Otherwise, a newline character is appended to it. The API, like other sbuf-modifying routines, is only valid while the sbuf is not FINISHED. Reviewed by: rlibby Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21030 Notes: svn path=/head/; revision=350693
* | sbuf(9): Refactor sbuf_newbuf into sbuf_newConrad Meyer2019-08-071-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Code flow was somewhat difficult to read due to the combination of multiple return sites and the 4x possible dynamic constructions of an sbuf. (Future consideration: do we need all 4?) Refactored slightly to improve legibility. No functional change. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=350692
* | sbuf(9): Add NOWAIT dynamic buffer extension modeConrad Meyer2019-08-073-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | The goal is to avoid some kinds of low-memory deadlock when formatting heap-allocated buffers. Reviewed by: vangyzen Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21015 Notes: svn path=/head/; revision=350691
* | resource.h is sufficient here, no need for resoursevar.h.Gleb Smirnoff2019-08-071-1/+1
| | | | | | | | Notes: svn path=/head/; revision=350688
* | Add cdceem(4) driver, for virtual ethernet devices compliantEdward Tomasz Napierala2019-08-0716-6/+1285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with Communication Device Class Ethernet Emulation Model (CDC EEM). The driver supports both the device, and host side operation; there is a new USB template (#11) for the former. This enables communication with virtual USB NIC provided by iLO 5, as found in new HPE Proliant servers. Reviewed by: hselasky MFC after: 2 weeks Relnotes: yes Sponsored by: Hewlett Packard Enterprise Notes: svn path=/head/; revision=350685
* | More places to clarify the robustness guarantees.Konstantin Belousov2019-08-073-9/+9
| | | | | | | | | | | | | | | | Wording submitted by: Martin Simmons <martin@lispworks.com> MFC after: 3 days Notes: svn path=/head/; revision=350684
* | Clarify the robustness guarantees.Konstantin Belousov2019-08-072-6/+6
| | | | | | | | | | | | | | | | Wording submitted by: Martin Simmons <martin@lispworks.com> MFC after: 3 days Notes: svn path=/head/; revision=350683
* | Correct the location of the first backup superblock in fsck_ffs.8.Kirk McKusick2019-08-072-1/+7
| | | | | | | | | | | | | | | | | | | | | | Make a note in the newfs.8 manual page to update the first backup superblock location when changing the default fragment size for the filesystem. Reported by: O. Hartmann Notes: svn path=/head/; revision=350682
* | Update RELNOTES for the fusefs rewriteAlan Somers2019-08-071-0/+20
| | | | | | | | | | | | | | | | MFC after: Never Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350681
* | RELNOTES: fix formatting from r350482Alan Somers2019-08-071-2/+2
| | | | | | | | | | | | | | | | MFC after: Never Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350680
* | Merge r3780 from elftoolchain.Mark Johnston2019-08-071-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | Adjust argc and argv by optind before using them. This slightly simplifies the code. No functional change intended. MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21079 Notes: svn path=/head/; revision=350679
* | Enable nvme on aarch64Warner Losh2019-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | Don't mark nvme as broken on aarch64. It compiles, at least, and people are testing it out. This only enables the userland parts of the nvme stack. Submitted by: greg at unrelenting technologies Differential Revision: https://reviews.freebsd.org/D21168 Notes: svn path=/head/; revision=350678
* | Make GCC happy about math in r350676.Alexander Motin2019-08-071-4/+1
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=350677