aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gdb: only return signal values for powerpc's gdb_cpu_signal()Mitchell Horne2021-01-251-4/+1
| | | | | | Reviewed by: alfredo (cherry picked from commit 57a543d8b85065f77e0b68162d09a03335970f90)
* arm64: gdb(4) machine-dependent bitsmhorne2021-01-253-0/+194
| | | | | | Sponsored by: The FreeBSD Foundation (cherry picked from commit bbfa199cbc1698631a0e932848e62dd76559d4d7)
* arm64: remove pcb_pcmhorne2021-01-259-17/+18
| | | | | | | Reviewed by: markj, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit 5f66d5a313bf2b2254de92b2915e48e5cf528893)
* arm64: don't pass user trapframe to kdb_trap()mhorne2021-01-251-20/+2
| | | | | | | Reviewed by: jhb (slightly earlier version) Sponsored by: The FreeBSD Foundation (cherry picked from commit e9bb4ce3d0e714d35b12ffdc7ecb56cade01f4a0)
* ddb: add ability to print user registersmhorne2021-01-252-8/+26
| | | | | | | Reviewed by: jhb (earlier version), markj, bcr (manpages) Sponsored by: The FreeBSD Foundation (cherry picked from commit 088a7eef95b1f1919fe6eee722a57c4d4e1e0656)
* tcp: add sysctl to tolerate TCP segments missing timestampsMichael Tuexen2021-01-247-16/+55
| | | | | | | | | | | | | | | | | When timestamp support has been negotiated, TCP segements received without a timestamp should be discarded. However, there are broken TCP implementations (for example, stacks used by Omniswitch 63xx and 64xx models), which send TCP segments without timestamps although they negotiated timestamp support. This patch adds a sysctl variable which tolerates such TCP segments and allows to interoperate with broken stacks. Reviewed by: jtl@, rscheff@ Differential Revision: https://reviews.freebsd.org/D28142 Sponsored by: Netflix, Inc. PR: 252449 (cherry picked from commit d2b3ceddccac60b563f642898e3a314647666a10)
* tcp: fix handling of TCP RST segments missing timestampsMichael Tuexen2021-01-242-8/+18
| | | | | | | | | | | | A TCP RST segment should be processed even it is missing TCP timestamps. Reported by: dmgk@, kevans@ Reviewed by: rscheff@, dmgk@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D28143 (cherry picked from commit cc3c34859eab1b317d0f38731355b53f7d978c97)
* iflib: add assert to prevent out-of-bounds array accessVincenzo Maffione2021-01-241-5/+4
| | | | | | | | | | | | The iflib_queues_alloc() allocates isc_nrxqs iflib_dma_info structs for each rxqset, and links each struct to a different free list. As a result, it must be isc_nrxqs >= isc_nfl (plus the completion queue, if present). Add an assertion to make this constraint explicit. MFC after: 2 weeks (cherry picked from commit 4ba9ad0dc316940f32065b05f24259f942c0692d)
* lualoader: fix lua-lint runKyle Evans2021-01-242-2/+3
| | | | | | | | | | luacheck rightfully complains that i is unused in the show-module-options loop at the end (it was used for some debugging in the process). We've added a new pager module that's compiled in, so declare that as an acceptable global. (cherry picked from commit 29842cb36e74037989b7a7f0bf38a47f342bac91)
* stand: remove bogus dependency from libsa32Kyle Evans2021-01-241-2/+0
| | | | | | libsa32 is independent of libsa, they can build in parallel if needed. (cherry picked from commit 27e90f70e09d9d003bdea09c41be64a7ec2ece9a)
* stand: properly declare subdir deps or .WAIT, do parallel buildKyle Evans2021-01-245-7/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buildworld already runs the stand build in parallel[1], so make it easier to identify ordering issues by properly establishing dependencies or adding .WAIT where needed. Everything in stand/ relies on libsa, either directly or indirectly, because libsa build is where the stand headers get installed and it gets linked in most places. Interpreters depend on their libs, machine dirs usually depend on top-level libs that are getting built and at least one of the interpreter flavors. For i386, order btx/libi386/libfirewire before everything else using a big-ol-.WAIT hammer. btx is the most common dependency, but the others are used sporadically. This seems to be where the race reporting on the mailing list is- AFAICT, the following sequence is happening: 1.) One of the loaders gets built based on stale btx/btxldr 2.) btx/btxldr gets rebuilt 3.) installworld triggers loader rebuild because btx was rebuilt after This seems like the most plausible explanation, as they've verified system time and timestamps. While we're here, let's switch stand/ over to a completely parallel build so we can work out these kinds of issues in isolation rather than in the middle of a larger build. (cherry picked from commit ac5f382a9d0a26685b92b49abb845d3b30ea5f91) (cherry picked from commit 8b4c3a03f933b77b65c78fdef976831d27942d9d) (cherry picked from commit e41367e3ae1246c2b086f9f920a175108aa72380)
* Move stand/ofw/libofw to stand/libofw.Brandon Bergren2021-01-2419-13/+6
| | | | | | | | | | | Since rS330365, there has been no particular reason for libofw to be in a subdirectory of ofw. Move libofw up a level to make it fit in better with the other top level libraries. Also add a LIBOFWSRC to stand/defs.mk to match what all the other libraries are doing. (cherry picked from commit 475008d6ca47ccb2b4baca59a37421d95916d2ba)
* Partial revert of ac6e3a14070Kyle Evans2021-01-241-1/+1
| | | | | | | | | | refcount_load() does not yet exist on this branch, and the path to MFC'ing it is slightly non-trivial. Back out the part that uses it -- it's a ddb command anyways, so the cost of getting it wrong is ~low. Pointy hat: kevans (did not test with DDB) (direct commit)
* du: tests: make H_flag tests more strict about output requirementsKyle Evans2021-01-241-4/+12
| | | | | | | | | | | | | The current version of this test will effectively pass as long as one of the specified paths is in the output, and it could even be a subset of one of the paths. Strengthen up the test a little bit: * Specify beginning/end anchors for each path * Add egrep -v checks to make sure we don't have any *additional* paths * Ratchet down paths2 to exactly the two paths we expect to appear (cherry picked from commit 3c5c39c7ad8f010cfa5fc0db43d15d1964b4cf16)
* du: tests: fix the H_flag test (primarily grep usage)Kyle Evans2021-01-241-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test attempts to use \t (tab intended) in a grep expression. With the former /usr/bin/grep (i.e. gnugrep), this was interpreted as a literal 't'. The expression would work anyways because the tr(1) usage would ultimately replace all of the spaces with a single newline, and they would match the paths whether they were correctly fromatted or not. Current /usr/bin/grep (i.e. bsdgrep) is less-tolerant of ordinary-escapes, a property of the underlying regex(3) engine, to make it easier to identify when stuff like this happens. In-fact, this expression broke after the switch happened. This revision does the bare basics to fix the usage by using a printf to get a literal tab character to insert into the expression. It also swaps out the manual insertion of the line prefix into the grep expression by pulling that part out of $sep and reusing it for the leading path. The secondary issue was the tr(1) usage, since tr would only replace the first character of string1 with the first character of string2. This has instead been replaced by a sed expression, which similary understands \n to be a newline on all supported versions of FreeBSD. Each path now gets prefixed with the appropriate context that should be there (i.e. numeric sequence followed by a tab). PR: 252446 (cherry picked from commit 4832d2e8ae1df6f907ac00275764f8135722cb7e)
* cpuset: refcount-cleanMateusz Guzik2021-01-241-2/+2
| | | | (cherry picked from commit 1a7bb8962904b4eef9d968d98afda31c08612868)
* libc: tests: add some tests for cpuset(2)Kyle Evans2021-01-242-0/+494
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The cpuset(2) tests should be run as root (require.user properly set) with >= 3 cpus for maximum coverage. All tests that want to modify the cpuset don't assume any particular cpu layout (i.e. the first cpu may not be 0, the last may not be first + count) and the following scenarios are tested: 1.) newset: basic execute cpuset() to grab a new cpuset, make sure the assigned cpuset then has a different ID. 2.) transient: create a new cpuset then assign the process its original cpuset, ensuring that the one we created is now gone. 3.) deadlk: test assigning an anonymous mask, then resetting the process base affinity with 1-cpu overlap w.r.t. the anonymous mask and with 0-cpu overlap w.r.t. the anonymous mask. 4.) jail_attach_newbase: process attaches to a jail with its own cpuset+mask (e.g. cpuset -c -l 1,2 jail -c path=/ command=/bin/sh) 5.) jail_attach_newbase_plain: process attaches to a jail with its own cpuset (e.g. cpuset -c jail -c path=/ command=/bin/sh) 6.) jail_attach_prevbase: process attaches to a jail with the containing jail's root cpuset (e.g. jail -c path=/ command=/bin/sh) 7.) jail_attach_plain: process attaches to a jail with the containing jail's root cpuset+mask. 8.) badparent: creates a new cpuset and modifies the anonymous thread mask, then setid's back to the original and checks that cpuset_getid() returns the expected set. (cherry picked from commit 1fc421287d5ddbcfba99412cf968ee3490383fe7)
* Bump up the low range of cpuset numbers to account for the kernel cpuset.Stephen J. Kiernan2021-01-241-1/+1
| | | | | | Obtained from: Juniper Networks, Inc. (cherry picked from commit d57cd5ccd38299ae9834c4f913c4b5cbe53dee1e)
* libc: tests: hook CPUSET(9) test up to the buildKyle Evans2021-01-242-1/+42
| | | | | | | | | | | Add shims to map NetBSD's API to CPUSET(9). Obviously the invalid input parts of these tests are relatively useless since we're just testing the shims that aren't used elsewhere, there's still some amount of value in the parts testing valid inputs. Differential Revision: https://reviews.freebsd.org/D27307 (cherry picked from commit 9e1281eabafa4aaf84828e70488c1802717b59af)
* libregex: re-enable `make check`Kyle Evans2021-01-241-1/+1
| | | | | | | | The tests are generally expected to pass, uncomment the annotation that lets `make check` work. Note that `make check` currently requires kyua from ports or an appropriate symlink into /usr/local/bin. (cherry picked from commit 04a3ba363d13cf5efaeb63f64cd3fdd6b9c71248)
* flua: implement chmodEd Maste2021-01-243-0/+40
| | | | | | Lua does not provide a native way to change the permission of a file. (cherry picked from commit 405e3338ac841999673056a2b5537b4c0ad677db)
* Fix -Wundef warnings when building libluaAlex Richardson2021-01-242-1/+10
| | | | | | | | We need to define the LUA_FLOAT_INT64 macro even if we don't use it (copied from stand/luaconf.h). While touching luaconf.h.dist also sync it with the the 5.3.5 release version (matches the one in lib/liblua). (cherry picked from commit 0c54932d50a0cbffdd083bf6b2e8d587902f90c9)
* flua: don't allow dlopen, et al., for bootstrap fluaKyle Evans2021-01-243-2/+5
| | | | | | | | | | | | | | | | There are some logistics issues that need to be sorted out here before we can actually allow this to work. It's not really safe to allow LUA_USE_DLOPEN with host lib paths being used. The host system could have an entirely different lua version and this could cause us to crash and burn. If we want to revive this later, we need to make sure to define c module paths inside OBJDIR that are compiled against whatever version we've bootstrapped. (cherry picked from commit c2a2b4f3cf11e770892a524df637f671f5989719) (cherry picked from commit 967fbfd9e2b7a015d5cba1491badcdf9044b28b9)
* flua: support "require" for binary objects in the base systemEd Maste2021-01-242-0/+3
| | | | | | Export symbols from flua, and enable dlopen. (cherry picked from commit 3bd8419597b44dc3da2b1e6ffc2c7ee9cf4aa195)
* flua: initial support for "require" in the base systemEd Maste2021-01-242-3/+7
| | | | | | | | | | | | | | | | Use /usr not /usr/local for base system components. Use /usr/lib/flua and /usr/share/flua (not lua) for consistency and to avoid the possibility that other software accidentally finds our base system modules. Also drop the version from the path, as flua represents an unspecified lua version that corresponds to the FreeBSD version it comes with. LUA_USE_DLOPEN is not yet enabled because some additional changes are needed wrt symbol visibility. (cherry picked from commit bceabe277e1286ec694e34c186a73e7bf2c9de4f)
* Makefile: add a small blurb about building with gcc xtoolchainKyle Evans2021-01-241-0/+11
| | | | | | | | The key details are to install the appropriate flavor of devel/freebsd-gcc6 and pass CROSS_TOOLCHAIN while building. (cherry picked from commit 5f2aaba4532c713f74279f0e83208c97af3a3e69) (cherry picked from commit cf82304d7d5e8d9433d46cbdf2db8c2576b85edd)
* kern: dup: do not assume oldfde is validKyle Evans2021-01-241-5/+12
| | | | | | | | | | | | | | | oldfde may be invalidated if the table has grown due to the operation that we're performing, either via fdalloc() or a direct fdgrowtable_exp(). This was technically OK before rS367927 because the old table remained valid until the filedesc became unused, but now it may be freed immediately if it's an unshared table in a single-threaded process, so it is no longer a good assumption to make. This fixes dup/dup2 invocations that grow the file table; in the initial report, it manifested as a kernel panic in devel/gmake's configure script. (cherry picked from commit f96078b8fe55c944f32c3c82ebb9c360bc155823)
* lualoader: add loader_conf_dirs support (loader.conf.d)Kyle Evans2021-01-244-1/+35
| | | | | | | | | | | | | | | | | loader_conf_dirs is the supporting mechanism for the included /boot/loader.conf.d directory. When lualoader finishes processing all of the loader_conf_files it finds after walking /boot/defaults/loader.conf, it will now check any and all loader_conf_dirs and process files ending in ".conf" as if they were a loader.conf. Note that loader_conf_files may be specified in a loader.conf.d config file, but loader_conf_dirs may *not*. It will only be processed as specified in /boot/defaults/loader.conf and any loader_conf_files that were loaded from there. Relnotes: yes (cherry picked from commit 72cf7db3aaf17db412183886f19320e5074dc8b7)
* libc: regex: rework unsafe pointer arithmeticMiod Vallat2021-01-241-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | regcomp.c uses the "start + count < end" idiom to check that there are "count" bytes available in an array of char "start" and "end" both point to. This is fine, unless "start + count" goes beyond the last element of the array. In this case, pedantic interpretation of the C standard makes the comparison of such a pointer against "end" undefined, and optimizers from hell will happily remove as much code as possible because of this. An example of this occurs in regcomp.c's bothcases(), which defines bracket[3], sets "next" to "bracket" and "end" to "bracket + 2". Then it invokes p_bracket(), which starts with "if (p->next + 5 < p->end)"... Because bothcases() and p_bracket() are static functions in regcomp.c, there is a real risk of miscompilation if aggressive inlining happens. The following diff rewrites the "start + count < end" constructs into "end - start > count". Assuming "end" and "start" are always pointing in the array (such as "bracket[3]" above), "end - start" is well-defined and can be compared without trouble. As a bonus, MORE2() implies MORE() therefore SEETWO() can be simplified a bit. PR: 252403 (cherry picked from commit d36b5dbe28d8ebab219fa29db533734d47f0c4a3)
* lualoader: use floor division to get correct typeKyle Evans2021-01-241-1/+1
| | | | | | | | | | | | | | | | This fixes the positioning of the "Welcome to FreeBSD" heading, which was misplaced after the recent update to Lua 5.4. The issue was previously masked by a compatibility knob in Lua 5.3 that would cause float-tagged numbers to render faithfully without the decimal component. Lua 5.4 dropped that and ensures that it always prints a decimal component, even if it has to append a ".0" to the value. Standard division produces a "float", floor division (//) can be used to guarantee an integer. Floating point operations have been completely ripped out of the liblua compiled for the bootloader, so this is a nop. This is decidedly better than trying to hack out the float tag entirely. (cherry picked from commit 994e1f40f6db059290cf4a8203c2b9eea22d9a38)
* certctl: replace hardcoded uses of /usr/localKyle Evans2021-01-241-2/+3
| | | | | | | Use the new user.localbase sysctl here as well, to reduce the number of hardcoded localbase by one (1). (cherry picked from commit b799d38a2ad10ec84c8ffa4a554a1816465c0d12)
* bectl: tests: use -R <mount> instead of specifying altrootKyle Evans2021-01-241-1/+1
| | | | | | | | -R is currently shorthand for cachefile=none, altroot=<mount>. This is functionally the same, but perhaps more resilient to future changes that could be necessary that may be added when -R is specified. (cherry picked from commit de661c9f8652f6a51a6ca83d404d9170404990f8)
* kldxref(8): Sort MDT_MODULE info first in linker.hints outputConrad Meyer2021-01-231-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | MDT_MODULE info is required to be ordered before any other MDT metadata for a given kld because it serves as an implicit record boundary between distinct klds for linker.hints consumers. kldxref(8) has previously relied on the assumption that MDT_MODULE was ordered relative to other module metadata in kld objects by source code ordering. However, C does not require implementations to emit file scope objects in any particular order, and it seems that GCC 6.4.0 and/or binutils 2.32 ld may reorder emitted objects with respect to source code ordering. So: just take two passes over a given .ko's module metadata, scanning for the MDT_MODULE on the first pass and the other metadata on subsequent passes. It's not super expensive and not exactly a performance-critical piece of code. This ensures MDT_MODULE is always ordered before MDT_PNP_INFO and other MDTs, regardless of compiler/linker movement. As a fringe benefit, it removes the requirement that care be taken to always order MODULE_PNP_INFO after DRIVER_MODULE in source code. Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D20405 (cherry picked from commit 9c1fa7a429145b298a012cb7b752c82a1e0b1184)
* Unify Intel CODEC naming.Alexander Motin2021-01-221-6/+6
| | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> (cherry picked from commit 510cc421263fa807a72c9b4b8d9a4091a96d9648)
* Add Intel Gemini Lake AHCI ID.Alexander Motin2021-01-221-0/+1
| | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> (cherry picked from commit 006e2b2b8285842216ceb914a4cf828c89c2d7f7)
* Fix dependency cleanup hack for pf_ruleset.cKristof Provost2021-01-221-3/+3
| | | | | | | | | | In 4046f57601eaa0bcd1ec8496e1280939b948aa46 we added a dependency cleanup to cope with the pf_ruleset.c changes. This commit failed to include '; \' at the end of the shell lines in the make target, causing build failures. PR: 252910
* MFC 9a47ae044b48:Hans Petter Selasky2021-01-225-10/+12
| | | | | | Bump driver versions for mlx5en(4) and mlx4en(4). Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC r353632:Hans Petter Selasky2021-01-222-13/+1
| | | | | | | | | Replace rdma_is_upper_dev_rcu() with rdma_vlan_dev_real_dev() in ibcore. This reduces the number of references to VLAN_TRUNKDEV() in ibcore. Currently only VLAN is supported as a child interface in FreeBSD. Remove superfluous RCU locking. Sponsored by: Mellanox Technologies
* MFC daa150aaa30f:Hans Petter Selasky2021-01-221-6/+18
| | | | | | | Properly handle case where firmware dump returns more registers on second pass in mlx5core. Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC a00718e1dfcd:Hans Petter Selasky2021-01-221-11/+51
| | | | | | Implement SIOCGIFRSSKEY and SIOCGIFRSSHASH and mlx5en(4). Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC 89c0b4fa1172:Hans Petter Selasky2021-01-222-2/+2
| | | | | | Bump some copyrights in mlx5en(4). Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC 87b3c8cc99f9:Hans Petter Selasky2021-01-221-1/+1
| | | | | | Fix spelling in mlx5core. Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC 82c7abe7785b:Hans Petter Selasky2021-01-221-1/+1
| | | | | | The "unsigned" type is the same like "unsigned int". Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC 50a9f8bbc1dd:Hans Petter Selasky2021-01-222-2/+2
| | | | | | | Downgrade error about missing VSC to warning and make messages consistent in mlx5core. Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC 480570dbb309:Hans Petter Selasky2021-01-221-0/+5
| | | | | | | | | | | | | Fixes for SRIOV in mlx5core. - call pci_iov_detach() on detaching from PCI device to take care of hang on destroying VFs after PF is down. - disable eswitch SRIOV support right after pci_iov_detach(), else the eswitch cleanup sometimes occur while the SRIOV flow table is still present. Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC 376e130b4707:Hans Petter Selasky2021-01-221-23/+29
| | | | | | Fix memory leaks in error paths in krping. Sponsored by: Mellanox Technologies // NVIDIA Networking
* MFC 376479200760:Hans Petter Selasky2021-01-221-1/+1
| | | | | | Fix whitespace in mlx5en(4). Sponsored by: Mellanox Technologies // NVIDIA Networking
* armv8crypto: print a message on probe failureMitchell Horne2021-01-211-0/+3
| | | | | | | | | | | Similar to the message printed by aesni(4), let the user know if the driver is unsupported by their CPU. PR: 252543 Reported by: gbe Sponsored by: The FreeBSD Foundation (cherry picked from commit a520f5ca580fcff34fd0d9f0d64a4c165f57eb30)
* rc.conf(5): describe devmatch rc variablesMitchell Horne2021-01-211-1/+11
| | | | | | Reviewed by: imp, gbe (manpages) (cherry picked from commit ef757da441b199da680bfbd24afaa9d3c16e5b55)
* iwm(4): Add support for Intel Killer(R) Wireless-AC 1550iMark Johnston2021-01-211-0/+2
| | | | | | | PR: 252578 Submitted by: shu <ankohuu@outlook.com> (cherry picked from commit 90cc8706ccb2da130c0b1a28434a9ec5d4c80d81)