aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MFV r323794: 8605 zfs channel programs: zfs.exists undocumented and non-workingAndriy Gapon2017-10-012-1/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@5f39f884e2035d671ec02148fc4d8420c670bcb4 https://github.com/illumos/illumos-gate/commit/5f39f884e2035d671ec02148fc4d8420c670bcb4 https://www.illumos.org/issues/8605 zfs.exists() in channel programs doesn't return any result, and should have a man page entry. Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Chris Williamson <chris.williamson@delphix.com> MFC after: 5 weeks X-MFC after: r324163 Notes: svn path=/head/; revision=324170
* | Work around bcm283x silicon bugs to make i2c repeat-start work for the mostIan Lepore2017-10-013-58/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | common case where it's needed -- a write followed by a read to the same slave. The i2c controller in this chip only performs complete transfers, it does not provide control over start/repeat-start/stop operations on the bus. Thus, we have gotten a full stop/start sequence rather than a repeat-start when doing a typical i2c slave access of "write address, read data". Some i2c slave devices require a repeat-start to work correctly. These changes cause the controller to do a repeat-start by pre-staging the read parameters in the controller registers immediate after the controller has latched the values for the initial write operation, but before any bytes are actually written. With the values pre-staged, when the write portion of the transfer completes, the state machine in the silicon sees a new start operation already staged and that causes it to perform a repeat-start. The key to tricking the buggy hardware into doing this is to avoid prefilling any output data in the transmit FIFO so that it is possible to catch the silicon in the state where transmit values are latched but the transmit isn't completed yet. Notes: svn path=/head/; revision=324169
* | MFV r323531: 8521 nvlist memory leak in get_clones_stat() and spa_load_best()Andriy Gapon2017-10-012-3/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@7d3000f774e20097a1ee45cbd06d0e38065ddd5a https://github.com/illumos/illumos-gate/commit/7d3000f774e20097a1ee45cbd06d0e38065ddd5a https://www.illumos.org/issues/8521 Yuri reported this to the mailing list: doing a `reboot -d` on current illumos-gate HEAD gives the following ":: findleaks -dv" output: findleaks: maximum buffers => 301061 findleaks: actual buffers => 297587 findleaks: findleaks: potential pointers => 29289774 findleaks: dismissals => 26242305 (89.5%) findleaks: misses => 331153 ( 1.1%) findleaks: dups => 2419681 ( 8.2%) findleaks: follows => 296635 ( 1.0%) findleaks: findleaks: peak memory usage => 7353 kB findleaks: elapsed CPU time => 1.5 seconds findleaks: elapsed wall time => 2.0 seconds findleaks: CACHE LEAKED BUFCTL CALLER ffffff03d222b008 120 ffffff03ef7ceb78 nv_alloc_sys+0x1f ffffff03d222a448 123 ffffff03f4150cc8 nv_alloc_sys+0x1f ffffff03d222b448 5 ffffff03f28bd598 nv_alloc_sys+0x1f ffffff03d222b888 87 ffffff03f28c10f0 nv_alloc_sys+0x1f ffffff03d222c008 21 ffffff03f4139310 nv_alloc_sys+0x1f ffffff03d222b888 43 ffffff040ef3f3e8 nv_alloc_sys+0x1f ffffff03d222c008 120 ffffff03f4591e58 nv_alloc_sys+0x1f ffffff03d222b008 121 ffffff03f352c068 nv_alloc_sys+0x1f ffffff03d222a448 112 ffffff03f414e5f8 nv_alloc_sys+0x1f ffffff03d222b008 119 ffffff03ee92fdc0 nv_alloc_sys+0x1f ffffff03d222b888 46 ffffff03f28c1378 nv_alloc_sys+0x1f ffffff03d222b448 4 ffffff03f28c7708 nv_alloc_sys+0x1f ffffff03d222c008 20 ffffff03f2a6e7e8 nv_alloc_sys+0x1f Reviewed by: Steve Gonczi <steve.gonczi@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Yuri Pankov <yuripv@gmx.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@joyent.com> Author: Pavel Zakharov <pavel.zakharov@delphix.com> MFC after: 5 weeks X-MFC after: r324163 Notes: svn path=/head/; revision=324168
* | | revert r324166, it has an unrelated change in itAndriy Gapon2017-10-015-85/+11
| | | | | | | | | | | | Notes: svn path=/head/; revision=324167
* | | MFV r323531: 8521 nvlist memory leak in get_clones_stat() and spa_load_best()Andriy Gapon2017-10-015-11/+85
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@7d3000f774e20097a1ee45cbd06d0e38065ddd5a https://github.com/illumos/illumos-gate/commit/7d3000f774e20097a1ee45cbd06d0e38065ddd5a https://www.illumos.org/issues/8521 Yuri reported this to the mailing list: doing a `reboot -d` on current illumos-gate HEAD gives the following ":: findleaks -dv" output: findleaks: maximum buffers => 301061 findleaks: actual buffers => 297587 findleaks: findleaks: potential pointers => 29289774 findleaks: dismissals => 26242305 (89.5%) findleaks: misses => 331153 ( 1.1%) findleaks: dups => 2419681 ( 8.2%) findleaks: follows => 296635 ( 1.0%) findleaks: findleaks: peak memory usage => 7353 kB findleaks: elapsed CPU time => 1.5 seconds findleaks: elapsed wall time => 2.0 seconds findleaks: CACHE LEAKED BUFCTL CALLER ffffff03d222b008 120 ffffff03ef7ceb78 nv_alloc_sys+0x1f ffffff03d222a448 123 ffffff03f4150cc8 nv_alloc_sys+0x1f ffffff03d222b448 5 ffffff03f28bd598 nv_alloc_sys+0x1f ffffff03d222b888 87 ffffff03f28c10f0 nv_alloc_sys+0x1f ffffff03d222c008 21 ffffff03f4139310 nv_alloc_sys+0x1f ffffff03d222b888 43 ffffff040ef3f3e8 nv_alloc_sys+0x1f ffffff03d222c008 120 ffffff03f4591e58 nv_alloc_sys+0x1f ffffff03d222b008 121 ffffff03f352c068 nv_alloc_sys+0x1f ffffff03d222a448 112 ffffff03f414e5f8 nv_alloc_sys+0x1f ffffff03d222b008 119 ffffff03ee92fdc0 nv_alloc_sys+0x1f ffffff03d222b888 46 ffffff03f28c1378 nv_alloc_sys+0x1f ffffff03d222b448 4 ffffff03f28c7708 nv_alloc_sys+0x1f ffffff03d222c008 20 ffffff03f2a6e7e8 nv_alloc_sys+0x1f Reviewed by: Steve Gonczi <steve.gonczi@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Yuri Pankov <yuripv@gmx.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@joyent.com> Author: Pavel Zakharov <pavel.zakharov@delphix.com> MFC after: 5 weeks X-MFC after: r324163 Notes: svn path=/head/; revision=324166
* | | fix up r324163, MFV of r323530,r323533,r323534, 7431 ZFS Channel ProgramsAndriy Gapon2017-10-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add several new files to the files enabled by ZFS kernel option. MFC after: 5 weeks X-MFC with: r324163 Notes: svn path=/head/; revision=324164
* | | MFV r323530,r323533,r323534: 7431 ZFS Channel Programs, and followupsAndriy Gapon2017-10-0192-260/+21985
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7431 ZFS Channel Programs illumos/illumos-gate@dfc115332c94a2f62058ac7f2bce7631fbd20b3d https://github.com/illumos/illumos-gate/commit/dfc115332c94a2f62058ac7f2bce7631fbd20b3d https://www.illumos.org/issues/7431 ZFS channel programs (ZCP) adds support for performing compound ZFS administrative actions via Lua scripts in a sandboxed environment (with time and memory limits). This initial commit includes both base support for running ZCP scripts, and a small initial library of API calls which support getting properties and listing, destroying, and promoting datasets. Testing: in addition to the included unit tests, channel programs have been in use at Delphix for several months for batch destroying filesystems. The dsl_destroy_snaps_nvl() call has also been replaced with Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: John Kennedy <john.kennedy@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org> Author: Chris Williamson <chris.williamson@delphix.com> 8552 ZFS LUA code uses floating point math illumos/illumos-gate@916c8d881190bd2c3ca20d9fca919aecff504435 https://github.com/illumos/illumos-gate/commit/916c8d881190bd2c3ca20d9fca919aecff504435 https://www.illumos.org/issues/8552 In the LUA interpreter used by "zfs program", the lua format() function accidentally includes support for '%f' and friends, which can cause compilation problems when building on platforms that don't support floating-point math in the kernel (e.g. sparc). Support for '%f' friends (%f %e %E %g %G) should be removed, since there's no way to supply a floating-point value anyway (all numbers in ZFS LUA are int64_t's). Reviewed by: Yuri Pankov <yuripv@gmx.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Dan McDonald <danmcd@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com> 8590 memory leak in dsl_destroy_snapshots_nvl() illumos/illumos-gate@e6ab4525d156c82445c116ecf6b2b874d5e9009d https://github.com/illumos/illumos-gate/commit/e6ab4525d156c82445c116ecf6b2b874d5e9009d https://www.illumos.org/issues/8590 In dsl_destroy_snapshots_nvl(), "snaps_normalized" is not freed after it is added to "arg". Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: Steve Gonczi <steve.gonczi@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Dan McDonald <danmcd@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com> FreeBSD notes: - zfs-program.8 manual page is taken almost as is from the vendor repository, no FreeBSD-ification done - fixed multiple instances of NULL being used where an integer is expected - replaced ETIME and ECHRNG with ETIMEDOUT and EDOM respectively This commit adds a modified version of Lua 5.2.4 under sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua, mirroring the upstream. See README.zfs in that directory for the description of Lua customizations. See zfs-program.8 on how to use the new feature. MFC after: 5 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12528 Notes: svn path=/head/; revision=324163
* | | | Improve the debug parsing to allow flags to be added and subtractedScott Long2017-10-014-2/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the existing set. Submitted by: rea@freebsd.org Notes: svn path=/head/; revision=324162
* | | | Mark libifconfig as private library in src.libnames.mk (completes r305700)Andriy Voskoboinyk2017-10-011-1/+1
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=324157
* | | | Improve smb(4) devfs interactions.Konstantin Belousov2017-10-011-51/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use make_dev_s(9) to create device, since the device ioctl interface needs to access si_drv1 to get softc pointer. Remove the common but not functional attempt to prevent parallel accesses by file descriptors by blocking more than one open. Either threads in one process, or forked siblings, or file descriptors passed over unix domain sockets all allow to execute parallel requests once one fd is opened. Since ioctl handler uses smbus_request_bus() to take the bus ownership, the correct mechanism establishes exclusive access already. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=324156
* | | | Add initial support for Address Lookup Table (A-LUT).Alexander Motin2017-10-011-24/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When enabled by EEPROM, use it to relax translation address/size alignment requirements for BAR2 window by 128 or 256 times. MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=324155
* | | | MFV r324145,324147:Martin Matuska2017-10-0154-48/+1509
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync libarchive with vendor. Relevant vendor changes: PR #905: Support for Zstandard read and write filters PR #922: Avoid overflow when reading corrupt cpio archive Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166) OSS-Fuzz 2936: Place a limit on the mtree line length OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502) MFC after: 1 week Security: CVE-2017-14166, CVE-2017-14502 Notes: svn path=/head/; revision=324148
| * | | | Update vendor/libarchive to git 92366744a52f3fa83c3899e375e415a5080a05f2Martin Matuska2017-09-3061-29/+1531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relevant vendor changes: PR #905: Support for Zstandard read and write filters PR #922: Avoid overflow when reading corrupt cpio archive Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166) OSS-Fuzz 2936: Place a limit on the mtree line length OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502) Security: CVE-2017-14166, CVE-2017-14502 Notes: svn path=/vendor/libarchive/dist/; revision=324145
* | | | | Have uiomove_object_page() keep accessed pages in the active queue.Mark Johnston2017-09-301-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, uiomove_object_page() would maintain LRU by requeuing the accessed page. This involves acquiring one of the heavily contended page queue locks. Moreover, it is unnecessarily expensive for pages in the active queue. As of r254304 the page daemon continually performs a slow scan of the active queue, with the effect that unreferenced pages are gradually moved to the inactive queue, from which they can be reclaimed. Prior to that revision, the active queue was scanned only during shortages of free and inactive pages, meaning that unreferenced pages could get "stuck" in the queue. Thus, tmpfs was required to use the inactive queue and requeue pages in order to maintain LRU. Now that this is no longer the case, tmpfs I/O operations can use the active queue and avoid the page queue locks in most cases, instead setting PGA_REFERENCED on referenced pages to provide pseudo-LRU. Reviewed by: alc (previous version) MFC after: 2 weeks Notes: svn path=/head/; revision=324146
* | | | | uath(4): fix varible types, add missing checks for descriptor / commandAndriy Voskoboinyk2017-09-301-23/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | header structure fields. Reported by: hselasky Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D11786 Notes: svn path=/head/; revision=324144
* | | | | Adjust r322633 to only apply to libexec/rtld-elf, and not usr.bin/ldd,Enji Cooper2017-09-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when running build32/install32 This unbreaks installing usr.bin/ldd as ldd32 when NO_RTLD is defined. MFC after: 1 week MFC with: r322633 Notes: svn path=/head/; revision=324143
* | | | | Revert r324109. This commit broke a number of systems.Jung-uk Kim2017-09-3069-3052/+1370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by: lwhsu, kib Requested by: ngie Notes: svn path=/head/; revision=324136
* | | | | tmpfs: skip zero-sized page count updatesMateusz Guzik2017-09-301-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Such updates consisted of vast majority of modificiations, especially in tmpfs_reg_resize. For the case where page count did no change and the size grew we only need to update tn_size. Use this fact to avoid vm object lock/relock. MFC after: 1 week Notes: svn path=/head/; revision=324127
* | | | | Initialize mdsize to make gcc happy again. This fixes buildworld on powerpc.Andreas Tobler2017-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: ian@ Notes: svn path=/head/; revision=324125
* | | | | Add sysctl/tunable for maximal request time.Alexander Motin2017-09-302-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=324123
* | | | | Fix reporting of probing size. This bug was introduced in r324119.Michael Tuexen2017-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 4 weeks Notes: svn path=/head/; revision=324122
* | | | | Add SCTP and TCP as protocols for sending probe packets.Michael Tuexen2017-09-302-8/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 4 weeks Notes: svn path=/head/; revision=324120
* | | | | * Update function definitions.Michael Tuexen2017-09-302-75/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ensure that the datalen always describes the length after the IPv6 header consistently, not matter which protocol us used for probes.. * Document that the default length is 20, not 12. * Don't send inormation in probe packets which is not needed or even checked when the responses are processed. * Address CID 978587. This is mainly a cleanup preparing the addition of SCTP and TCP as possible probe packet protocols. MFC after: 4 weeks Notes: svn path=/head/; revision=324119
* | | | | Disable/enable CSUM_UDP and CSUM_TCP along with CSUM_IPJared McNeill2017-09-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: guyyur@gmail.com Differential Revision: https://reviews.freebsd.org/D12536 Notes: svn path=/head/; revision=324118
* | | | | Fix if_awg tx dma status reg offsets.Jared McNeill2017-09-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: guyyur@gmail.com Differential Revision: https://reviews.freebsd.org/D12535 Notes: svn path=/head/; revision=324117
* | | | | Update cpucontrol(8).Konstantin Belousov2017-09-301-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mention new -n flag. Remove optional -h from the operation list lines, -h would cause the utility to exit without performing the action. Explain the default path behavior, list default path. Correct example of update performed from the non-default path, it needs -n and the trailing slash is redundand. Remove useless BUGS section. Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=324114
* | | | | Allow to disable default microcode updates search path with the newKonstantin Belousov2017-09-301-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '-n' option. Look for updates in the default locations only after user-supplied locations are tried. If newer microcode files are put into non-standard path, both measures allow to avoid situation where older update loaded from the default path first, and then the second update is applied from non-standard path. Applying intermediate updates might be undesirable. Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=324113
* | | | | Fix Makefile entries from r323275Alan Somers2017-09-294-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by: Vladimir Zakharov <zakharov.vv@gmail.com> Reviewed by: ngie MFC after: 3 weeks X-MFC-With: 323275 Notes: svn path=/head/; revision=324112
* | | | | Add support for Flex File Layout to the pNFS client structures.Rick Macklem2017-09-291-9/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the pNFS client layout and deviceinfo structures to add fields and unions for the Flex File Layout. Until a future commit adds Flex File layout support, these new fields are not used. This patch should not affect the "pnfs" option for File Layout. Notes: svn path=/head/; revision=324111
* | | | | Merge ACPICA 20170929.Jung-uk Kim2017-09-2969-1370/+3052
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=324109
| * | | | | Import ACPICA 20170929.vendor/acpica/20170929Jung-uk Kim2017-09-2983-1648/+3632
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/vendor-sys/acpica/dist/; revision=324104 svn path=/vendor-sys/acpica/20170929/; revision=324105; tag=vendor/acpica/20170929
* | | | | | Remove spurious $flags; it's a paste-o from copying the line from rc.subr.Ian Lepore2017-09-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, add a comment documenting the args passed to mount_md(). Notes: svn path=/head/; revision=324108
* | | | | | Enhance mdmfs(8) to work with tmpfs(5).Ian Lepore2017-09-295-54/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Existing scripts and associated config such as rc.initdiskless, rc.d/var, and others, use mdmfs to create memory filesystems. That program accepts a size argument which allows SI suffixes and treats an unsuffixed number as a count of 512 byte sectors. That makes it difficult to convert existing scripts to use tmpfs instead of mdmfs, because tmpfs treats unsuffixed numbers as a count of bytes. The script logic to deal with existing user config that might include suffixed and unsuffixed numbers is... unpleasant. Also, there is no g'tee that tmpfs will be available. It is sometimes configured out of small-resource embedded systems to save memory and flash storage space. These changes enhance mdmfs(8) so that it accepts two new values for the 'md-device' arg: 'tmpfs' and 'auto'. With tmpfs, the program always uses tmpfs(5) (and fails if it's not available). With 'auto' the program prefers tmpfs, but falls back to using md(4) if tmpfs isn't available. It also handles the -s <size> argument so that the mdconfig interpetation of unsuffixed numbers applies when tmpfs is used as well, so that existing user config keeps working after a switch to tmpfs. A new rc setting, mfs_type, is added to etc/defaults/rc.conf to let users force the use of tmpfs or md; the default value is "auto". Differential Revision: https://reviews.freebsd.org/D12301 Notes: svn path=/head/; revision=324107
* | | | | | aesni(4): Fix GCC buildConrad Meyer2017-09-292-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GCC xmmintrin.h header brokenly includes mm_malloc.h unconditionally. (The Clang version of xmmintrin.h only includes mm_malloc.h if not compiling in standalone mode.) Hack around GCC's broken header by defining the include guard macro ahead of including xmmintrin.h. Reported by: lwhsu, jhb Tested by: lwhsu Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=324106
* | | | | | __setrunelocale: Fix asprintf(3) failure not returning an error.Bryan Drewery2017-09-292-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fix the style of the asprintf(3) call in __collate_load_tables_l(). Both of these lines were modified away from snprintf(3) during the import from DragonFly/Illumos. Reviewed by: jilles (briefly over shoulder) MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=324103
* | | | | | netsmb: Fix buggy/racy smb_strdupin()Conrad Meyer2017-09-291-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | smb_strdupin() tried to roll a copyin() based strlen to allocate a buffer and then blindly copyin that size. Of course, a malicious user program could simultaneously manipulate the buffer, resulting in a non-terminated string being copied. Later assumptions in the code rely upon the string being nul-terminated. Just use copyinstr() and drop the racy sizing. PR: 222687 Reported by: Meng Xu <meng.xu AT gatech.edu> Security: possible local DoS Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=324102
* | | | | | man(1): silent the output of mandoc when testingBaptiste Daroussin2017-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduce the spam a user may face when mandoc tries to figure out if it can renders a manpage or fallback on groff(1) Reported by: bdrewery MFC after: 3 days Notes: svn path=/head/; revision=324100
* | | | | | Compile loader as Little-Endian on PPC64/POWER8Wojciech Macek2017-09-292-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add flag to the makefile to allow loader compilation as Little-Endian 32-bit executable. Usage: make WITH_LOADER_FORCE_LE=yes -C sys/boot all Submitted by: Wojciech Macek <wma@freebsd.org> Reviewed by: imp, nwhitehorn Obtained from: Semihalf Sponsored by: QCM Technologies Differential revision: https://reviews.freebsd.org/D12421 Notes: svn path=/head/; revision=324099
* | | | | | Some mbuf related fixes in icmp_error()Andrey V. Elsukov2017-09-291-25/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * check mbuf length before doing mtod() and accessing to IP header; * update oip pointer and all depending pointers after m_pullup(); * remove extra checks and extra parentheses, wrap long lines; PR: 222670 Reported by: Prabhakar Lakhera MFC after: 1 week Notes: svn path=/head/; revision=324098
* | | | | | Convert sysctl sbuf usage to use a fully dynaic sbuf. This is strictlyScott Long2017-09-292-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | needed, but it silences an erroneous Coverity warning and makes the code a little more logically consistent. Also mark the sysctl as MPSAFE. Sponsored by: Netflix Notes: svn path=/head/; revision=324097
* | | | | | Add ThinkPad USB 3.0 Ethernet Adapter.Kevin Lo2017-09-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: jh Notes: svn path=/head/; revision=324095
* | | | | | Add the NFS client state flag that enables Flexible File Layout.Rick Macklem2017-09-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a NFSSTA_FLEXFILE flag that will be used to enable Flexible File Layout for the NFSv4.1 pNFS client. It is not yet used, but will be after a future commit adds Flex File Layout support. Notes: svn path=/head/; revision=324091
* | | | | | Change nfsv4_getipaddr() and nfsrpc_fillsa() to not use sockaddr_storage.Rick Macklem2017-09-283-79/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes nfsv4_getipaddr() and nfsrpc_fillsa() to use a sockaddr_in * and sockaddr_in6 * instead of sockaddr_storage, to avoid allocating the latter on the stack. It also moves the nfsrpc_fillsa() call to after the completion of parsing of the DeviceInfo reply from the server. This patch is in preparation for addition of Flex File Layout support in a future commit. It only affects the "pnfs" NFSv4.1 client mount option and should not have changed its semantics. Notes: svn path=/head/; revision=324090
* | | | | | Make this compile if NO_SYSCTL_DESCR is defined.Nick Hibma2017-09-281-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defining a variable with the description and then only use it in the SYSCTL declaration led to an unused variable warning. In the SYSCTL the passed value is discarded using __DESCR. Notes: svn path=/head/; revision=324089
* | | | | | Make this compile with DEVICE_POLLING set.Nick Hibma2017-09-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | smc_poll had the wrong prototype. It returns 0 as it does not check anything but submits a taskqueue. Reviewed by: benno MFC after: 2 weeks Notes: svn path=/head/; revision=324088
* | | | | | Optimize vm_object_page_remove() by eliminating pointless calls toAlan Cox2017-09-281-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pmap_remove_all(). If the object to which a page belongs has no references, then that page cannot possibly be mapped. Reviewed by: kib MFC after: 1 week Notes: svn path=/head/; revision=324087
* | | | | | Alike to ZFS disable cache flush after first ENOTSUP error.Alexander Motin2017-09-281-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=324086
* | | | | | Typo in filename in comment.Nick Hibma2017-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=324082
* | | | | | Correction after r323873: #include <sys/lock.h> in addition to <sys/rmlock.h>Eugene Grosbein2017-09-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 220076 Approved by: mav (mentor) MFC after: 3 days Notes: svn path=/head/; revision=324081
* | | | | | A different fix for the issue from r323722.Konstantin Belousov2017-09-282-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the handlers for pop of invalid selectors from the trap frame into usermode and kernel variants. Usermode handler is kept as is, it restores the already loaded parts of the trap frame and jumps to set up a signal delivery to the user process. New kernel part of the handler emulates IRET treatment of the segments which would violate access right. It loads NUL selector in the segment register which load causes the fault, and then continues the return to interrupted kernel code. Since invalid selectors in the segment registers in the kernel mode can only exist while kernel still enters or exits from userspace, we only zero invalid userspace selectors. If userspace tries to use the segment register, it gets a signal, as if the processor segment descriptor cache was reloaded. Reported by: Maxime Villard <max@m00nbsd.net> Suggested and reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=324080