aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* sys.mk: Define HOST_CC as CC by default.Stephen J. Kiernan2024-03-271-0/+2
| | | | | | | | | This allows for setting a different compiler for building hostprogs when cross compiling. Obtained from: Juniper Networks, Inc. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D44536
* bsdinstall: draw attention to new network config optionsMike Karels2024-03-271-1/+1
| | | | | | | | | | | | The network configuration options have changed in bsdinstall, with an Auto option to proceed directly to DHCP and IPv6 autoconfig (which is the default) as well as Manual (the old mode). For users like me that were used to hitting return automatically to select an interface, but want manual configuration, attempt to call out the difference: Change the menu caption to say "Please select a network interface and configuration mode:" and not just an interface. Reviewed by: jrtc27
* arm64: Delete stale commentJessica Clarke2024-03-271-1/+0
| | | | Fixes: 078a69abcbb8 ("Use a uint64_t to store the arm64 mpidr")
* sockets: define shutdown(2) constants in cpp namespaceGleb Smirnoff2024-03-271-0/+3
| | | | | | | | | | There is software that uses SHUT_RD, SHUT_WR as preprocessor defines and its build was broken by enum declaration. Keep the enum, but provide defines to propagate the constants to cpp namespace. PR: 277994 PR: 277995 Fixes: c3276e02beab825824e3147b31af33af66298430
* dma.conf: Fix typoMikael Urankar2024-03-271-1/+1
| | | | Pull Request: https://github.com/freebsd/freebsd-src/pull/1150
* tools/git: ensure git-arc is more platform indepdendentMina Galić2024-03-271-1/+1
| | | | | | | | | Summary: Linux systems' tail doesn't have `-r`. Instead, we can use git's own `--reverse` sorting for `rev-list`s. Reviewed by: markj, imp, jhibbits Differential Revision: https://reviews.freebsd.org/D39975
* tcp bblog: use correct lengthMichael Tuexen2024-03-271-2/+2
| | | | | | | | | | | | The length of tldl_reason is TCP_LOG_REASON_LEN, not TCP_LOG_ID_LEN. No functional change intended. Reported by: Coverity Scan CID: 1418074 CID: 1418276 Reviewed by: glebius, rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44510
* install: Prefer strsnvis() to strsvis().Dag-Erling Smørgrav2024-03-271-8/+11
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44514
* ln: Add a test case for ln -sfF.Dag-Erling Smørgrav2024-03-271-0/+17
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude, asomers Differential Revision: https://reviews.freebsd.org/D44513
* ln: Clean up and simplify tests.Dag-Erling Smørgrav2024-03-271-48/+20
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44512
* ln: Use stdbool, style nits.Dag-Erling Smørgrav2024-03-271-37/+39
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: imp, allanjude Differential Revision: https://reviews.freebsd.org/D44511
* touch: Add unit tests.Dag-Erling Smørgrav2024-03-274-0/+166
| | | | | | MFC after: 1 week Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D44505
* touch: Allow setting the timestamp to -1.Dag-Erling Smørgrav2024-03-271-7/+14
| | | | | | | | | | | | Note that VFS internally interprets a timestamp of -1 as “do not set”, so this has no effect, but at least touch won't incorrectly reject the given date / time (1969-12-31 23:59:59 UTC) as invalid. While here, fix some style issues. MFC after: 1 week Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44504
* libc: Improve description of mktime() / timegm().Dag-Erling Smørgrav2024-03-271-2/+16
| | | | | | | | | | | | * Mention that mktime() and timegm() set errno on failure. * Correctly determining whether mktime() / timegm() succeeded with arbitrary input (where -1 can be a valid result) is non-trivial. Document the recommended procedure. PR: 277863 MFC after: 1 week Reviewed by: pauamma_gundo.com, gbe Differential Revision: https://reviews.freebsd.org/D44503
* diff: Integrate libdiff from OpenBSD GoT.Dag-Erling Smørgrav2024-03-2713-22/+502
| | | | | | | | | | | | | | | | | | | | | | | This adds support for two new diff algorithms, Myers diff and Patience diff. These algorithms perform a different form of search compared to the classic Stone algorithm and support escapes when worst case scenarios are encountered. Add the -A flag to allow selection of the algorithm, but default to using the new Myers diff implementation. The libdiff implementation currently only supports a subset of input and output options supported by diff. When these options are used, but the algorithm is not selected, automatically fallback to the classic Stone algorithm until support for these modes can be added. Based on work originally done by thj@ with contributions from kevans@. Sponsored by: Klara, Inc. Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D44302
* libdiff: Improve function prototype detection.Dag-Erling Smørgrav2024-03-273-17/+18
| | | | | | | | | - Recognize ObjC methods. - Start searching within the leading context. Sponsored by: Klara, Inc. Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D44301
* pkgbase: remove post-install script for kernelBaptiste Daroussin2024-03-271-5/+0
| | | | | | the hint file is now directly packages within the package itself. Reported by: jhb
* kern linker: Make linker_file_add_dependency() voidZhenlei Huang2024-03-271-22/+8
| | | | | | | | | | The only possible return value has been zero since cee9542d51f0. No functional change intended. Reviewed by: dfr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44507
* epoch(9): Remove the under-development noteKa Ho Ng2024-03-261-5/+1
| | | | | | | | | There has not been planned changes so far to the interface. Remove the section as it may not be relevant anymore. Sponsored by: Juniper Networks, Inc. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D44501
* netmap: Address errors on memory free in netmap_genericTom Jones2024-03-262-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | netmap_generic keeps a pool of mbufs for handling transfers, these mbufs have an external buffer attached to them. If some cases other parts of the network stack can chain these mbufs, when this happens the normal pool destructor function can end up free'ing the pool mbufs twice: - A first time if a pool mbuf has been chained with another mbuf when its chain is freed - A second time when its entry in the pool is freed Additionally, if other parts of the stack demote a pool mbuf its interface reference will be cleared. In this case we deference a NULL pointer when trying to free the mbuf through the destructor. Store a reference to the adapter in ext_arg1 with the destructor callback so we can find the correct adapter when free'ing a pool mbuf. This change enables using netmap with epair interfaces. Reviewed By: vmaffione MFC after: 1 week Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44371
* kern linker: Do not touch userrefs of the kernel fileZhenlei Huang2024-03-261-0/+3
| | | | | | | | | | | | | | | A nonzero `userrefs` of a linker file indicates that the file, either loaded from kldload(2) or preloaded, can be unloaded via kldunload(2). As for the kernel file, it can be unloaded by the loader but should not be after initialization. This change fixes regression from d9ce8a41eac9 which incidentally increases `userrefs` of the kernel file. Reviewed by: dfr, dab, jhb Fixes: d9ce8a41eac9 kern_linker: Handle module-loading failures in preloaded .ko files MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42530
* kern linker: Do not unload a module if it has dependantsZhenlei Huang2024-03-261-0/+2
| | | | | | | | | | | | Despite the name, linker_file_unload() will drop a reference and return success when the module file has dependants, i.e. it has more than one reference. When user request to unload such modules then the kernel should reject unambiguously and immediately. PR: 274986 Reviewed by: dfr, dab, jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42527
* amd64: initialize td_frame stack area for init(8) main threadKonstantin Belousov2024-03-261-0/+1
| | | | | | | | | | | | Unitialized td_frame mostly does not matter since all registers are overwritten on exec to activate init(8). Except PSL_T bit from the %rflags which might leak into fresh init as garbage, causing spurious SIGTRAPs delivered to init until first syscall is executed. Reviewed by: emaste, jhb, jhibbits Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44498
* x86: test the right CPUID bit when checking for XSAVEOPT supportKonstantin Belousov2024-03-262-3/+10
| | | | | | | Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44497
* bsdlabel: add BUGS section documenting 8 partition limitEd Maste2024-03-251-0/+5
| | | | PR: 276517
* libfetch: parse scheme://domain:/ correctlyKa Ho Ng2024-03-251-1/+1
| | | | | | | | | | This improves URL-parsing compability with cURL, and unbreaks parsing of similar kinds of URLs after commit 8d9de5b10a24. Sponsored by: Juniper Networks, Inc. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44493
* boot0: remove reference to fdiskEd Maste2024-03-251-1/+1
| | | | | | | | fdisk is obsolete and there is no need to mention a specific tool used to update the partition table. Just refer to it as the MBR partition table. Sponsored by: The FreeBSD Foundation
* bsdlabel: emit deprecation notice when runEd Maste2024-03-251-0/+4
| | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Reision: https://reviews.freebsd.org/D43586
* bsdlabel: add deprecation noticeEd Maste2024-03-251-1/+17
| | | | | | | | | | | | | gpart is the preferred tool for managing partitions of all types, including BSD disklabels. Note that this is only about bsdlabel/disklabel, the tool -- there is no current plan to remove support for MBR or BSD disk labels from the kernel or from gpart. Reviewed by: imp, olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43563
* Remove a reference to xrpu from timetc.hJosef 'Jeff' Sipek2024-03-251-1/+1
| | | | | | | It was removed in 2007, so doesn't make a good example. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44462
* certctl: Revert to symlinks.Mark Peek2024-03-251-2/+2
| | | | | | | | | | Unfortunately tar will not be able to extract base.txz to a system where /etc and /usr are not on the same filesystem if the certificates are hard links. PR: 277828 Reviewed by: mp Differential Revision: https://reviews.freebsd.org/D44496
* sleep: Overhaul.Dag-Erling Smørgrav2024-03-252-90/+98
| | | | | | | | | | | | | | | | | | | | | Program: * Add a dummy getopt(3) loop to handle `--`. * Move interval parsing out into a separate function. * Print a diagnostic for every invalid interval. * Check for NaN and infinity. * Improve bounds checks. Manual page: * Miscellaneous markup fixes. * Reword DESCRIPTION section. * Move text about GNU compatibility to STANDARDS section. * Convert examples from csh to sh. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44471
* pfsync: cope with multiple pending plus messagesKristof Provost2024-03-251-7/+18
| | | | | | | It's possible for pfsync to add a plus message when one is already queued. Append both, rather than overwriting the already pending one. MFC after: 1 week
* pfsync: fix use of invalidated stack variableKristof Provost2024-03-251-1/+14
| | | | | | | | | | | | Calls to pfsync_send_plus() pass pointers to stack variables. If pfsync_sendout() then fails it retains the pointer to these stack variables, accesing them later. Allocate a buffer and copy the data instead, so that we can retain the pointer safely. Reported by: CI KASAN, markj MFC after: 1 week
* pf: fix use-after-freeKristof Provost2024-03-251-0/+1
| | | | | | | | | | If we fragment the packet in pf_route() the first transmitted packet will free the pf_mtag we have stored in pf_pdesc (pd). Ensure we update that pointer for every packet to avoid using a freed pointer in pf_dummynet_route(). Reported by: CI KASAN, markj MFC after: 1 week
* netpfil tests: disable ICMPv6 rate limiting in the test jailGleb Smirnoff2024-03-251-0/+1
| | | | | | | The dummynet test uses flood ping as source of traffic, so the rate limiting of ICMP replies broke the test. Fixes: 32aeee8ce7e72738fff236ccd5629d55035458f8
* icmp: allow zero value for ICMP limitsGleb Smirnoff2024-03-252-2/+2
| | | | | | | | Zero means limit is disabled, so the value doesn't need to be checked against jitter value. Fixes: ac44739fd834f51cacb26485a4140fd482e20150 Fixes: a03aff88a14448c3084a0384082ec996d7213897
* efibootmgr: allow -u as a valid optionMark Peek2024-03-241-2/+2
| | | | | | PR: 277907 Reported by: vsasjason@gmail.com MFC after: 1 week
* usr.bin/calendar/calendars: Add myself as a committerRainer Hurling2024-03-241-0/+1
|
* arm64: fix free queue and reservation configuration for 16KB pagesEliot Solomon2024-03-242-1/+18
| | | | | | | | | | | Correctly configure the free page queues and the reservation size when the base page size is 16KB. In particular, the reservation size was less than the L2 Block size, making L2 promotions and mappings all but impossible. Reviewed by: markj Tested by: gallatin Differential Revision: https://reviews.freebsd.org/D42737
* icmp6: bring rate limiting on a par with IPv4Gleb Smirnoff2024-03-241-23/+162
| | | | | | | | | Use counter_ratecheck() instead of racy and slow ppsratecheck. Use a separate counter for every currently known type of ICMPv6. Provide logging of ratelimit events. Provide jitter to counter open UDP port detection. Reviewed by: tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44482
* icmp6: move ICMPv6 related tunables to the files where they are usedGleb Smirnoff2024-03-249-112/+91
| | | | | | | | | Most of them can be declared as static after the move out of in6_proto.c. Keeping sysctl(9) declarations with their text descriptions next to the variable declaration create self-documenting code. There should be no functional changes. Differential Revision: https://reviews.freebsd.org/D44481
* icmp6: rate limit our echo repliesGleb Smirnoff2024-03-241-0/+2
| | | | | | | | The generation of ICMP6_ECHO_REPLY bypasses icmp6_error(), thus rate limit was not applied. Reviewed by: tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44480
* icmp6: make icmp6_ratelimit() responsible to update the stats counterGleb Smirnoff2024-03-241-3/+2
| | | | | Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D44479
* icmp: improve ICMP limit jitterGleb Smirnoff2024-03-241-22/+59
| | | | | | | | | | | | | | | | | | Instead of fixing up invalid values set by a user in badport_bandlim() which is a fast path function, provide a sysctl handler sysctl_icmplim_and_jitter(), that will check that jitter is less than the limit. Provide jitter initilization function icmplim_new_jitter() used at boot, in the sysctl handler and when we actually hit the limit. This also fixes no jitter on a fresh booted system until first limit hit. Instead of CVE number provide link the the actual paper that explains what and why we are doing here. The CVE number isn't very informative, it will just tell you what RedHat version you need to upgrade to. Reviewed by: kp, tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44478
* icmp: when logging ICMP ratelimiting message use correct jitter valueGleb Smirnoff2024-03-241-5/+5
| | | | | | | | | The limiting of the very last second has been done using certain jitter value. We update the jitter for the next second. But the logging should report the jitter before the change. Reviewed by: kp, tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44477
* icmp: hide icmp_bandlimit_uninit() under VIMAGEGleb Smirnoff2024-03-241-0/+2
| | | | | | | The uninitialization may be executed only on a kernel with VIMAGE. Reviewed by: kp, tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44476
* icmp: do not store per-VNET identical array of stringsGleb Smirnoff2024-03-241-19/+18
| | | | | | | | | We need per-VNET struct counter_rate, but we don't need per-VNET set of const char *. Also, identical word "response" can go into the format string instead of being stored 7 times. Reviewed by: kp, zlei, tuexen Differential Revision: https://reviews.freebsd.org/D44475
* acpi_hpet: Make use of enum for vm_guest to improve readabilityZhenlei Huang2024-03-241-1/+1
| | | | | | | No functional change intended. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44402
* mem.4: Correct the HISTORY sectionGordon Bergling2024-03-241-5/+7
| | | | | | | | | | | The history section (added in CSRG) claimed both first appeared in v6. Looking at the manuals in the TUHS archive, /dev/mem was in v1 and /dev/kmem was introduced in v5. Reviewed by: imp Obtained from: OpenBSD MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D44486