summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r367236:Hans Petter Selasky2020-11-104-7/+32
| | | | | | | | | | Implement the USB_GET_DEVICEINFO ioctl(2) for uhid(4). Submitted by: pedro martelletto <pedro@ambientworks.net> Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=367561
* MFC r367096:Hans Petter Selasky2020-11-102-0/+6
| | | | | | | | | | | Add new USB IDs. Submitted by: aleksi.kaalinpaa@kapsi.fi PR: 250675 Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=367559
* MFC r364860 and r366996:Hans Petter Selasky2020-11-104-1/+495
| | | | | | | | | | | | Implement extensible arrays API using the existing radix tree implementation in the LinuxKPI. Differential Revision: https://reviews.freebsd.org/D25101 Reviewed by: kib @ Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=367557
* MFC r367420:Mateusz Piotrowski2020-11-091-3/+3
| | | | | | | Use Cm macros instead of Ar when referring to a specific memory disk type Notes: svn path=/stable/11/; revision=367519
* MFC r367005: MFV r366990: less v563.Xin LI2020-11-0956-409/+551
| | | | | | | Relnotes: yes Notes: svn path=/stable/11/; revision=367516
* Bump __FreeBSD_version after ptsname_r addition.Xin LI2020-11-091-1/+1
| | | | Notes: svn path=/stable/11/; revision=367513
* MFC r366781, r366866: Implement ptsname_r.Xin LI2020-11-095-18/+80
| | | | Notes: svn path=/stable/11/; revision=367512
* MFC r358477,365113,366767: arcmsr(4) 1.50.00.00.Xin LI2020-11-093-314/+466
| | | | Notes: svn path=/stable/11/; revision=367508
* MFC r367256:Mateusz Piotrowski2020-11-081-8/+1
| | | | | | | | | | | Do not document default locations of the OpenBSD and NetBSD ports trees Our own Ports Collection is not targeting those systems at the moment, so let's stop documenting bits specific to OpenBSD and NetBSD in the ports documentation. Especially, that it might bit rot one day. Notes: svn path=/stable/11/; revision=367483
* MFC r367041: Fix incorrect constants of target tag action.Alexander Motin2020-11-081-2/+2
| | | | | | | | | ocs_scsi_recv_cmd() receives the flags after ocs_get_flags_fcp_cmd(), which translates them from FCP_TASK_ATTR_* to OCS_SCSI_CMD_*. As result non-SIMPLE requests turned into HEAD or ORDERED depending on direction. Notes: svn path=/stable/11/; revision=367469
* MFC r367323:Dimitry Andric2020-11-081-381/+808
| | | | | | | | | | | | | | | | | | | | | | | Update libcxxrt's private copy of elftoolchain demangler This updates the private copy of libelftc_dem_gnu3.c in libcxxrt with the most recent version from upstream r3877. Similar to r367322, this fixes a number of possible assertions, and allows it to correctly demangle several names that it could not handle before. PR: 250702 MFC r367337: Make vector-related functions in libcxxrt's demangler static Follow-up to r367323 by re-adding static to a number of the functions copied from elftc's libelftc_vstr.c. This was requested by upstream. PR: 250702 Notes: svn path=/stable/11/; revision=367467
* Sync up elftoolchain with head, except for the capsicum-related commits,Dimitry Andric2020-11-07279-1838/+3529
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which are incompatible with stable/11. MFC r308465 (by emaste): c++filt: flush output after newline Some tools spawn c++filt and pass it a single line at a time for demangling. This is akin to r276689 for addr2line. Sponsored by: The FreeBSD Foundation MFC r317626 (by emaste): revert r308465: c++filt: flush output after newline The ELF Tool Chain update to r3520 uses setvbuf to set line buffering. Sponsored by: The FreeBSD Foundation MFC r340746 (by oshogbo): strings: fix style nits Reviewed by: cem, emaste, Joseph Koshy <jkoshy@users.sourceforge.net> Differential Revision: https://reviews.freebsd.org/D18036 MFC r340750 (by mjg): strings: unbreak the build after r340746 Discussed with: oshogbo Sponsored by: The FreeBSD Foundation MFC r342918 (by emaste): Update to ELF Tool Chain r3668 Highlights: - Make sure that only TLS sections are sorted into TLS segment. - Fixed multiple errors in "Section to Segment mapping". - Man page updates - ar improvements - elfcopy: avoid filter_reloc uninitialized variable for rela - elfcopy: avoid stripping relocations from static binaries - readelf: avoid printing directory in front of absolute path - readelf: add NT_FREEBSD_FEATURE_CTL FreeBSD note type - test improvements NOTES: Some of these changes originated in FreeBSD and simply reduce diffs between contrib and vendor. ELF Tool Chain ar is not (currently) used in FreeBSD, and there are improvements in both FreeBSD and ELF Tool Chain ar that are not in the other. Sponsored by: The FreeBSD Foundation MFC r343592 (by emaste): readelf: decode flag bits in DT_FLAGS/DT_FLAGS_1 Decode d_val when the tag is DT_FLAGS or DT_FLAGS_1 based on the information at: https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-42444.html PR: 232983 Submitted by: Bora Ozarslan borako.ozarslan@gmail.com Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18784 MFC r343593 (by emaste): readelf: fix i386 build Use %jx and (uintmax_t) cast. PR: 232983 Sponsored by: The FreeBSD Foundation MFC r343614 (by emaste): readelf: dump elf note data Output format is compatible with GNU readelf's handling of unknown note types (modulo a GNU char signedness bug); future changes will add type- specific decoding. Reviewed by: kib Relnotes: Yes Sponsored by: The FreeBSD Foundation MFC r343665 (by emaste): readelf: use table-based DT_FLAGS and DT_FLAGS_1 decoding Fewer lines of code and more maintainable. Reviewed by: brooks, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19053 MFC r343669 (by emaste): readelf: decode FreeBSD note types Decode NT_FREEBSD_ABI_TAG, NT_FREEBSD_ARCH_TAG, and NT_FREEBSD_FEATURE_CTL. Reviewed by: brooks, kib (earlier) Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19054 MFC r345360 (by oshogbo): strings: do not depend on stdin Instead of depending on one stdin FILE structure and use freopen(3), pass to the functions appropriate FILE structure. Reviewed by: cem Discussed with: emaste Differential Revision: https://reviews.freebsd.org/D18037 MFC r345361 (by oshogbo): strings: do not continue if getc or getcharacter returns EOF Reported by: cem MFC r345362 (by oshogbo): Fix powerpc and arm builds after r345361. Reported by: jenkins MFC r345364 (by oshogbo): In case of ENCODING_8BIT the EOF code will be pass to putchar. EOF check should be done before (uint8_t)c > 127 test. Reported by: cem MFC r345431 (by oshogbo): strings: return an error code and the char value separately If we returning 32 bits value it's hard to distinguish if the returned value is a valid one or if its an error (in case of EOF). For that reason separate exit code of the function from the returned character. Reported by: cem, se MFC r345593 (by markj): Prepend DW_AT_comp_dir to relative line number directory table entries. Relative directories may appear in the line number program for a CPU if files were included via a relative path, for instance with "-I.". Previously, dwarf_srclines(3) and dwarf_srcfiles(3) would return the relative path, so addr2line, for instance, would do the same. However, we can get an absolute path by prepending the compilation directory, so change libdwarf to do that to improve compatibility with GNU binutils and since it is more useful in general. Reviewed by: jhb Discussed with: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19705 MFC r345646 (by emaste): readelf: add newline after dumping dynamic FLAGS / FLAGS_1 All three dump_flags() callers need a newline after printing the flags. Sponsored by: The FreeBSD Foundation MFC r346323 (by emaste): readelf: speed up readelf -wo Use an array instead of STAILQ, and sort at the end instead of while adding new elements. PR: 212539 Submitted by: Bora ?zarslan <borako.ozarslan@gmail.com> Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC r346327 (by emaste): readelf: use size_t for object counts PR: 212539 Reported by: cem Sponsored by: The FreeBSD Foundation MFC r348347 (by jhibbits): Add missing powerpc64 relocation support to libdwarf Summary: Due to missing relocation support in libdwarf for powerpc64, handling of dwarf info on unlinked objects was bogus. Examining raw dwarf data on objects compiled on ppc64 with a modern compiler (in-tree gcc tends to hide the issue, since it only rarely generates relocations in .debug_info and uses DW_FORM_str instead of DW_FORM_strp for everything), you will find that the dwarf data appears corrupt, with repeated references to the compiler version where things like types and function names should appear. This happens because the 0 offset of .debug_str contains the compiler version, and without applying the relocations, *all* indirect strings in .dwarf_info will end up pointing to it. This corruption then propogates to the CTF data, as ctfconvert relies on libdwarf to read the dwarf info, for every compiled object (when building a kernel.) However, if you examine the dwarf data on a compiled executable, it will appear correct, because during final link the relocations get applied and baked in by the linker. Submitted by: Brandon Bergren Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D20367 MFC r348430 (by markj): elfcopy: Remove an unneeded memset. Reviewed by: emaste, trasz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20445 MFC r348431 (by markj): elfcopy: Optimize for insertions at the end of the section list. This is the common case when strip(1) is creating the output file. The change provides a significant speedup when running on ELF files with many sections. PR: 234949 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20444 MFC r348443 (by markj): readelf: Make -t imply -S, for compatibility with GNU binutils. Reported by: jhb Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20475 MFC r348444 (by markj): libelftc: Add MLINKS. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20474 MFC r348652 (by markj): libelf: Use a red-black tree to manage the section list. The tree is indexed by section number. This speeds up elf_getscn() and its callers, which previously had to traverse a linked list. In particular, since .shstrtab is often the last section in a file, elf_strptr() would have to traverse the entire list. PR: 234949 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20443 MFC r348654 (by markj): elfcopy: Use elf_getscn() instead of iterating over all sections. When removing a section, we would loop over all sections looking for a corresponding relocation section. With r348652 it is much faster to just use elf_getscn(). PR: 234949 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20471 MFC r348655 (by markj): libelftc: Fix some minor style bugs. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20472 MFC r348657 (by markj): elfcopy: Use libelftc's string table routines to build .shstrtab. This replaces some hand-rolled routines and is substantially faster since libelftc uses a hash table for lookups and insertions, whereas elfcopy would perform a linear scan of the table. PR: 234949 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20473 MFC r348776 (by csjp): Teach readelf about some OpenBSD ELF program headers - Add constants for OpenBSD wxneeded, bootdata and randomize to the FreeBSD elf_common.h file. This is the file that gets used by the elftoolchain library. - Update readelf and elfdump utilities to decode these program headers if they are encountered. Note: FreeBSD has it's own version of elfdump(1), which will be updated in a subsequent commit. I am adding it here anyway because this diff is going to be submitted upstream. Discussed with: emaste Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D20548 MFC r349420 (by markj): libelftc: Micro-optimize string table insertion. The string's length is already known, so use memcpy() instead of strcpy() to add it to the string table image. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20760 MFC r349421 (by markj): libelftc: Consistently use size_t for string table offsets and sizes. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20702 MFC r349422 (by markj): libelftc: Fix the documented prototype for elftc_string_table_destroy(). Sponsored by: The FreeBSD Foundation MFC r349423 (by markj): elfcopy: Provide a size hint when creating the section string table. Use the input file's .shstrtab size as the hint if it exists. This gives a small performance improvement when processing files with many sections. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20544 MFC r349424 (by markj): libdwarf: Use the cached strtab pointer when reading string attributes. Previously we would perform a linear search of the DWARF section list for ".debug_str". However, libdwarf always caches a pointer to the strtab image in its debug descriptor. Using it gives a modest performance improvement when iterating over the attributes of each DIE. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20759 MFC r349481 (by mhorne): Add some missing RISC-V ELF defines This adds defines for the RISC-V specific e_flags values, and some of the missing static relocations. Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20766 MFC r349482 (by mhorne): readelf: Add support for RISC-V specific e_flags Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20767 MFC r349483 (by mhorne): libelftc: add RISC-V bfd targets This adds the following targets: elf32-riscv, elf64-riscv, elf64-riscv-freebsd Reviewed by: emaste, markj, jkoshy@users.sourceforge.net Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20768 MFC r349510 (by luporl): [PowerPC64] readelf: print description for 'e_flags' in ELF header (ABI type) This prints out description text with the meaning of 'Flags' value in PowerPC64. Example: $ readelf -h ~/tmp/t1-Flag2 ELF Header: Magic: 7f 45 4c 46 02 02 01 09 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, big endian Version: 1 (current) OS/ABI: FreeBSD ABI Version: 0 Type: EXEC (Executable file) Machine: PowerPC 64-bit Version: 0x1 Entry point address: 0x10010000 Start of program headers: 64 (bytes into file) Start of section headers: 209368 (bytes into file) Flags: 0x2, OpenPOWER ELF V2 ABI Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 10 Size of section headers: 64 (bytes) Number of section headers: 34 Section header string table index: 31 Submitted by: alfredo.junior_eldorado.org.br Reviewed by: luporl Differential Revision: https://reviews.freebsd.org/D20782 MFC r349562 (by mhorne): elftoolchain: fix an incorrect e_flags description r349482 introduced the definitions and descriptions of the RISC-V specific e_flags values to elftoolchain. However, the description for the EF_RISCV_RVE flag was incorrectly duplicated from EF_RISCV_RVC. Fix this by providing the proper description for this flag. Reported by: jhb Approved by: markj (mentor) MFC r349563 (by mhorne): readelf: Add RISC-V DWARF register aliases This allows DWARF debugging output to use the common register mneumonics, such as ra, sp, or t0. DWARF registers 0-31 are mapped to the 32 general purpose registers, which are then followed by the 32 floating point registers. Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20779 MFC r349577 (by arichardson): Allow bootstrapping elftoolchain on MacOS and Linux This is required in order to build on non-FreeBSD systems without setting all the XAR/XSTRINGS/etc. variables Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D16771 MFC r349730 (by markj): elfcopy: Clear errors after fetching the shstrtab index. Otherwise a future call to elf_errno() will return a non-zero value. update_shdr(), for example, treats any errors associated with the ELF descriptor as fatal. Clear the error per the first example in elf_errmsg.3. Convert to elf_getshdrstrndx() while here since elf_getshstrndx() is apparently deprecated. Reported by: royger Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20852 MFC r350432 (by markj): Merge r3778 and r3779 from ELFToolchain. Modify strip(1) to not accept multiple input files when an output file is specified. There is no good way to handle this combination, and the change is compatible with binutils. Sponsored by: The FreeBSD Foundation MFC r350511 (by emaste): readelf: decode NT_GNU_PROPERTY_TYPE_0 / GNU_PROPERTY_X86_FEATURE_1_AND These bits are used for Intel CET IBT/Shadow Stack. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20516 MFC r350679 (by markj): Merge r3780 from elftoolchain. Adjust argc and argv by optind before using them. This slightly simplifies the code. No functional change intended. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21079 MFC r352875 (by ray): ections into expected offset in binary format. Calculate binary file offset using address field, bacause software know only offset to known data, not where to load segment. With that patch, kernel .data section can have any alignment/offset - kernel boor fine. PR: 235391 Reviewed by: markj Differential Revision: D21827 MFC r352878 (by ray): Initialize baseaddr to suppres warning. Pointy hat to: ray MFC r352908 (by markj): nm: Adjust argc and argv in get_opt(). This refactoring makes it slightly easier to capsicumize nm(1). Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC r354544 (by emaste): elfcopy/strip: Ensure sections have required alignment on output Object files may specify insufficient alignment on certain sections, for example due to a bug in NASM[1]. When we detect that case in elfcopy or strip, emit a warning and increase the alignment to the minimum required. The NASM bug was fixed in 2015[2], but we might as well have this fixup (and warning) in elfcopy in case we encounter such a file for any other reason. This might be reworked somewhat upstream - see ELF Tool Chain ticket 485[3]. [1] https://bugzilla.nasm.us/show_bug.cgi?id=3392307 [2] https://repo.or.cz/w/nasm.git/commit/1f0cb0f2c1ba632c0fab02424928cfb756a9160c [3] https://sourceforge.net/p/elftoolchain/tickets/485/ PR: 198611 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2292 MFC r354842 (by jhibbits): ELF toolchain: Add PowerPC VMX and VSX note decode to readelf Summary: A follow-on to r276634, which added the VMX note to userland cores, and r334538 for VSX notes. Copied from note_type_linux_core(). Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D22404 MFC r355413 (by emaste): Update ELF Tool Chain to upstream r3769 This contains many small bugfixes and documentation improvements. Sponsored by: The FreeBSD Foundation MFC r357450 (by markj): addr2line: Cache CU DIEs upon a successful address lookup. Previously, addr2line would sequentially search all CUs for each input address. For some uses, notably syzkaller's code coverage map generator, this was extremely slow. Add a CU cache into which entries are added following a successful lookup, and search the cache before falling back to a scan. When translating a large number of addresses this yields slightly better performance than GNU addr2line. Garbage-collect an unused hash table which appears to have been intended for the same purpose. A hash table doesn't seem particularly suitable since each CU spans a range of addresses. Submitted by: Tiger Gao <tig@freebsdfoundation.org> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23418 MFC r357462 (by markj): addr2line: Avoid a name collision. The RB_ macros define functions with a parameter named head, and gcc warns about this. MFC r357531 (by markj): libdwarf: Remove unnecessary NULL checks. All callers of _dwarf_add_expr() and _dwarf_expr_into_block() pass a non-NULL expr pointer, and these functions assume that expr is non-NULL anyway. CID: 1193305, 1193306 Sponsored by: The FreeBSD Foundation MFC r357532 (by markj): libdwarf: Fix a possible memory leak in dwarf_add_AT_location_expr(). CID: 1193364 Sponsored by: The FreeBSD Foundation MFC r357533 (by markj): libdwarf: Make an out-pointer of _dwarf_abbrev_add() mandatory. All callers pass a non-NULL pointer, and otherwise it was possible to leak memory if the abbrev was not added to a CU. CID: 1193365 Sponsored by: The FreeBSD Foundation MFC r357534 (by markj): libdwarf: Fix a memory leak in _dwarf_frame_section_init(). If frame length validation failed we would leak memory. CID: 1193366 Sponsored by: The FreeBSD Foundation MFC r357535 (by markj): libelftc: Fix memory leaks in the C++ demanglers. CID: 1262518, 1262519, 1262520, 1262529 Sponsored by: The FreeBSD Foundation MFC r357536 (by markj): libelftc: Add a missing check for an error from vector_str_init(). While here consistently use the same spelling for such checks. CID: 1376769 Sponsored by: The FreeBSD Foundation MFC r357537 (by markj): elfcopy: Handle multiple data descriptors properly. The code clearly meant to resize the buffer in the case where a section was backed by multiple data descriptors. In practice this shouldn't have been a problem since libelf would return a single data descriptor for each section in a newly opened file. CID: 1262522 Sponsored by: The FreeBSD Foundation MFC r357538 (by markj): elfcopy: Avoid leaking dst's fd when we fail to copy a file. We should really create the output file in the same directory as the destination file so that rename() works. This will be done in a future change as part of some work to run in capability mode. CID: 1262523 Sponsored by: The FreeBSD Foundation MFC r357539 (by markj): size: Avoid returning a stack pointer from xlatetom(). The callers only check whether the returned pointer is non-NULL, so this was harmless in practice, but change the return value to guard against the issue. CID: 1411597 Sponsored by: The FreeBSD Foundation MFC r357540 (by markj): readelf: Fix a double close of the input file. The caller of dump_object() is responsible for opening the file, let it be responsible for closing too. CID: 1411588 Sponsored by: The FreeBSD Foundation MFC r357541 (by markj): readelf: Fix the check for an error from realloc(). Use err() instead of errx() while here, since realloc() sets errno. CID: 1401326 Sponsored by: The FreeBSD Foundation MFC r357542 (by markj): readelf: Don't leak memory when dwarf_get_fde_info_for_all_regs() fails. CID: 1292493 Sponsored by: The FreeBSD Foundation MFC r357826 (by emaste): elfcopy: set ELF OS/ABI field when converting from binary PR: 228934 Submitted by: Tiger Gao <tig@freebsdfoundation.org> Reviewed by: markj, jkoshy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23504 MFC r357844 (by emaste): addr2line: Handle DW_AT_ranges in compile units Based on original submission by Marat Radchenko in ELF Tool Chain ticket #545, rebased and updated by Tiger Gao. PR: 217736 Submitted by: Marat Radchenko <marat@slonopotamus.org> Submitted by: Tiger Gao <tig@freebsdfoundation.org> Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23501 MFC r357862 (by emaste): addr2line: use stdbool.h header for bool Presumably a bool definition is obtained via header contamination on FreeBSD-CURRENT. Found while trying to upstream FreeBSD addr2line changes - the FreeBSD 11.2 CI build failed there. Reported by: Cirrus-CI, upstream ELF Tool Chain Sponsored by: The FreeBSD Foundation MFC r358499 (by emaste): readelf: add PROTMAX_DISABLE and STKGAP_DISABLE From r349609 (PROTMAX_DISABLE) and r354790 (STKGAP_DISABLE). Commited upstream (in a slightly different form) as r3831. Sponsored by: The FreeBSD Foundation MFC r358631 (by emaste): Reserve WXNEEDED ELF feature control flag This will be used to tag binaries that require W+X mappings, in advance of the ability to prevent W^X in mmap/mprotect. There is still some discussion about the flag's name, but the ABI won't change even if the name does (as kib pointed out in the review). Reviewed by: csjp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23909 MFC r358637 (by emaste): readelf: check note namesz and descsz Previously corrupt note namesz or descsz (perhaps caused by readelf's current lack of endian support for notes) resulted in a crash. Check that namesz and descsz do not extend beyond the end of the buffer before trying to access name and desc data. Reported by: jhb Sponsored by: The FreeBSD Foundation MFC r358639 (by emaste): readelf: simplify namesz / descsz checks Sponsored by: The FreeBSD Foundation MFC r358685 (by emaste): libelf: rationalize error handling in ELF note conversion Previously _libelf_cvt_NOTE_tom (to host) returned false if a note's namesz + descsz exceeded the buffer size, while _libelf_cvt_NOTE_tof (to file) silently truncated. Return false in the latter case too. Sponsored by: The FreeBSD Foundation MFC r358706 (by emaste): readelf: add XEN_ELFNOTE_PHYS32_ENTRY note See r336469 for details. Sponsored by: The FreeBSD Foundation MFC r358708 (by emaste): readelf: decode and print Xen ELF note strings Sponsored by: The FreeBSD Foundation MFC r358713 (by emaste): readelf: print GNU Build-ID Sponsored by: The FreeBSD Foundation MFC r358778 (by emaste): readelf: hoist file opening out of dump_object Diff reduction with HEAD to facilitate other MFCs. MFC r359166 (by emaste): objcopy: add new sections also when there is no .shstrtab Previously objcopy (elfcopy) --add-sections inserted new sections before .shstrtab, but omitted them if there was no .shstrtab. Now, after processing existing sections add new sections if they were not yet added. PR: 241437 Reported by: arrowd Submitted by: Tiger Gao <tig@FreeBSDFoundation.org> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23571 MFC r359172 (by markj): libdwarf: Make an out-pointer assignment unconditional. There is no reason for diep to ever be NULL, since in that case we would simply be leaking memory. CID: 1418801 Sponsored by: The FreeBSD Foundation MFC r359173 (by markj): libpe: Avoid a potential use-after-free in pe_update_symtab(). This function appears to be unused within FreeBSD and ELFToolChain. CID: 1418982 Sponsored by: The FreeBSD Foundation MFC r359174 (by markj): readelf: Avoid leaking ELF descriptors for archive entries. CID: 1292494 Sponsored by: The FreeBSD Foundation MFC r359175 (by markj): readelf: Fix another instance of the leak mentioned in r357542. CID: 1292493 Sponsored by: The FreeBSD Foundation MFC r359176 (by markj): libelftc: Fix a memory leak in cpp_demangle_read_type(). CID: 1305425 Sponsored by: The FreeBSD Foundation MFC r359189 (by emaste): readelf: simplify Xen string note printing Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24140 MFC r361104 (by jhibbits): elftoolchain: Add powerpc64 definition to elftoolchain config powerpc is already in place, but powerpc64 is needed separately. MFC r361662 (by emaste): readelf: add more DT_FLAGS_1 flags Reference: https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html > DF_1_SINGLETON Singleton symbols exist. > DF_1_STUB Object is a stub. > DF_1_PIE Object is a position-independent executable. Sponsored by: The FreeBSD Foundation MFC r365489 (by bdragon): [PowerPC64LE] PPC64LE support for libelf. Fix native detection when building on powerpc64le. I will be submitting this and r361104 upstream shortly. Sponsored by: Tag1 Consulting, Inc. MFC r366977 (by emaste): libelf: add compression header support GNU and Oracle libelf implementations added support for section compression, intended to reduce the size of DWARF debug info (which might be an order of magnitude larger than the code). There are two compressed ELF section formats: 1. Old GNU - sections are renmaed to start with 'z'. Section contains a magic number, uncompressed size, and compressed data. 2. Oracle and New GNU - compressed sections use the SHF_COMPRESSED flag. The compression header contains the compression type, uncompressed size, and uncompressed alignment. The second style is preferred and this change implements only that one. Submitted by: Tiger Gao <tig@FreeBSDFoundation.org> Reviewed by: markj Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24566 MFC r367209 (by emaste): readelf: Add -z decompression support Compatible with GNU readelf, -z decompresses sections displayed by -x or -p. ELF Tool Chain ticket #555 https://sourceforge.net/p/elftoolchain/tickets/555/ Submitted by: Tiger Gao <tig@FreeBSDFoundation.org> Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26909 MFC r367238 (by bdragon): Fix 32-bit build after r367209 Fix build on systems with a 32-bit size_t. Since it's being passed as a pointer, a 64-bit write to it will overflow. MFC r367322 (by dim): Merge elftoolchain r3877 (by jkoshy): Incorporate fixes from Dimitry Andric: - Use a BUFFER_GROW() macro to avoid rounding errors in capacity calculations. - Fix a bug introduced in [r3531]. - Fix handling of nested template parameters. Ticket: #581 This should fix a number of assertions on elftoolchain's cxxfilt, and allow it to correctly demangle several names that it could not handle before. Obtained from: https://sourceforge.net/p/elftoolchain/code/3877/ PR: 250702 Notes: svn path=/stable/11/; revision=367466
* MFC r344855 (by jhb):Dimitry Andric2020-11-0784-84/+7
| | | | | | | | | | Drop "All rights reserved" from my copyright statements. Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D19485 Notes: svn path=/stable/11/; revision=367457
* MFC 366296: Avoid a dubious assignment to bio_data in aio_qbio().John Baldwin2020-11-071-2/+1
| | | | | | | | | A user pointer is not a suitable value for bio_data and the next block of code always overwrites bio_data anyway. Just use cb->aio_buf directly in the call to vm_fault_quick_hold_pages(). Notes: svn path=/stable/11/; revision=367449
* MFC r367300:Mateusz Piotrowski2020-11-061-1/+2
| | | | | | | build.7: Mention etcupdate(8) alongside mergemaster(8) Notes: svn path=/stable/11/; revision=367415
* MFC r367299:Mateusz Piotrowski2020-11-061-1/+1
| | | | | | | | | | Fix a typo in the description of WITH_DEBUG_PORTS For each origin listed in WITH_DEBUG_PORTS, the ports framework sets WITH_DEBUG instead of WITH_DEBUG_PORTS. Notes: svn path=/stable/11/; revision=367413
* MFC 365842,365844: Remove support for setting some obscure fields.John Baldwin2020-11-061-47/+2
| | | | | | | | | | | | | | | | 365842: Remove support for setting some obscure fields. Don't permit setting the exception bitmap or VMCS entry interrupt information. These are not generally useful to set. If it is needed in the future, dedicated pseudo registers can be added for these that would be used with vm_set_register(). 365844: Remove no longer used variable. Notes: svn path=/stable/11/; revision=367408
* MFC r367258:Mateusz Piotrowski2020-11-041-27/+10
| | | | | | | Remove Tn macros from ifconfig.8 Notes: svn path=/stable/11/; revision=367319
* MFC r367259:Mateusz Piotrowski2020-11-041-2/+2
| | | | | | | ifconfig.8: Improve formatting of -f in synopsis Notes: svn path=/stable/11/; revision=367317
* MFC r367121:Brooks Davis2020-11-031-1/+1
| | | | | | | | | | | | | | | Disable ssp raw test without ASAN r366981 disabled ASAN when it might not be reliable (with an external compiler), but this test is broken without ASAN so disable it completely in that case. PR: 250706 Reviewed by: emaste, lwhsu Differential Revision: https://reviews.freebsd.org/D26982 Notes: svn path=/stable/11/; revision=367315
* MFC r367063:Brooks Davis2020-11-031-2/+2
| | | | | | | | | | | | | | | | | Key decleration of union semun on src version __FreeBSD__ is defined by the compiler derived from the triple. When building FreeBSD 11 on a FreeBSD 12 with a CROSS_TOOLCHAIN=llvm10, __FreeBSD__ was set to 12 when building lib32 (for some reason no triple is being passed which seems to mean that we're taking default values from the build system). This in turn meant we end up with a double decleration of union semun which is a build error. Reviewed by: gshapiro, dim Differential Revision: https://reviews.freebsd.org/D26902 Notes: svn path=/stable/11/; revision=367313
* MFC r367136:Li-Wen Hsu2020-11-021-5/+4
| | | | | | | Whitespace cleanup Notes: svn path=/stable/11/; revision=367266
* MFC r367134:Li-Wen Hsu2020-11-021-1/+1
| | | | | | | | | | Remove superfluous `this` in comment PR: 250721 Submitted by: Hiroya EBINE <hebiyan@protonmail.com> Notes: svn path=/stable/11/; revision=367264
* MFC r353127:Li-Wen Hsu2020-11-022-13708/+13968
| | | | | | | | | | | | | | | Pre-generate Big5 charmap from CLDR data. The one used previously was missing the characters in 0-127 range, making various tools try to escape them in output. PR: 235100 Reviewed by: bapt Tested by: Ting-Wei Lan <lantw44@gmail.com> Differential Revision: https://reviews.freebsd.org/D21794 Notes: svn path=/stable/11/; revision=367262
* MFC r367039:Mateusz Piotrowski2020-11-011-3/+3
| | | | | | | | | | | | | ifconfig.8: Remove spurious commas Correct misuse of commas/parentheses in an enumeration that makes the number of actual parameters more important than expected. PR: 250526 Submitted by: Samy Mahmoudi <samy.mahmoudi__gmail_com> Notes: svn path=/stable/11/; revision=367247
* MFC r364480:Dimitry Andric2020-10-311-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 1ce07cd614be from llvm git (by me): Instantiate Error in Target::GetEntryPointAddress() only when necessary When Target::GetEntryPointAddress() calls exe_module->GetObjectFile()->GetEntryPointAddress(), and the returned entry_addr is valid, it can immediately be returned. However, just before that, an llvm::Error value has been setup, but in this case it is not consumed before returning, like is done further below in the function. In https://bugs.freebsd.org/248745 we got a bug report for this, where a very simple test case aborts and dumps core: * thread #1, name = 'testcase', stop reason = breakpoint 1.1 frame #0: 0x00000000002018d4 testcase`main(argc=1, argv=0x00007fffffffea18) at testcase.c:3:5 1 int main(int argc, char *argv[]) 2 { -> 3 return 0; 4 } (lldb) p argc Program aborted due to an unhandled Error: Error value was Success. (Note: Success values must still be checked prior to being destroyed). Thread 1 received signal SIGABRT, Aborted. thr_kill () at thr_kill.S:3 3 thr_kill.S: No such file or directory. (gdb) bt #0 thr_kill () at thr_kill.S:3 #1 0x00000008049a0004 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52 #2 0x0000000804916229 in abort () at /usr/src/lib/libc/stdlib/abort.c:67 #3 0x000000000451b5f5 in fatalUncheckedError () at /usr/src/contrib/llvm-project/llvm/lib/Support/Error.cpp:112 #4 0x00000000019cf008 in GetEntryPointAddress () at /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:267 #5 0x0000000001bccbd8 in ConstructorSetup () at /usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:67 #6 0x0000000001bcd2c0 in ThreadPlanCallFunction () at /usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:114 #7 0x00000000020076d4 in InferiorCallMmap () at /usr/src/contrib/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:97 #8 0x0000000001f4be33 in DoAllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:604 #9 0x0000000001fe51b9 in AllocatePage () at /usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:347 #10 0x0000000001fe5385 in AllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:383 #11 0x0000000001974da2 in AllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2301 #12 CanJIT () at /usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2331 #13 0x0000000001a1bf3d in Evaluate () at /usr/src/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp:190 #14 0x00000000019ce7a2 in EvaluateExpression () at /usr/src/contrib/llvm-project/lldb/source/Target/Target.cpp:2372 #15 0x0000000001ad784c in EvaluateExpression () at /usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:414 #16 0x0000000001ad86ae in DoExecute () at /usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:646 #17 0x0000000001a5e3ed in Execute () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1003 #18 0x0000000001a6c4a3 in HandleCommand () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1762 #19 0x0000000001a6f98c in IOHandlerInputComplete () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2760 #20 0x0000000001a90b08 in Run () at /usr/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:548 #21 0x00000000019a6c6a in ExecuteIOHandlers () at /usr/src/contrib/llvm-project/lldb/source/Core/Debugger.cpp:903 #22 0x0000000001a70337 in RunCommandInterpreter () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2946 #23 0x0000000001d9d812 in RunCommandInterpreter () at /usr/src/contrib/llvm-project/lldb/source/API/SBDebugger.cpp:1169 #24 0x0000000001918be8 in MainLoop () at /usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:675 #25 0x000000000191a114 in main () at /usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:890 Fix the incorrect error catch by only instantiating an Error object if it is necessary. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D86355 This should fix lldb aborting as described in the scenario above. Reported by: dmgk PR: 248745 Notes: svn path=/stable/11/; revision=367228
* MFC r366961:Hans Petter Selasky2020-10-301-0/+18
| | | | | | | | | | | | Fix for loading cuse.ko via rc.d . Make sure we declare the cuse(3) module by name and not only by the version information, so that "kldstat -q -m cuse" works. Found by: Goran Mekic <meka@tilda.center> Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=367158
* MFC r367070:Cy Schubert2020-10-301-1/+1
| | | | | | | | | | | Remove a random equal sign from the example. It should not be there. It's a syntax error. PR: 210303 Reported by: leventelist at gmail.com Notes: svn path=/stable/11/; revision=367155
* MFC r367069:Cy Schubert2020-10-301-1/+1
| | | | | | | | Continued ipfilter #ifdef cleanup. The r343701 log entry contains a complete description. Notes: svn path=/stable/11/; revision=367154
* MFC r366911:Brooks Davis2020-10-295-21/+9
| | | | | | | | | | | | | | | | | | | | | vmapbuf: don't smuggle address or length in buf Instead, add arguments to vmapbuf. Since this argument is always a pointer use a type of void * and cast to vm_offset_t in vmapbuf. (In CheriBSD we've altered vm_fault_quick_hold_pages to take a pointer and check its bounds.) In no other situtation does b_data contain a user pointer and vmapbuf replaces b_data with the actual mapping. Suggested by: jhb Reviewed by: imp, jhb Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26784 Notes: svn path=/stable/11/; revision=367145
* MFC r366932:Konstantin Belousov2020-10-291-4/+5
| | | | | | | | | sysv_sem: semusz depends on semume. PR: 250361 Notes: svn path=/stable/11/; revision=367129
* MFC r366981:Brooks Davis2020-10-261-1/+3
| | | | | | | | | | | | | | | Only use ASAN when using the in-tree compiler When building FreeBSD 11 on a FreeBSD 12 system with CROSS_TOOLCHAIN=llvm10 we end up trying to link against the packaged version of the sanitizer library. This resulted in a requirement for getentropy(3) which is not present in FreeBSD 11. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D26903 Notes: svn path=/stable/11/; revision=367062
* This is a direct commit to stable/11 however it performs MFC r366857Cy Schubert2020-10-261-1/+1
| | | | | | | | | | | | | | | | | | applied to stable/12 with r367049. This is due to src/etc/rc.d/netif having been previously moved to src/libexec/rc.d/netif. Destroy cloned interfaces at netif stop, netif restart and shutdown. This is especially important during shutdown because a child interface of lagg with WOL enabled will not enable WOL at interface shutdown and thus no WOL to wake up the device (and machine). PR: 158734, 109980 Reported by: Antonio Huete Jimenez <tuxillo at quantumachine.net> Marat N.Afanasyev <marat at zealot.ksu.ru> reviewed by: kp Notes: svn path=/stable/11/; revision=367050
* MFC r366686:Ravi Pokala2020-10-251-0/+2
| | | | | | | | | | | | | | | | | | Allow IP over IB to work with multiple FIBs. Call M_SETFIB() to make sure the IPoIB packet is directed to the correct interface-specific FIB. This was sufficient to allow general-purpose routing using the default FIB, and a separate FIB for routing between IPoIB on ib0 and IPoEthernet on mce0. Reviewed by: hselasky Obtained from: Anmol Kumar <anmolk at panasas dot com> Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D26733 Notes: svn path=/stable/11/; revision=367047
* MFC r366921: Import tzdata 2020dPhilip Paeps2020-10-235-20/+68
| | | | Notes: svn path=/stable/11/; revision=366957
* MFC r366671:Brooks Davis2020-10-221-35/+34
| | | | | | | | | | | | | | | | | | libgssapi: modernize static string array use Use designated initializers to document positions in the arrays rather than requiring counting. Use nitems() rather than rolling it by hand to count elements. Also, passify a Clang 12 warning about suspcious string concatenation within an array initializer by adding parentheses. Reviewed by: emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26592 Notes: svn path=/stable/11/; revision=366940
* MFC r366731:Brooks Davis2020-10-221-6/+7
| | | | | | | | | | | | | | | | physio: Don't store user addresses in bio_data Only assign the address from the iovec to bio_data if it is a kernel address. This was the single place where bio_data stored (however briefly) a userspace pointer. Reviewed by: imp, markj Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D26783 Notes: svn path=/stable/11/; revision=366939
* MFC 366682:Andrey V. Elsukov2020-10-201-1/+2
| | | | | | | | | | | | | | | Join to AllHosts multicast group again when adding an existing IPv4 address. When SIOCAIFADDR ioctl configures an IPv4 address that is already exist, it removes old ifaddr. When this IPv4 address is only one configured on the interface, this also leads to leaving from AllHosts multicast group. Then an address is added again, but due to the bug, this doesn't lead to joining to AllHosts multicast group. Submitted by: yannis.planus_alstomgroup.com Notes: svn path=/stable/11/; revision=366894
* MFC r349277 and r366669:Hans Petter Selasky2020-10-202-4/+60
| | | | | | | | | | Implement more RCU list functions in the LinuxKPI. Differential Revision: https://reviews.freebsd.org/D20719 Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=366889
* MFC r366536:Hans Petter Selasky2020-10-201-3/+17
| | | | | | | | | Try a bit harder to get the USB device descriptor in case the initial read fails. Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=366887
* MFC r366535:Hans Petter Selasky2020-10-201-1/+1
| | | | | | | | | | | The ethernet header structure is read-only. Add const keyword. (This is a diff reduction towards D26254) Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=366885
* MFC r366533:Hans Petter Selasky2020-10-201-2/+2
| | | | | | | | | | Allow evdev's rcpt_mask and sysmouse_t_axis parameters to be specified in /boot/loader.conf . Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=366883
* MFC r366518:Hans Petter Selasky2020-10-201-3/+2
| | | | | | | | | | | | | | Properly cleanup driver during remove_one() in mlx5core. Cleanup all host resources, SYSCTLs, MSIX vectors and memory used by the host and only leave the device allocated memory behind, if any, because it may still be in use, when the PCI remove function is called. Else future probe calls may fail due to SYSCTLs already existing. Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=366881
* MFC r347596 and r366432:Hans Petter Selasky2020-10-203-5/+12
| | | | | | | | | | | | | Populate the acquire context field of a ww_mutex in the LinuxKPI. Bump the FreeBSD version to force recompilation of external kernel modules. Differential Revision: https://reviews.freebsd.org/D19565 Differential Revision: https://reviews.freebsd.org/D26657 Submitted by: greg_unrelenting.technology (Greg V) Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=366879
* MFC r366431:Hans Petter Selasky2020-10-201-0/+2
| | | | | | | | | | | | Add support for Google Cr50 (GSC) Closed Case Debugging UART interfaces to the USB generic serial port driver, ugensa. Differential Revision: https://reviews.freebsd.org/D21863 Submitted by: greg_unrelenting.technology (Greg V) Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=366877
* MFC r365966:Hans Petter Selasky2020-10-202-0/+3
| | | | | | | | | | | Add support for Winbond USB CDC modem device found in Tenma power supply. PR: 249384 Submitted by: darius@dons.net.au Sponsored by: Mellanox Technologies // NVIDIA Networking Notes: svn path=/stable/11/; revision=366875
* MFC r366689: Fix sbuf_finish() error code check in user-space.Alexander Motin2020-10-202-3/+18
| | | | Notes: svn path=/stable/11/; revision=366868
* MFC r366779: Import tzdata 2020cPhilip Paeps2020-10-186-5/+55
| | | | Notes: svn path=/stable/11/; revision=366802
* MFC r366529: Import tzdata 2020bPhilip Paeps2020-10-1118-315/+521
| | | | Notes: svn path=/stable/11/; revision=366625
* MFC r366415:Konstantin Belousov2020-10-102-1/+1
| | | | | | | Move ctx_switch_xsave declaration to amd64 md_var.h. Notes: svn path=/stable/11/; revision=366619