aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* stress2: More detailed error reportingPeter Holm2024-04-261-17/+33
|
* nfscl: Do not use nfso_own for delayed nfsrpc_doclose()Rick Macklem2024-04-261-6/+14
| | | | | | | | | | | | | | | | When an initial attempt to close an NFSv4 lock returns NFSERR_DELAY, the open structure is put on a list for delayed closing. When this is done, the nfso_own field is set to NULL, so it cannot be used by nfsrpc_doclose(). Without this patch, the NFSv4 client can crash when a NFSv4 server replies NFSERR_DELAY to a Close operation. Fortunately, most extant NFSv4 servers do not do this. This patch avoids the crash for any that do return NFSERR_DELAY for Close. Found during a IETF bakeathon testing event this week. MFC after: 5 days
* CTL: READ(6) should be allowed on CD devicesHP van Braam2024-04-261-0/+1
| | | | | | | | | DOS ASPI drivers use this, with this change applied it is possible to load a DOS ASPI CDROM driver and run the Windows 98 installer. Signed-off-by: HP van Braam <hp@tmm.cx> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1202
* nvmecontrol: Flesh out nvmecontrol format informationWarner Losh2024-04-251-11/+70
| | | | | | | | | | | The format command takes a number of different parameters. Include a brief summary of what the values mean, though since the driver's support for metadata is at best weak, 0's are almost always used for values other than -f format. Add an example that ties it all together. Sponsored by: Netflix Reviewed by: pauamma@gundo.com, chuck Differential Revision: https://reviews.freebsd.org/D44958
* release: remove the RPI CM4s .dtbKyle Evans2024-04-251-1/+1
| | | | | | | | This isn't actually packaged by the sysutils/rpi-firmware port, so we cannot include it in the image. Fix the RPI release build until an interested party adds it to the port and packages are available. Reported by: cperciva
* Revert "config.mk: Add MK_VIMAGE knob"Brooks Davis2024-04-253-7/+1
| | | | | | | | | This commit broke "make makeman" checks in github CI due to a lack of option description files. The split between VIMAGE and VIMAGE_SUPPORT is not clearly justified and the code is broken because there is no opt_vimage.h (it's in opt_global.h). This reverts commit 22ca6db50f4e6bd75a141f57cf953d8de6531a06.
* nfscl: Revert part of commit 196787f79e67Rick Macklem2024-04-253-46/+11
| | | | | | | | | | | | | | Commit 196787f79e67 erroneously assumed that the client code for Open/Claim_deleg_cur_FH was broken, but it was not. It was actually wireshark that was broken and indicated that the correct XDR was bogus. This reverts the part of 196787f79e67 that changed the arguments for Open/Claim_deleg_cur_FH. Found during the IETF bakeathon testing event this week. MFC after: 3 days
* tftpd: Immediately reject any request shorter than 4 bytes.Dag-Erling Smørgrav2024-04-252-0/+24
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44957
* tftpd: Check the server status after each test.Dag-Erling Smørgrav2024-04-251-2/+42
| | | | | | | | | | | | | | | | | * In the setup phase, wait for the server to start (or fail to start) before proceeding with the test. This makes it possible to write test cases that don't expect a response from the server without ending up in a race over the server PID file. * After running each test, wait up to 30 seconds for the server to exit and check that the exit status matches what the test case says to expect (usually 0). * We still kill and collect the server in the cleanup phase, in case the test ended early. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44956
* tftpd: Clean up the tests.Dag-Erling Smørgrav2024-04-251-125/+128
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44955
* tftpd: Use `size_t` where appropriate.Dag-Erling Smørgrav2024-04-254-32/+42
| | | | | | | | | | * Limit the use of `ssize_t` to only where it's needed. * Correct one case of `int` being used for a length. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44954
* if_bridge: Minor style fixesZhenlei Huang2024-04-251-10/+6
| | | | | | | | | And more comments on the #ifdef INET blocks to improve readability. While here, revert the order of two prototypes to produce minimal diff compared to stable branches. MFC with: 65767e6126a7
* bsdinstall: update comment related to pkgBjoern A. Zeeb2024-04-251-1/+1
| | | | | | | | | pkg_add has been gone since 2013(?). Refer to pkg(8) instead. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D44946
* Merge commit 0f329e0246d1 from llvm-project (by Dimitry Andric):Dimitry Andric2024-04-252-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [sanitizer_symbolizer] Cast arguments for format strings in markup (#89815) When compiling the common sanitizer libraries, there are many warnings about format specifiers, similar to: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:31:32: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat] 31 | buffer->AppendF(kFormatData, DI->start); | ~~~~~~~~~~~ ^~~~~~~~~ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:33:46: note: format string is defined here 33 | constexpr const char *kFormatData = "{{{data:%p}}}"; | ^~ | %lu compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:46:43: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat] 46 | buffer->AppendF(kFormatFrame, frame_no, address); | ~~~~~~~~~~~~ ^~~~~~~ compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:36:48: note: format string is defined here 36 | constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; | ^~ | %lu ... This is because `uptr` is dependent on the platform, and can be either `unsigned long long`, `unsigned long`, or `unsigned int`. To fix the warnings, cast the arguments to the expected type of the format strings. PR: 276104 Reported by: pstef MFC after: 3 days
* Revert "nfsd: Fix NFSv4.1/4.2 Claim_Deleg_Cur_FH"Rick Macklem2024-04-252-20/+6
| | | | | | | | This reverts commit f300335d9aebf2e99862bf783978bd44ede23550. It turns out that the old code was correct and it was wireshark that was broken and indicated that the RPC's XDR was bogus. Found during IETF bakeathon testing this week.
* Skip building libclang_rt when WITHOUT_CLANG is usedDimitry Andric2024-04-251-1/+1
| | | | | | | | | | | | | | | | | | | As noted in bug 277096, when building a pkgbase repository using WITHOUT_CROSS_COMPILER and WITHOUT_TOOLCHAIN (which sets WITHOUT_CLANG), the following residual files are left over: /usr/lib/clang/18/lib/freebsd/libclang_rt.asan-x86_64.so /usr/lib/clang/18/share/asan_ignore_list.txt /usr/lib/clang/18/share/cfi_ignore_list.txt /usr/lib/clang/18/share/msan_ignore_list.txt This is because the lib/libclang_rt directory is still descended into, even if WITHOUT_CLANG is used. Fix it by not descending into the libclang_rt directory in that case. PR: 277096 Reported by: Siva Mahadevan <me@svmhdvn.name> MFC after: 3 days
* kthread: Set *tdptr earlier in kproc_kthread_add()Mark Johnston2024-04-251-1/+9
| | | | | | | | | | | | | | | | | | See commit ae77041e0714 ("kthread: Set *newtdp earlier in kthread_add1()") for details. That commit was incomplete since g_init()'s first call to kproc_kthread_add() will cause kproc_kthread_add() to take the `*procptr == NULL` branch, which avoids kthread_create(). To ensure that the thread pointer is initialized before the thread starts running, we have to start the kernel process with RFSTOPPED. We could perhaps go further and use RFSTOPPED only when tdptr != NULL, but it's probably better to have consistent behaviour. Reviewed by: olce, kib Reported by: syzbot+e91e798f3c088215ace6@syzkaller.appspotmail.com MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44927
* checkstyle9: Allow a space between "*" and _*restrictMateusz Piotrowski2024-04-251-0/+1
| | | | | | | | | | | | Before the change, we would get errors like this: ERROR: "foo * bar" should be "foo *bar" #369: FILE: foobar.c:369: +barbaz(char * __restrict s, Reviewed by: des, imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D44911
* sync.8: Document that the "sync dance" is not a thingMateusz Piotrowski2024-04-251-1/+29
| | | | | | | | | | People still believe that it is essential to run sync(8) a couple of times before a reboot/halt. Document that this has not been necessary for a long time now. Reviewed by: imp, bcr, Pau Amma <pauamma@gundo.com> MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D33233
* Document that gettimeofday() is obsolescentMateusz Piotrowski2024-04-251-1/+24
| | | | | | | Reported by: kaktus Reviewed by: kaktus, pstef MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23942
* accept_filter: return different errors for non-listener and a busy socketGleb Smirnoff2024-04-252-1/+37
| | | | | | | | The fact that an accept filter needs to be cleared first before setting to a different one isn't properly documented. The requirement that the socket needs already be listening, although trivial, isn't documented either. At least return a more meaningful error than EINVAL for an existing filter. Cover this with a test case.
* accf_tls: accept filter that waits for TLS handshake headerGleb Smirnoff2024-04-259-1/+273
|
* syscalls.master: correct return type of {read,write}vBrooks Davis2024-04-244-10/+10
| | | | | | | | | This was missed when read/write, etc were updated to return ssize_t. Fixes: 2e83b2816183 Fix a few syscall arguments to use size_t instead of u_int. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D44930
* vfs_lookup.c: only call ktrcapfail() if KTRACE is enabledKonstantin Belousov2024-04-241-1/+7
| | | | | | | Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931
* sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.cKonstantin Belousov2024-04-242-5/+5
| | | | | | | Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931
* meta.autodep.mk do not override start_utcSimon J. Gerraty2024-04-241-1/+3
| | | | | Update meta.autodep.mk If included at level 0 it is important not to override start_utc
* elf_common.h: Add STO_AARCH64_VARIANT_PCSAndrew Turner2024-04-241-0/+3
| | | | | | | | | This is used to mark symbols that use a variant procedure call with a different calling convention to the main ABI. Reviewed by: kib, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44868
* showconfig: Set MACHINE for src.opts.mkAndrew Turner2024-04-241-1/+2
| | | | | | | | | | Also set MACHINE and MACHINE_ARCH when reading config options from src.opts.mk. This ensures any machine-dependent options are reported correctly. Reviewed by: emaste, imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44838
* arm64: Check DMAP address is valid in PHYS_IN_DMAPAndrew Turner2024-04-244-14/+22
| | | | | | | | | | | | | | | | | When checking if a physical address is in the DMAP region we assume all physical addresses between DMAP_MIN_PHYSADDR and DMAP_MAX_PHYSADDR are able to be accesses through the DMAP. It may be the case that there is device memory in this range that shouldn't be accessed through the DMAP mappings. Add a check to PHYS_IN_DMAP that the translated virtual address is a valid kernel address. To support code that already checks the address is valid add PHYS_IN_DMAP_RANGE. PR: 278233 Reviewed by: alc, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44677
* arm64/vmm: Ensure the tlbi has completedAndrew Turner2024-04-241-0/+3
| | | | | | | | | | | Ensure the TLB is invalidated before enabling the EL2 MMU. Without this the TLB may be in an inconsistant state leading to a possible exception when enabling the MMU. PR: 277559 Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44799
* bhyve.8: Document arm64 supportMark Johnston2024-04-241-6/+34
| | | | | | | | | - Mention the options that are amd64-only. - Provide a minimal example for booting an arm64 guest. Reviewed by: corvink Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44738
* vmrun.sh: Stop passing -A to bhyveMark Johnston2024-04-241-1/+1
| | | | | | It's a no-op now. Sponsored by: Innovate UK
* bhyve.8: Remove mention of the -A flagMark Johnston2024-04-242-10/+6
| | | | | | | | | | It is a no-op on amd64 now and is not implemented on arm64, so let's remove mention of it altogether so as to reduce confusion for arm64 users. Reviewed by: corvink, jhb Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44737
* geli.8: add some notes regarding performance tuningAlan Somers2024-04-241-1/+41
| | | | | | | MFC after: 1 week Sponsored by: Axcient Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44908
* busdma: uma_zcreate() does not failMark Johnston2024-04-241-4/+0
| | | | | | No functional change intended. MFC after: 1 week
* khelp: uma_zcreate() does not failMark Johnston2024-04-241-4/+0
| | | | | | No functional change intended. MFC after: 1 week
* udf: uma_zcreate() does not failMark Johnston2024-04-241-11/+0
| | | | | | | | | | While here remove an old comment regarding preallocation; it appears to refer to an optimization that is almost certainly irrelevant at this point. No functional change intended. MFC after: 1 week
* wg: uma_zcreate() does not failMark Johnston2024-04-242-6/+5
| | | | | | No functional change intended. MFC after: 1 week
* dpaa: uma_zcreate() does not failMark Johnston2024-04-241-4/+0
| | | | | | No functional change intended. MFC after: 1 week
* ng_pipe: Do not panic when memory allocations failMartin Vahlensieck2024-04-241-15/+30
| | | | | | | | Signed-off-by: Martin Vahlensieck <git@academicsolutions.ch> Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181
* ng_pipe: Replace deprecated random() with prng32_bounded()Martin Vahlensieck2024-04-241-2/+3
| | | | | | | | Signed-off-by: Martin Vahlensieck <git@academicsolutions.ch> MFC after: 2 weeks Reviewed by: markj Pull Request: https://github.com/freebsd/freebsd-src/pull/1181
* ng_pipe: Remove node when all hooks are disconnectedMartin Vahlensieck2024-04-241-0/+7
| | | | | | | | | | | This is the behavior described in the man page. Signed-off-by: Martin Vahlensieck <git@academicsolutions.ch> Discussed with: glebius Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181
* ng_pipe: Fix whitespaceMartin Vahlensieck2024-04-241-8/+8
| | | | | | | | Signed-off-by: Martin Vahlensieck <git@academicsolutions.ch> Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1181
* heimdal: Fix compiling hdb ldap as a moduleCy Schubert2024-04-241-3/+6
| | | | | | | Fix build when WITH_OPENLDAP defined. PR: 278430 Obtained from: Upstream c1c7da7f79
* kdc: Add restart optionCy Schubert2024-04-242-2/+29
| | | | | | | | | | | | | | | | Add a new kdc_restart rc variable that manages kdc (or krb5kdc) under daemon(8). This automatically restarts the kdc should it fail, i.e. when it's configured to use LDAP as a backend and cannot connect to its LDAP directory. Set kdc_restart="YES" to auto restart kdc on abnormal termination. Set kdc_restart_delay="N" to the number of seconds to delay before restarting the kdc. The daemon(8) default seconds applies when not set. Reported by: Lexi Winter <lexi.freebsd@le-fay.org> PR: 278395 Differential Revision: https://reviews.freebsd.org/D44898
* MFV: less: Do not trust st_size if it equals zeroRicardo Branco2024-04-241-11/+2
|\ | | | | | | | | | | | | | | | | | | | | This is a smaller version of upstream 1fafd968b48e5cea6c85f126d77071a8de707a55 to address the issue that less not being able to operate on files residing in pseudo-filesystems that advertize a zero size value. PR: bin/276133 MFC after: 3 days
| * less: Do not trust st_size if it equals zerovendor/lessRicardo Branco2024-04-241-11/+2
| |
* | Revert "swapon: Do not overwrite Linux swap header"Warner Losh2024-04-244-126/+1
| | | | | | | | | | | | This reverts commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e.This is broken on armv7, and closer scrutiny of the reviews shows I was in error when I thought it was ready.
* | Revert "bsdinstall/distfetch.c: check environment variables before ↵Warner Losh2024-04-241-23/+10
| | | | | | | | | | | | | | downloading and handle memory allocation errors" This reverts commit 91bdebc958bb0da03f604bad19f99e3b10e96ac7. It wasn't as ready as I thought
* | ktrace: Remove CAPFAIL from default trace pointsJake Freeland2024-04-242-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CAPFAIL tracepoint was recently extended to report ECAPMODE capability violations for processes that do not enter capability mode. This allows developers that are interested in Capsicumizing their programs to determine where violations are being raised. Previously, CAPFAIL only produced output for processes using Capsicum(4) capabilties. Thus, most ktrace users never received log output from the trace point. With the recent changes, this is no longer the case. Having this trace point enabled by default will produce output for all processes that use syscalls that are not permitted in capability mode. This may lead to confusion for users that are not familiar with the feature. Remove KTRFAC_CAPFAIL from ktrace's default points to avoid this. Approved by: markj (mentor) Reviewed by: markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44887