aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* loader: support com.delphix:removingToomas Soome2019-08-086-10/+139
| | | | | | | | | | | | 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
* Update to Zstandard 1.4.2Conrad Meyer2019-08-0874-2096/+3332
| | | | | | | | | | | | | | | 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
* 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
* 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
* Disable useless -Wformat-zero-lengthConrad Meyer2019-08-081-2/+4
| | | | | | | | | 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
* 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
* 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
* 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
* Use designated initializers for vmm_ops.Mark Johnston2019-08-072-32/+32
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=350696
* GEOM: Reduce unnecessary log interleaving with sbufsConrad Meyer2019-08-0771-361/+249
| | | | | | | | | | | | | | | 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-072-1/+53
| | | | | | | | | | | | | | 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-072-7/+10
| | | | | | | | | | | | 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
* Add cdceem(4) driver, for virtual ethernet devices compliantEdward Tomasz Napierala2019-08-0710-5/+1159
| | | | | | | | | | | | | | | | | 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
* Make `camcontrol modepage` support block descriptors.Alexander Motin2019-08-072-2/+4
| | | | | | | | | | | | | | | | | | | | It allows to read and write block descriptors alike to mode page parameters. It allows to change block size or short-stroke HDDs or overprovision SSDs. Depenting on -P parameter the change can be either persistent or till reset. In case of block size change device may need reformat after the setting. In case of SSD overprovisioning format or sanitize may be needed to really free the flash. During implementation appeared that csio_encode_visit() can not handle integers of more then 4 bytes, that makes 8-byte LBA handling awkward. I had to split it into two 4-byte halves now. MFC after: 1 week Relnotes: yes Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=350676
* Correct PCI device ID for XHCI USB controller.Hans Petter Selasky2019-08-071-1/+1
| | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=350675
* ofw: ofw_reg_to_paddr: Use a 256 static array for the cellEmmanuel Vadot2019-08-071-1/+2
| | | | | | | | | | | | | Some hardware needs more than 32, bump this value. We cannot use the _alloc for of getencprop as this function is called too early in the boot before pmap is initialized and we only have 2k of stack when cninit is called. Discussed with: ian Notes: svn path=/head/; revision=350674
* arm: dts: am33xx: Fix the region for uart0Emmanuel Vadot2019-08-071-1/+1
| | | | | | | | | | | | The region for uart0 is declared to be 0x2000 in size but the parent node only declare 0x1000. As the parent only declare a size of 0x1000 in the ranges for it's children this cause the device to not be mappable. https://patchwork.kernel.org/patch/11056769/ Notes: svn path=/head/; revision=350673
* Expose zlib's utility functions in Z_SOLO library when building kernel.Xin LI2019-08-0715-48/+50
| | | | | | | | | | | | This allows kernel code to reuse zlib's implementation. PR: 229763 Reviewed by: Yoshihiro Ota <ota j email ne jp> Relnotes: yes Differential Revision: https://reviews.freebsd.org/D21156 Notes: svn path=/head/; revision=350670
* fusefs: merge from projects/fuse2Alan Somers2019-08-0718-2171/+4312
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit imports the new fusefs driver. It raises the protocol level from 7.8 to 7.23, fixes many bugs, adds a test suite for the driver, and adds many new features. New features include: * Optional kernel-side permissions checks (-o default_permissions) * Implement VOP_MKNOD, VOP_BMAP, and VOP_ADVLOCK * Allow interrupting FUSE operations * Support named pipes and unix-domain sockets in fusefs file systems * Forward UTIME_NOW during utimensat(2) to the daemon * kqueue support for /dev/fuse * Allow updating mounts with "mount -u" * Allow exporting fusefs file systems over NFS * Server-initiated invalidation of the name cache or data cache * Respect RLIMIT_FSIZE * Try to support servers as old as protocol 7.4 Performance enhancements include: * Implement FUSE's FOPEN_KEEP_CACHE and FUSE_ASYNC_READ flags * Cache file attributes * Cache lookup entries, both positive and negative * Server-selectable cache modes: writethrough, writeback, or uncached * Write clustering * Readahead * Use counter(9) for statistical reporting PR: 199934 216391 233783 234581 235773 235774 235775 PR: 236226 236231 236236 236291 236329 236381 236405 PR: 236327 236466 236472 236473 236474 236530 236557 PR: 236560 236844 237052 237181 237588 238565 Reviewed by: bcr (man pages) Reviewed by: cem, ngie, rpokala, glebius, kib, bde, emaste (post-commit review on project branch) MFC after: 3 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Pull Request: https://reviews.freebsd.org/D21110 Notes: svn path=/head/; revision=350665
| * fusefs: remove superfluous counter_u64_zeroAlan Somers2019-08-064-5/+0
| | | | | | | | | | | | | | | | Reported by: glebius Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350621
| * fusefs: fix the build after r350446Alan Somers2019-07-311-0/+1
| | | | | | | | | | | | | | | | | | fuse needs to include an additional header after r350446 Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350489
| * Bump __FreeBSD_versionAlan Somers2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | r350437 presents a merge conflict with r350115, which raised __FreeBSD_version due to the addition of fusefs's intr/nointr mount options. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350456
| * MFHead @350453Alan Somers2019-07-3031-2316/+218
| |\ | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350454
| * \ MFHead @350426Alan Somers2019-07-3036-218/+502
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350435
| * \ \ MFHead @350390Alan Somers2019-07-281-3/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350391
| * | | | fusefs: fix panic when writing with O_DIRECT and using writeback cacheAlan Somers2019-07-281-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a fusefs file system is mounted using the writeback cache, the cache may still be bypassed by opening a file with O_DIRECT. When writing with O_DIRECT, the cache must be invalidated for the affected portion of the file. Fix some panics caused by inadvertently invalidating too much. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350388
| * | | | MFHead @r350386Alan Somers2019-07-28382-5408/+14728
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/fuse2/; revision=350387
* | | | | | Fix LOCAL_MODULES and improve the make output.John Baldwin2019-08-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The exists() check guarding the invocation of ls was not working correctly as it was expanding '$L' to determine the path of the local modules directory. Fix by using {} around the variable name. Inline some of the logic from bsd.subdir.mk when invoking local module builds. This gives output in 'make buildkernel' the same as if there was a Makefile in /usr/local/sys/modules with SUBDIR = ${LOCAL_MODULES}. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20991 Notes: svn path=/head/; revision=350664
* | | | | | Cache kernel stacks in UMA. This gives us NUMA support, better concurrency,Jeff Roberson2019-08-065-139/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and more statistics. Reviewed by: kib, markj Tested by: pho Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20931 Notes: svn path=/head/; revision=350663
* | | | | | Detect invalid PCI devices more correctly in PCI interrupt router drivers.John Baldwin2019-08-062-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Check for an invalid device (vendor is invalid) before reading the header type register when examining function 0 of a possible device. - When iterating over functions of a device, reject any device whose 16-bit vendor is invalid rather than requiring the full 32-bit vendor+device to be all 1's. In practice the latter check is probably fine, but checking the vendor is what the PCI spec recommends. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21147 Notes: svn path=/head/; revision=350662
* | | | | | Implement a MINBUCKET zone flag so we can use minimal caching on zones thatJeff Roberson2019-08-062-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | may be expensive to cache. Reviewed by: markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20930 Notes: svn path=/head/; revision=350661
* | | | | | Add two new kernel options to control memory locality on NUMA hardware.Jeff Roberson2019-08-066-43/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - UMA_XDOMAIN enables an additional per-cpu bucket for freed memory that was freed on a different domain from where it was allocated. This is only used for UMA_ZONE_NUMA (first-touch) zones. - UMA_FIRSTTOUCH sets the default UMA policy to be first-touch for all zones. This tries to maintain locality for kernel memory. Reviewed by: gallatin, alc, kib Tested by: pho, gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20929 Notes: svn path=/head/; revision=350659
* | | | | | ral: rt2860: fix wcid2ni access/size issueKyle Evans2019-08-062-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RT2860_WCID_MAX is supposed to describe the max STA index for wcid2ni, and was instead being used as the size -- off-by-one. rt2860_drain_stats_fifo was range-checking wcid only after accessing out-of-bounds potentially. Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (basically) Obtained from: Haiku (58d16d9fe2d5a209cf22823359a8407d138e1a87) Differential Revision: 3 days Notes: svn path=/head/; revision=350657
* | | | | | Ignore UFS/FFS superblock check hash failures so as to allow a higherKirk McKusick2019-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | level in the filesystem stack to decide what to do about them. Reported by: Peter Holm Tested by: Peter Holm Sponsored by: Netflix Notes: svn path=/head/; revision=350653