aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libarchive: merge security fix from vendor branchstable/11Martin Matuska2023-09-111-10/+25
| | | | | | | | | | | | | | This commit fixes a couple of security vulnerabilities in the PAX writer: 1. Heap overflow in url_encode() in archive_write_set_format_pax.c 2. NULL dereference in archive_write_pax_header_xattrs() 3. Another NULL dereference in archive_write_pax_header_xattrs() 4. NULL dereference in archive_write_pax_header_xattr() Security: No known reference yet Obtained from: https://github.com/libarchive/libarchive/commit/1b4e0d0f9 MFC after: 3 days (cherry picked from commit f10f65999fe56e92f00b5bc5d27ac342cfea5364)
* zlib: Fix a bug when getting a gzip header extra field with inflate().Mark Adler2023-01-241-2/+3
| | | | | | | | | | | | | | | If the extra field was larger than the space the user provided with inflateGetHeader(), and if multiple calls of inflate() delivered the extra header data, then there could be a buffer overflow of the provided space. This commit assures that provided space is not exceeded. (cherry picked from zlib commit eff308af425b67093bab25f80f1ae950166bece1) (cherry picked from zlib commit 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d) (cherry picked from commit dc3509f1aafcd966f3dd9226115cf94b691ff3c7) (cherry picked from commit 2969066f73fc67a614144ac09b9f3f5291937fed) (cherry picked from commit 10cc2bf5f7a592981ee00d22eb13e100beed1e64)
* libarchive: merge from vendor branchMartin Matuska2022-12-2864-178/+610
| | | | | | | | | | | Libarchive 3.6.2 Important bug fixes: rar5 reader: fix possible garbled output with bsdtar -O (#1745) mtree reader: support reading mtree files with tabs (#1783) various small fixes for issues found by CodeQL (cherry picked from commit bd5e624a861433dee76fe00a8acedc9564425332)
* libarchive: Add missing MLINK.Dag-Erling Smørgrav2022-12-281-0/+1
| | | | | | Differential Revision: https://reviews.freebsd.org/D37398 (cherry picked from commit f1ad5e3931996d222e87140c5621323b6986e1ff)
* libarchive: import changes from upstreamMartin Matuska2022-12-284-9/+17
| | | | | | | | | Libarchive 3.6.1 Bug fixes: PR #1549: archive_digest: check return value of EVP_DigestInit() (cherry picked from commit 7ec51a3e2b91caaea5c1de1a4c7b362b20d35a62)
* libarchive: merge vendor bugfixesMartin Matuska2022-12-282-1/+19
| | | | | | | | | | Bugfixes: IS #1685 and OSS-Fuzz #38764 (security): (ISO reader) fix possible heap buffer overflow in read_children() IS #1715 and OSS-Fuzz #46279 (security): (RARv4 reader) fix heap-use-after-free in run_filters() (cherry picked from commit 9f690fcfdc050f566466ac10cca29ff43bf4fe92)
* libarchive: merge vendor bugfixesMartin Matuska2022-12-285-7/+10
| | | | | | | | | | Bugfixes: IS #1672 and OSS-Fuzz #38766: (zip reader) fix possible out-of-bounds read in zipx_lzma_alone_init() PR #1676: (mtree reader) remove the unused variable "detected_bytes" PR #1674: (doc) fix use of At mdoc(7) macro in cpio.5 (cherry picked from commit 0c9c2eb394b4a5694bc5ea11b326f334c735c813)
* dhclient(8): Verify lease-, renewal- and rebinding-time option sizes.Hans Petter Selasky2022-11-211-3/+3
| | | | | | | | | | | | | Else out-of-bound reads and undefined behaviour may happen. The current code only checked for the presence of the first of four bytes. Make sure the fields in question have the minium size required. No functional change intended. Reviewed by: rrs@ Sponsored by: NVIDIA Networking (cherry picked from commit 3492caf512ae090816b4ffa275be43b2f5cfc460)
* tcp: Correctly compute the retransmit length for all 64-bit platforms.Hans Petter Selasky2022-06-062-6/+10
| | | | | | | | | | | | | | | | When the TCP sequence number subtracted is greater than 2**32 minus the window size, or 2**31 minus the window size, the use of unsigned long as an intermediate variable, may result in an incorrect retransmit length computation on all 64-bit platforms. While at it create a helper macro to facilitate the computation of the difference between two TCP sequence numbers. Differential Revision: https://reviews.freebsd.org/D35388 Reviewed by: rscheff Sponsored by: NVIDIA Networking (cherry picked from commit 28173d49dccb91e50be9c401dbad1da908a5dc75)
* fetch: MFC: make -S argument accept values > 2GBStefan Eßer2022-06-061-1/+1
| | | | | | | | | | | | | | | | Use strtoll() to parse the argument of the -S option. FreeBSD has supported 64 bit file offsets for more than 25 years on all architectures and off_t is a 64 bit integer type for that reason. While strtol() returns a 64 bit value on 64 LP64 architectures, it is limit to 32 bit on e.g. i386. The strtoll() function returns a 64 but result on all supported architectures and therefore supports the possible file lengths and file offsets on 32 bit archtectures. Reported by: antoine (cherry picked from commit 32066c96fa00fc19c8355e1956ca5aa9ead37673)
* xhci(4): Always add and evaluate the slot context.Hans Petter Selasky2022-05-041-1/+5
| | | | | | | | | | Because the maximum number of endpoint contexts is stored there. Tested by: ehaupt@ PR: 262882 Sponsored by: NVIDIA Networking (cherry picked from commit 09dd1adfa4c9bb1b49f4ef5524a308732883e132)
* xhci(4): Only drop BULK and INTERRUPT endpoints to reset data toggle.Hans Petter Selasky2022-05-041-2/+9
| | | | | | | | | | | Only drop BULK and INTERRUPT endpoints, to reset the data toggle, because for other endpoint types this is not critical. Tested by: ehaupt@ PR: 262882 Sponsored by: NVIDIA Networking (cherry picked from commit e276d281503160ba3648bd394cde95736ee53329)
* xhci(4): Ensure the so-called data toggle gets properly reset.Hans Petter Selasky2022-04-271-4/+23
| | | | | | | | | | | | | | | | Use the drop and enable endpoint context commands to force a reset of the data toggle for USB 2.0 and USB 3.0 after: - clear endpoint halt command (when the driver wishes). - set config command (when the kernel or user-space wants). - set alternate setting command (only affected endpoints). Some XHCI HW implementations may not allow the endpoint reset command when the endpoint context is not in the halted state. Reported by: Juniper and Gary Jennejohn Sponsored by: NVIDIA Networking (cherry picked from commit cda31e734925346328fd2369585ab3f6767ec225)
* No need to stop XHCI endpoints in disabled state.Hans Petter Selasky2022-04-271-0/+2
| | | | | | | | | | | Some AMD XHCI implementations apparently assert a permanent internal failure if this happens. Submitted by: ali.abdallah@suse.com PR: 251503 Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 1622a498525b4ef0d23d30a587b9a3888c3ee0d5)
* net80211: validate Mesh ID length in ieee80211_parse_beaconBjoern A. Zeeb2022-04-061-0/+6
| | | | | | | | Reported by: m00nbsd working with Trend Micro Zero Day Initiative (cherry picked from commit fb8c87b4f3bfdfac014f9d894fe75fbad0391b24) (cherry picked from commit 72617f9246e3a4be28eeafeae1bdd983143eef3e) (cherry picked from commit e7c990ba3f8de8c4882390cad9b01a9fa25ad068)
* mpr/mps/mpt: verify cfg page ioctl lengthsEd Maste2022-04-063-0/+39
| | | | | | | | | | | | | | | | | | | | | | | *_CFG_PAGE ioctl handlers in the mpr, mps, and mpt drivers allocated a buffer of a caller-specified size, but copied to it a fixed size header. Add checks that the size is at least the required minimum. Note that the device nodes are owned by root:operator with 0640 permissions so the ioctls are not available to unprivileged users. This change includes suggestions from scottl, markj and mav. Two of the mpt cases were reported by Lucas Leong (@_wmliang_) of Trend Micro Zero Day Initiative; scottl reported the third case in mpt. Same issue found in mpr and mps after discussion with imp. Reported by: Lucas Leong (@_wmliang_), Trend Micro Zero Day Initiative Reviewed by: imp, mav MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34692 (cherry picked from commit 8276c4149b5fc7c755d6b244fbbf6dae1939f087)
* bhyve: validate e82545 checksum offset fieldMark Johnston2022-04-061-3/+6
| | | | | | | | Reported by: Mehdi Talbi, Synacktiv (cherry picked from commit b0aa20bec5db244980a0248e24dd6b8e1e68c4d0) (cherry picked from commit 53f72209479885dfa6a7e6ed68cbc82c68464f4b) (cherry picked from commit 629df7c108abe26496c3a5c196cce79a47bc1f21)
* installworld: handle ldd including preloaded objectsEd Maste2022-04-041-0/+4
| | | | | | | | | | | | | | | | | | The installworld target makes a temporary copy of binaries to be used during the install. Libraries that they depend on are also included, found by using `ldd`. After commit 0913953c9ed0 ldd started listing preloaded objects, including [vdso], under a [preloaded] header. Skip ldd output that is enclosed in square brackets. Reviewed by: cy, kib [earlier version] MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34734 (cherry picked from commit b3b462229f972e2ed24d450d7d2f8855cdd58a87) (cherry picked from commit 6550cae9b83aa12c2300727d9d4ec6cc816d664b)
* zlib: apply upstream fix for CVE-2018-25032Eugene Grosbein2022-04-043-70/+79
| | | | | | | | | | Fix memory corruption when deflating (i.e., when compressing) if the input has many distant matches. This is direct commit to stable/11 using unmodified upstream fix https://github.com/madler/zlib/commit/5c44459c3b28a9bd3283aaceab7c615f8020c531 Security: CVE-2018-25032
* netmap: Fix TOCTOU vulnerability in nmreq_copyinVincenzo Maffione2022-03-301-28/+18
| | | | | | | | | | | | The total size of the user-provided nmreq was first computed and then trusted during the copyin. This might lead to kernel memory corruption and escape from jails/containers. Reported by: Lucas Leong (@_wmliang_) of Trend Micro Zero Day Initiative Security: CVE-2022-23084 MFC after: 3 days (cherry picked from commit 393729916564ed13f966e09129a24e6931898d12)
* Avoid kernel stack disclosure in compat32 statEd Maste2022-03-291-0/+2
| | | | | | | | | | | | | copy_stat and copy_ostat used by 32-bit compat *stat calls left spare and padding bytes uninitialized. This issue does not exist in stable/12 and later as it was incidentally addressed as part of the 64-bit inode project. Reported by: Reno Robert of Trend Micro Zero Day Initiative Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34706
* openssl: MFC: Fix a bug in BN_mod_sqrt() that can cause it to loop forever.Eugene Grosbein2022-03-272-14/+31
| | | | | | | | Obtained from: OpenSSL Project Security: CVE-2022-0778 Security: SA-22:03 (cherry picked from commit fdc418f15e92732a3551832bcb625ba9b47242df)
* netmap: add a tunable for the maximum number of VALE switchesVincenzo Maffione2022-03-205-10/+23
| | | | | | | | | | The new dev.netmap.max_bridges sysctl tunable can be set in loader.conf(5) to change the default maximum number of VALE switches that can be created. Current defaults is 8. MFC after: 2 weeks (cherry picked from commit dd6ab49a9aebb5fbb85973d9a859d24daa5e2165)
* netmap: Fix integer overflow in nmreq_copyinVincenzo Maffione2022-03-201-3/+13
| | | | | | | | | | | | An unsanitized field in an option could be abused, causing an integer overflow followed by kernel memory corruption. This might be used to escape jails/containers. Reported by: Reno Robert and Lucas Leong (@_wmliang_) of Trend Micro Zero Day Initiative Security: CVE-2022-23085 (cherry picked from commit 694ea59c7021c25417e6d516362d2f59b4e2c343)
* libarchive: merge vendor bugfixMartin Matuska2022-02-231-4/+9
| | | | | | | OSS-Fuzz #44843 (security): RAR reader: fix null-dereference in RAR (v4) filter code (cherry picked from commit 5ccf909af9c1117172ff0742515da2d2e0cef89e)
* libarchive: merge vendor bugfixesMartin Matuska2022-02-239-26689/+2188
| | | | | | | | Bugfixes: OSS-Fuzz #44547: fix heap-use-after-free in RAR (v4) filter code PR #1671: Fix 7z PPMD reading beyond boundary (cherry picked from commit 47a2e541dc68cfcc49e5ab9e6020227e3b0db2d7)
* libarchive: import changes from upstreamMartin Matuska2022-02-2392-828/+36973
| | | | | | | | | | | | | | | | | | | | | | | | | Libarchive 3.6.0 New features: PR #1614: tar: new option "--no-read-sparse" PR #1503: RAR reader: filter support PR #1585: RAR5 reader: self-extracting archive support New features (not used in FreeBSD base): PR #1567: tar: threads support for zstd (#1567) PR #1518: ZIP reader: zstd decompression support Security Fixes: PR #1491, #1492, #1493, CVE-2021-36976: fix invalid memory access and out of bounds read in RAR5 reader PR #1566, #1618, CVE-2021-31566: extended fix for following symlinks when processing the fixup list Other notable bugfixes and improvements: PR #1620: tar: respect "--ignore-zeros" in c, r and u modes PR #1625: reduced size of application binaries (cherry picked from commit 833a452e9f082a7982a31c21f0da437dbbe0a39d)
* gpart(8): MFC: add minimal reference to glabel(8) to manual pageEugene Grosbein2022-01-171-0/+5
| | | | (cherry picked from commit ba94a95402f335c8e7aa8e28ebdad43361c65909)
* MFC: rc.d/rctl: unbreak for distinct /usr filesystemEugene Grosbein2021-11-231-0/+1
| | | | | | | Both rctl and used xargs utility live in /usr/bin so add REQUIRE: FILESYSTEMS Reported by: Peter <pmc@citylink.dinoex.sub.org>
* libarchive: cherry-pick bugfix from vendorMartin Matuska2021-11-201-12/+75
| | | | | | | | | | | | | | | | | | | | | Vendor commit message (ede459d2e): archive_write_disk_posix: fix writing fflags broken in 8a1bd5c The fixup list was erroneously assumed to be directories only. Only in the case of critical file flags modification (e.g. SF_IMMUTABLE on BSD systems), other file types (e.g. regular files or symbolic links) may be added to the fixup list. We still need to verify that we are writing to the correct file type, so compare the archive entry file type with the file type of the file to be modified. Fixes vendor issue #1617: Immutable flag no longer preserved during tar extraction on FreeBSD Reported by: markjdb Libarchive commit: ede459d2ebb879f5eedb6f7abea203be0b334230 (cherry picked from commit 201d0ebee321fb1a5501e17a4f150aa211020c5c)
* snd_uaudio(4): Fix string index computations for iFeature.Hans Petter Selasky2021-11-161-7/+7
| | | | | | | | | | This allows the iFeature strings to be properly read by the snd_uaudio(4) driver, when parsing the audio feature unit descriptors. Submitted by: Zhichao1.Li@dell.com Sponsored by: NVIDIA Networking (cherry picked from commit 11f09b17fe2cf0b5489601aee548a06486f0b749)
* Partially revert ac76bc1145dd because it is no longer necessaryDimitry Andric2021-11-083-3/+3
| | | | | | | | | | | | | In ac76bc1145dd, I added a few volatiles to work around ctrig_test failures with {inf,inf}. This is not necessary anymore now, since in 3b00222f156d we added -fp-exception-behavior=maytrap for clang >= 10 in libm's Makefile. (The flag tells clang to use stricter floating point semantics, which libm depends on.) PR: 244732, 254911 Fixes: ac76bc1145dd (cherry picked from commit e2157cd0000f6dbb6465d7a885f2dcfd4d3596cb)
* contrib/tzdata: correct DST in PalestinePhilip Paeps2021-10-251-6/+13
| | | | | | | Direct commit to stable/11. Merge the corrected DST transition date from tzdata 2021e. This corrects future timestamps in Palestine.
* contrib/tzdata: correct DST in FijiPhilip Paeps2021-10-213-13/+30
| | | | | | | | | | Direct commit to stable/11. Unfortunately, there is still no clear consensus on the tz mailing list about some of the changes introduced by tzdata 2021b and later releases. Pending consensus, only merge the recently announced DST transition date for Fiji and corrections to commentary from tzdata 2021d. This corrects future timestamps in Fiji.
* Upgrade ENA to v2.4.1Marcin Wojtas2021-10-1211-234/+900
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ena: Remove redundant declaration of ena_log_level. GCC6 raises a -Wredundant-decl error due to duplicate declarations in ena_fbsd_log.h and ena_plat.h. Submitted by: jhb Sponsored by: Chelsio Communications (cherry picked from commit 8843787aa1bdbd10de6ba47a04489179ec2d2d3c) ena: Avoid unnecessary mbuf collapses for LLQ condition In case of Low-latency Queue, one small enough descriptor can be pushed directly to the ENA hw, thus saving one fragment. Check for this condition before performing collapse. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit c81f8c26115a64b9a97ecdb2a64e824dd839ee73) ena: Trigger reset on ena_com_prepare_tx failure All ena_com_prepare_tx errors other than ENA_COM_NO_MEM are fatal and require device reset. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 36130d2979d695dd439bc607feb00dcdb9a1937b) ena: Prevent reset after device destruction Check for ENA_FLAG_TRIGGER_RESET inside a locked context in order to avoid potential race conditions with ena_destroy_device. This aligns the reset task logic with the Linux driver. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 433ab9b6987b42b3e5b25b8b5dc7e5178c7ef9bb) ena: Add extra log messages Stay aligned with the Linux driver by adding the following logs: * inform the user about retrying queue creation * warn on non-empty ena_tx_buffer.mbuf prior to ena_tx_map_mbuf Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 77160654a162b5faa8ad7a02e18d2bef2589f868) ena: Add locking assertions ENA silently assumed that ena_up, ena_down and ena_start_xmit routines should be called within locked context. Driver's logic heavily assumes on concurrent access to those routines, so for safety and better documentation about this assumption, the locking assertions were added to the above functions. The assertion was added only for the main steps (skipping the helper functions) which can be called from multiple places including the kernel and the driver itself. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit cb98c439d66c303353a9f4abbbe9ddb51559c638) ena: Move RSS logic into its own source files Delegate RSS related functionality into separate .c/.h files in preparation for the full RSS support. While at it, reorder functions and remove prototypes for ones with internal linkage. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 986e7b9227668caf9620f207e3c1d708c87b634d) ena: Disable meta descriptor caching for netmap If LLQ is being used, `ena_tx_ctx.meta_valid` must stay enabled. This fixes netmap support on latest generation ENA HW and aligns it with the core driver behavior. As netmap doesn't support any csum offloads, the `adapter->disable_meta_caching` value can be simply passed to the HW. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit a831466830de6ab55fc03170290b313157196e81) ena: Share ena_global_lock between driver instances In order to use `ena_global_lock` in sysctl context, it must be kept outside the driver instance's software context, as sysctls can be called before attach and after detach, leading to lock use before sx_init and after sx_destroy otherwise. Solve this issue by turning `ena_global_lock` into a file scope variable, shared between all instances of the driver and associated sysctl context, and in turn initialized/destroyed in dedicated SYSINIT/SYSUNINIT functions. As a side effect, this change also fixes existing race in the reset routine, when simultaneously accessing sysctl exposed properties. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 07aff471c0de2de9a1dc5c7749c46b525bdd0201) ena: Add missing statistics Provide the following sysctl statistics in order to stay aligned with the Linux driver: * rx_ring.csum_good * tx_ring.unmask_interrupt_num Also rename the 'bad_csum' statistic name to 'csum_bad' for alignment. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 223c8cb12e951c63807300a0cbdc4a1569520b4b) ena: Implement full RSS reconfiguration Bind RX/TX queues and MSI-X vectors to matching CPUs based on the RSS bucket entries. Introduce sysctls for the following RSS functionality: - rss.indir_table: indirection table mapping - rss.indir_table_size: indirection table size - rss.key: RSS hash key (if Toeplitz used) Said sysctls are only available when compiled without `option RSS`, as kernel-side RSS support currently doesn't offer RSS reconfiguration. Migrate the hash algorithm from CRC32 to Toeplitz and change the initial hash value to 0x0 in order to match the standard Toeplitz implementation. Provide helpers for hash key inversion required for HW operations. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 6d1ef2abd330fac4057f092abbbdc28a568b4327) ena: fix building in-kernel driver When building ENA as compiled into the kernel, the driver would fail to build. Resolve the problem by introducing the following changes: 1. Add missing `ena_rss.c` entry in `sys/conf/files`. 2. Prevent SYSCTL_ADD_INT from throwing an assert due to an extra CTLTYPE_INT flag. Fixes: 986e7b92276 ("ena: Move RSS logic into its own source files") Fixes: 6d1ef2abd33 ("ena: Implement full RSS reconfiguration") Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf Sponsored by: Amazon, Inc. MFC after: 1 week (cherry picked from commit a3f0d18237bdcf272461d3b4b682de384c572144) ena: Update driver version to v2.4.1 Some of the changes in this release: * Hardware RSS hash key reconfiguration and indirection table reconfiguration support. * Full kernel RSS support. * Extra statistic counters. * Netmap support for ENAv3. * Locking assertions. * Extra log messages. * Reset handling fixes. Submitted by: Michal Krawczyk <mk@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 42c7760be3ea420668f625f2064ae347aa7e818e)
* Upgrade ENA to v2.4.0Marcin Wojtas2021-10-1214-368/+773
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | teach ena driver about RSS kernel option Networking is broken if the driver configures its (virtual) hardware to use a hash algorithm (or a key) different from the one that the network stack (software RSS) uses. This can be seen with connections initiated from the host. The PCB will be placed into the hash table based on the hash value calculated by the software. The hardware-calculated hash value in reponse packets will be different, so the PCB won't be found. Tested with a kernel compiled with 'options RSS' on an instance with ena driver. Reviewed by: mw, adrian MFC after: 2 weeks Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D24733 (cherry picked from commit b40dd828bdc96959cf5fa90d02fc00d96c54fbe4) ena: change ENA C++-style comment into C-style According to man style(9), only C-style comments should be used. Submitted by: Michal Krawczyk <mk@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 438c9e3cf89403628ec237cfecdd0538f208087b) ena: add support for the large LLQ headers in ENA Default LLQ (Low-latency queue) maximum header size is 96 bytes and can be too small for some types of packets - like IPv6 packets with multiple extension. This can be fixed, by using large LLQ headers. If the device supports larger LLQ headers, the user can activate this feature by setting sysctl tunable 'hw.ena.force_large_llq_header' to '1' in the /boot/loader.conf file. In case the device isn't supporting this feature, the default value (96B) will be used. Submitted by: Michal Krawczyk <mk@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit beaadec9eaec8e6b266faff3b0880a141728fcef) ena: remove surplus NULL checks when freeing ENA resources Calling free on a NULL pointer is valid, as appropriate check is already done internally: /* free(NULL, ...) does nothing */ if (addr == NULL) return; Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit ddec69e6a796283497ebada0569f34bd41bbdf37) ena: hide sysctl nodes for unused ENA queues IO queue related attributes are registered statically at driver attach with the rest of the ENA specific sysctl nodes. However, the number of queues can be changed at runtime via the `ena_sysctl_io_queues_nb` request, leading to a potential exposure of attributes for non-existing queues. Introduce a new `ena_sysctl_update_queue_node_nb` function, which updates the sysctl nodes after the number of queues is altered. This happens by either registering or unregistering node specific oids, based on a delta between the previous and current queue count. NOTE: All unregistered oids must be registered again before the driver detach, e.g. by another call to this function. Submitted by: Artur Rojek <ar@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 0e7d31f63b9db869c91228d8ed1e984bdee2b931) Merge tag 'vendor/ena-com/2.4.0' Update the driver in order not to break its compilation and make use of the new ENA logging system Migrate platform code to the new logging system provided by ena_com layer. Make ENA_INFO the new default log level. Remove all explicit use of `device_printf`, all new logs requiring one of the log macros to be used. (cherry picked from commit 3fc5d816f8831d6fc2816ac97bd78dc486cd080c) Update ENA driver man page Bring the obsolete man page up to date: * update diagnostic error messages * add documentation of loader tunables * document netmap support * add a driver history section * update the contact information Submitted by: Artur Rojek <ar@semihalf.com> Submitted by: Michal Krawczyk <mk@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit e34856a2c44a45512463aed0d1794f34258c66ee) Update ENA version to v2.4.0 Some of the changes in this release: * Large LLQ headers, * Bug/stability fixes, * Change of the README/Documentation. Submitted by: Michal Krawczyk <mk@semihalf.com> Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit 93f0df457bf1d0e5f71839ab969c94d1f95813fb)
* syslogd: undo regression after r326573Eugene Grosbein2021-10-071-24/+17
| | | | | | | | | Restore ability for our syslogd to collect pre-RFC3164 formatted messages from remote hosts that was broken with r326573. Note that parsing of RFC5424 format not changed. (cherry picked from commit 3b4cc56e524ac947ba0e6571e2c455139c2839ec)
* ipfilter: Print the correct TCP sequence index numberCy Schubert2021-10-011-1/+1
| | | | | | | TCP sequence numbers in the FTP proxy are maintained in a two dimensional array. The debug message prints the same seq[N] for both. Fix that. (cherry picked from commit df38343e71304169ebca0e4c4fa24b339982d7be)
* ipfilter: Correct a commentCy Schubert2021-10-011-1/+1
| | | | | | Correct a comment's grammar and while at it clarify its meaining. (cherry picked from commit aa6cfcc820b438cec58fbe0af408d4457f8daf9d)
* ipfilter: Avoid a null if-then-else blocksCy Schubert2021-10-012-12/+8
| | | | | | | | When WITHOUT_INET6 is selected we generate a null if-then-else blocks due to incorrect placment of #if statments. Move the #if statements reducing unnecessary runtime comparisons WITHOUT_INET6. (cherry picked from commit 73db3b64f167972db3ee3f780cecb439b09492b1)
* contrib/tzdata: correct DST in Jordan and SamoaPhilip Paeps2021-09-292-3/+16
| | | | | | | | | | Direct commit to stable/11. The recent tzdata 2021b release includes several controversial changes under active debate on the tz mailing list. Pending consensus, and hopefully a 2021c release reflecting it, only merge the DST changes for Jordan and Samoa. This corrects present and future timestamps in those regions.
* Update leap-seconds to leap-seconds.3676924800.Xin LI2021-09-251-4/+4
| | | | | | | Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800. MFC after: 3 days (cherry picked from commit 7ba7bf48d5bd6ca89f4e81579456b74ee7aa9e4f)
* readelf: document that -u / --unwind is not yet implementedEd Maste2021-09-241-0/+3
| | | | | | | | | | | | ELF tool chain readelf accepts -u / --unwind but just ignores the option. This was previously undocumented, which could be confusing for someone encountering `readelf -u` (in a script or GNU readelf example). Reported by: markj (in D32003) MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit deef4b8ce8ba7292fe5088bf9f6d4e2e35662fe8)
* readelf: include notes (-n) and unwind (-u) in --all/-aEd Maste2021-09-242-2/+4
| | | | | | | | | | | | | | | This matches the GNU and LLVM versions of readelf. As markj noted in the review -u is not actually implemented yet and has no effect. The option is accepted and just ignored. Reported by: andrew Reviewed by: andrew, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32003 (cherry picked from commit f161abf9f2cd7fdd28543f9774de82c89675477c)
* Update OptionalObsoleteFiles.inc with NTP docsEd Maste2021-09-221-0/+203
| | | | | | | | | | The list of files for MK_NTP was incomplete. PR: 218193 Submitted by: brnrd MFC after: 1 week (cherry picked from commit 4154e70ea8dc0ac0d1639374ea3bc7b6c9744b9f)
* apr: Merge r1889604, r1807975 from trunk:Joe Orton2021-09-132-2/+5
| | | | | | | | | | | | | | * random/unix/sha2.c (apr__SHA256_Final, apr__SHA256_End): Fix parameter buffer lengths to match declaration, avoiding GCC 11 warning. (no functional change) Bounds-check human-readable date fields (credit: Stefan Sperling) Submitted by: jorton, niq Reviewed by: jorton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1891198 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit fc1b69d0311e50ed05c00c46ad7dd5d560e57cb6)
* libarchive: import bugfix from upstreamMartin Matuska2021-09-102-28/+78
| | | | | | | Reworked bugfix for upstream issue #1566: Do not follow symlinks when processing the fixup list (cherry picked from commit c577bdfce6b4451ab897bfe5013543e78a7f9b62)
* libarchive: import changes from upstreamMartin Matuska2021-09-1069-806/+2401
| | | | | | | | | | | | | | | | | | | | | | | | | Libarchive 3.5.2 New features: PR #1502: Support for PWB and v7 binary cpio formats PR #1509: Support of deflate algorithm in symbolic link decompression for ZIP archives Important bugfixes: IS #1044: fix extraction of hardlinks to symlinks PR #1480: Fix truncation of size values during 7zip archive extraction on 32bit architectures PR #1504: fix rar header skiming PR #1514: ZIP excessive disk read - fix location of central directory PR #1520: fix double-free in CAB reader PR #1521: Fixed leak of rar before ending with error PR #1530: Handle short writes from archive_write_callback PR #1532: 7zip: Use compression settings from file also for file header IS #1566: do not follow symlinks when processing the fixup list Relnotes: yes (cherry picked from commit ddce862ad8594542e1fa1af9ffae7264e12ffd27)
* pxeboot: improve and simplify rx handlingKyle Evans2021-09-041-48/+106
| | | | | | | | | | | | | | | | | This pushes the bulk of the rx servicing into a single loop that's only slightly convoluted, and it addresses a problem with rx handling in the process. If we hit a tx interrupt while we're processing, we'd previously drop the frame on the floor completely and ultimately timeout, increasing boot time on particularly busy hosts as we keep having to backoff and resend. After this patch, we don't seem to hit timeouts at all on zoo anymore though loading a 27M kernel is still relatively slow (~1m20s). Sponsored By: National Bureau of Economic Research Sponsored by: Klara, Inc. (cherry picked from commit 3daa8e165c661c1b45e759f4997f447384c15446)
* caroot: cumulative cert updateKyle Evans2021-09-04146-0/+994
| | | | | | | | | | | | | This adds a note in all existing certs that they are explicitly trusted for server auth, and also: - Seven (7) added - Nineteen (19) removed (cherry picked from commit 446169e0b6f04b96960540784539c218f5a14c86) (cherry picked from commit 3016c5c2bf68d8c6ebf303939f20092478e7a4ca) (cherry picked from commit fac832b27105d926d9f8728d7147adb547b937d8) (cherry picked from commit 76461921dac18b300489e326ba3df61d2809f364)