aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | update external URLWolfram Schneider2022-02-056-7/+7
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | update external URLWolfram Schneider2022-02-053-3/+3
| |
* | remove defunct National Semiconductor URLWolfram Schneider2022-02-052-3/+0
| |
* | update external URLWolfram Schneider2022-02-051-2/+2
| |
* | update URLWolfram Schneider2022-02-051-1/+1
| |
* | update URLWolfram Schneider2022-02-051-1/+1
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | tcp: use TCPSTAT_INC in kernel ecn functionsRichard Scheffenegger2022-02-051-7/+7
| | | | | | | | | | | | | | | | | | | | | | Incorrectly used KMOD_ marco in static kernel ECN functions. Both eventually resolve to counter_s64_add(), but better use the correct macros. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D34181
* | if_vtnet(4): Restore the ability to set promisc mode.Aleksandr Fedorov2022-02-051-3/+7
| | | | | | | | | | | | | | | | | | PR: 254343, 255054 Reviewed by: vmaffione (mentor), donner Approved by: vmaffione (mentor), donner MFC after: 2 weeks Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D30639
* | tcp: move ECN handling code to a common fileRichard Scheffenegger2022-02-057-227/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the burden to maintain correct and extensible ECN related code across multiple stacks and codepaths. Formally no functional change. Incidentially this establishes correct ECN operation in one instance. Reviewed By: rrs, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D34162
* | libc: add helper furnction to set sysctl() user.* variablesStefan Eßer2022-02-051-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing had revealed that trying to retrieve the user.localbase variable into to small a buffer would return the correct error code, but would not fill the available buffer space with a partial result. A partial result is of no use, but this is still a violation of the documented behavior, which has been fixed in the previous commit to this function. I just checked the code for "user.cs_path" and found that it had the same issue. Instead of fixing the logic for each user.* sysctl string variable individually, this commit adds a helper function set_user_str() that implements the semantics specified in the sysctl() man page. It is currently only used for "user.cs_path" and "user.localbase", but it will offer a significant simplification when further such variables will be added (as I intend to do). MFC after: 3 days
* | pf tests: Only do post-test logging when specifically enabledKristof Provost2022-02-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The pf tests have the ability to log state information (pf rules, pf states, interfaces, ...) on exit (i.e. on success or on error). This is useful, but only in specific cases. When it's not needed it may get in the way of clear output. Test scripts can add 'debug' to the pft_init call to enable this for the specified test. Reviewed by: brd Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34133
* | pf tests: Test adding counters to an existing tableKristof Provost2022-02-051-0/+37
| | | | | | | | | | | | MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34132
* | pf: deal with tables gaining or losing countersKristof Provost2022-02-051-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we create a table without counters, add an entry and later re-define the table to have counters we wound up trying to read non-existent counters. We now cope with this by attempting to add them if needed, removing them when they're no longer needed and not trying to read from counters that are not present. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34131
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | fix URL typoWolfram Schneider2022-02-051-1/+1
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | update external URLWolfram Schneider2022-02-051-1/+1
| |
* | stress2: Fix compiler warningsPeter Holm2022-02-053-5/+1
| |
* | switch from short to int for lookup tableWolfram Schneider2022-02-051-5/+4
| | | | | | | | This simplifies the code, less casting is needed.
* | update external URLsWolfram Schneider2022-02-051-3/+3
| |
* | Revert "tcp: move ECN handling code to a common file"Richard Scheffenegger2022-02-057-444/+224
| | | | | | | | This reverts commit 0c424c90eaa6602e07bca7836b1d178b91f2a88a.
* | elfctl: update man page example for 'no' prefixEd Maste2022-02-051-2/+2
| | | | | | | | | | | | | | Reported by: Mark Millard on freebsd-current@ Fixes: c763f99d11fd ("elfctl: prefix disable flags with "no"") MFC after: 1 week Sponsored by: The FreeBSD Foundation
* | fusefs: fix the build without INVARIANTS after 00134a07898Alan Somers2022-02-051-3/+2
| | | | | | | | | | | | MFC after: 2 weeks MFC with: 00134a07898fa807b8a1fcb2596f0e3644143f69 Reported by: se
* | tcp: move ECN handling code to a common fileRichard Scheffenegger2022-02-047-224/+444
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the burden to maintain correct and extensible ECN related code across multiple stacks and codepaths. Formally no functional change. Incidentially this establishes correct ECN operation in one instance. Reviewed By: rrs, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D34162
* | Remove more quotes around Makefile .error/.warn/.info strings.John Baldwin2022-02-049-14/+14
| | | | | | | | | | Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D34175
* | linux_copyout_strings: Use PROC_PS_STRINGS().John Baldwin2022-02-041-1/+1
| | | | | | | | | | | | Reviewed by: markj Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D34173
* | bsd.compat.mk: A few cosmetic fixes.John Baldwin2022-02-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | - Add a missing ')' to a warning. - Consistently use {} when expanding variables. - Remove a spurious blank line. Reviewed by: imp, emaste Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D34172
* | cxgbei: Rework parsing of pre-offload PDUs.John Baldwin2022-02-041-116/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sbcut() returns mbufs in reverse order so is not suitable for reading data from the socket buffer. Instead, check for already-received data in the receive worker thread before passing offload PDUs up to the iSCSI layer. This uses soreceive() to read data from the socket and is also to use M_WAITOK since it now runs from a worker thread instead of an interrupt thread. Also, fix decoding of the data segment length for pre-offload PDUs. Reported by: Jithesh Arakkan @ Chelsio Fixes: a8c4147edcdc cxgbei: Parse all PDUs received prior to enabling offload mode. Sponsored by: Chelsio Communications
* | fusefs: require FUSE_NO_OPENDIR_SUPPORT for NFS exportingAlan Somers2022-02-043-78/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FUSE file systems that do not set FUSE_NO_OPENDIR_SUPPORT do not guarantee that d_off will be valid after closing and reopening a directory. That conflicts with NFS's statelessness, that results in unresolvable bugs when NFS reads large directories, if: * The file system _does_ change the d_off field for the last directory entry previously returned by VOP_READDIR, or * The file system deletes the last directory entry previously seen by NFS. Rather than doing a poor job of exporting such file systems, it's better just to refuse. Even though this is technically a breaking change, 13.0-RELEASE's NFS-FUSE support was bad enough that an MFC should be allowed. MFC after: 3 weeks. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D33726
* | fusefs: optimize NFS readdir for FUSE_NO_OPENDIR_SUPPORTAlan Somers2022-02-041-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In its lowest common denominator, FUSE does not require that a directory entry's d_off field is valid outside of the lifetime of the directory's FUSE file handle. But since NFS is stateless, it must reopen the directory on every call to VOP_READDIR. That means reading the directory all the way from the first entry. Not only does this create an O(n^2) condition for large directories, but it can also result in incorrect behavior if either: * The file system _does_ change the d_off field for the last directory entry previously seen by NFS, or * The file system deletes the last directory entry previously seen by NFS. Handily, for file systems that set FUSE_NO_OPENDIR_SUPPORT d_off is guaranteed to be valid for the lifetime of the directory entry, there is no need to read the directory from the start. MFC after: 3 weeks Reviewed by: rmacklem
* | Fix NFS exports of FUSE file systems for big directoriesAlan Somers2022-02-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FUSE protocol does not require that a directory entry's d_off field outlive the lifetime of its directory's file handle. Since the NFS server must reopen the directory on every VOP_READDIR call, that means it can't pass uio->uio_offset down to the FUSE server. Instead, it must read the directory from 0 each time. It may need to issue multiple FUSE_READDIR operations until it finds the d_off field that it's looking for. That was the intention behind SVN r348209 and r297887, but a logic bug prevented subsequent FUSE_READDIR operations from ever being issued, rendering large directories incompletely browseable. MFC after: 3 weeks Reviewed by: rmacklem
* | whereis: fix fetching of user.cs_path sysctl variableStefan Eßer2022-02-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of sysctlbyname() does not support the user sub-tree. This function exits with a return value of 0, but sets the passed string buffer to an empty string. As a result, the whereis program did not use the value of the sysctl variable "user.cs_path", but only the value of the environment variable "PATH". This update makes whereis use the sysctl function with a fixed OID, which already supports the user sub-tree. MFC after: 3 days
* | style(9): Default to omitting $FreeBSD$Warner Losh2022-02-041-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Advise people to omit $FreeBSD$ (in both comments and macros) unless the code is definitely going to be merged to stable/12. This strengthens previous statements and is appropriate now that stable/11 is no longer supported. If people are wrong and things are unexpected merged to 12, tags can be added before that merge. No sense adding a tag that will never be expanded and removed later on the off chance it might wind up in stable/12. The next step is likely to weaken this to apply just to mergemaster managed files, but not today. Reviewed by: rpokala, cem, erj, hselasky, brooks, kib Differential Revision: https://reviews.freebsd.org/D34152
* | Properly fix parameter to sysctlnametomib().Kirk McKusick2022-02-041-1/+1
| |
* | Fix parameter to sysctlnametomib();Kirk McKusick2022-02-041-1/+1
| |
* | Have fsck_ffs(8) properly correct superblock check-hash failures.Kirk McKusick2022-02-045-244/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of the problem was that fsck_ffs would read the superblock multiple times complaining and repairing the superblock check hash each time and then at the end failing to write out the superblock with the corrected check hash. This fix reads the superblock just once and if the check hash is corrected ensures that the fixed superblock gets written. Tested by: Peter Holm PR: 245916 MFC after: 1 week Sponsored by: Netflix
* | compiler-rt: re-exec with ASLR disabled when necessaryEd Maste2022-02-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Some sanitizers (at least msan) currently require ASLR to be disabled. When we detect that ASLR is enabled, re-exec with it disabled rather than exiting with an error. See LLVM GitHub issue 53256 for more detail: https://github.com/llvm/llvm-project/issues/53256 No objection: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934
* | compiler-rt: support ReExec() on FreeBSDEd Maste2022-02-041-1/+10
| | | | | | | | | | | | | | | | | | | | | | Based on getMainExecutable() in llvm/lib/Support/Unix/Path.inc. This will need a little more work for an upstream change as it must support older FreeBSD releases that lack elf_aux_info() / AT_EXEC_PATH. No objection: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33934
* | lindebugfs: Fix writeEmmanuel Vadot2022-02-041-2/+8
| | | | | | | | | | | | | | | | | | | | | | For write operation pseudofs creates an sbuf with the data. Use this data instead of the uio as it's not usable anymore after uiomove. Reviewed by: hselasky MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D34114
* | libc: return partial sysctl() result if buffer is too smallStefan Eßer2022-02-041-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing of a new feature revealed that calling sysctl() to retrieve the value of the user.localbase variable passing too low a buffer size could leave the result buffer unchanged. The behavior in the normal case of a sufficiently large buffer was correct. All known callers pass a sufficiently large buffer and have thus not been affected by this issue. If a non-default value had been assigned to this variable, the result was as documented, too. Fix the function to fill the buffer with a partial result, if the passed in buffer size is too low to hold the full result. MFC after: 3 days
* | x86 atomic.h: remove obsoleted commentKonstantin Belousov2022-02-042-16/+0
| | | | | | | | | | | | | | | | | | | | Modules no longer call kernel functions for atomic ops, and since the previous commit, we always use lock prefix. Submitted by: Elliott Mitchell <ehem+freebsd@m5p.com> Reviewed by: jhb, markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34153
* | x86 atomics: use lock prefix unconditionallyKonstantin Belousov2022-02-042-87/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Atomics have significant other use besides providing in-system primitives for safe memory updates. They are used for implementing communication with out of system software or hardware following some protocols. For instance, even UP kernel might require a protocol using atomics to communicate with the software-emulated device on SMP hypervisor. Or real hardware might need atomic accesses as part of the proper management protocol. Another point is that UP configurations on x86 are extinct, so slight performance hit by unconditionally use proper atomics is not important. It is compensated by less code clutter, which in fact improves the UP/i386 lifetime expectations. Requested by: Elliott Mitchell <ehem+freebsd@m5p.com> Reviewed by: Elliott Mitchell, imp, jhb, markj, royger Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34153
* | x86 atomic.h: cleanup comments for preprocessor directivesKonstantin Belousov2022-02-042-4/+4
| | | | | | | | | | | | | | Reviewed by: Elliott Mitchell, imp, jhb, markj, royger Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34153
* | Sort the names of the arm64 debug registersAndrew Turner2022-02-045-72/+70
| | | | | | | | | | | | | | | | | | While here clean up the names for the naming convention of the other registers in this file. Reviewed by: kib, mhorne (earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34060
* | ip_mroute: split mrouter interface deactivation and if_freeSylvian Meygret2022-02-041-6/+23
| | | | | | | | | | Move if_free outside MRW_LOCK. This will silence LOR message which might appere during deinitialization.
* | ar40xx_switch: add initial switch for the IPQ4018/IPQ4019.Adrian Chadd2022-02-0424-0/+4067
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This switch is based off of the AR8327/AR8337 external switch/PHY. However unlike the AR8327/AR8337 it itself doesn't have any PHYs; instead an external PHY connects to it using the PSGMII port. Differential Revision: https://reviews.freebsd.org/D34112 Reviewed by: manu This code is inspired by the ar40xx code in openwrt, which itself is based on the Qualcomm QCA-SSDK. Both of these sources are, amusingly, BSD licenced - and thus I have included some of the comments in the hardware workaround paths to document some of the magic numbers.