summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2022-08-03Pull up following revision(s) (requested by wiz in ticket #1484):martin
lib/libc/sys/clone.2: revision 1.14 lib/libc/sys/clone.2: revision 1.15 include/sched.h: revision 1.13 include/sched.h: revision 1.14 include/sched.h: revision 1.15 Remove mentions of CLONE_PID and CLONE_STOPPED CLONE_PID was removed in Linux 2.5.15 and recycled for CLONE_PIDFD since Linux 5.2. CLONE_STOPPED was removed in Linux 2.6.38 and recycled for CLONE_NEWCGROUP since Linux 4.6. sched.h: Linux documents clone and __clone as only available when_GNU_SOURCE is defined - follow suit. Ok martin@ clone(2): document that _GNU_SOURCE must be defined for the prototypes sched.h: format comment to follow KNF requested by thorpej@ sched.h: keep __clone() visible under _NETBSD_SOURCE
2022-06-06Pull up following revision(s) (requested by skrll in ticket #1464):martin
lib/libc/arch/hppa/sys/ptrace.S: revision 1.8 Save and restore %r19 the "linkage table pointer register" across the call to __cerror so if the ptrace syscall fails we can call __cerror again with the correct %r19 value. Do this even though the call of __cerror doesn't go via the PLT because __cerror calls __errno which does. Analysis and fix from Tom Lane in PR port-hppa/56864: hppa: ptrace(2) dumps core when returning an error I changed the location of where %r19 is stored on the stack to follow the ABI.
2022-04-27Pull up following revision(s) (requested by hannken in ticket #1440):martin
usr.sbin/quotaon/quotaon.c: revision 1.31 lib/libquota/quota_oldfiles.c: revision 1.10 sys/ufs/ufs/ufs_quota1.c: revision 1.25 Fix default quota file names, both user and group quota used the same default name "QUOTAFILENAME, names[USRQUOTA])" resulting in diagnostic assertion and possibly corrupted quota data. Keep flag "UFS_QUOTA" set until the last quota is closed. Prevents a live lock when dqrele() finds a struct with "dq_cnt == 1" and flag "DQ_MOD" and cannot sync as flag UFS_QUOTA is unset. As the quota type comes from the kernel and is only valid when quota is on get the type before quota_off and after quota_on.
2021-10-31Pull up following revision(s) (requested by nia in ticket #1370):martin
lib/libcrypt/crypt-sha1.c: revision 1.10 libcrypt: Fix a floating point exception when a low number of HMAC-SHA1 iterations are specified.
2021-10-13Pull up following revision(s) (requested by skrll in ticket #1358):martin
lib/libc/arch/aarch64/gen/setjmp.S: revision 1.4 lib/libc/arch/aarch64/gen/_setjmp.S: revision 1.5 Fix the lib/libc/setjmp/t_setjmp:{,_}longjmp_zero test cases
2021-10-05Pull up following revision(s) (requested by christos in ticket #1356):martin
lib/libc/resolv/res_init.c: revision 1.32 lib/libc/resolv/res_private.h: revision 1.4 kqueue(2) file descriptors are not inherited across fork(2). A process that that calls getaddrinfo(3) will end up cacheing the kqueue(2) file descriptor in its res_state structure. If that process fork(2)s and calls getaddrinfo(3) again might end up closing that cached file descriptor which can end up pointing to a different file object than the kqueue(2) original one. To fix this, associate the kqueue(2) file descriptor with the process id that created it, and don't close(2) it if it is being closed from a different process. An alternative fix would be to attach the resolver to a fork(2) hook to cleanup the res_state, but handling it internally in the resolver is less intrusive. This was discovered by Dima Veselov when using the FreeRADIUS package.
2021-10-05Pull up following revision(s) (requested by christos in ticket #1355):martin
lib/libpthread/pthread_cancelstub.c: revision 1.39 lib/libc/sys/Makefile.inc: revision 1.247 lib/libpthread/pthread_cancelstub.c: revision 1.40 PR/56424: Clay Mayers: recvfrom() is not a cancelation point as documented in pthread_setcanceltype.3 remove parameter names from decls.
2021-09-07Pull up following revision(s) (requested by manu in ticket #1343):martin
share/man/man7/sysctl.7: revision 1.153 sys/kern/vfs_lockf.c: revision 1.74 lib/libc/sys/fcntl.2: revision 1.46 lib/libc/sys/flock.2: revision 1.23 Tie the maximum file lock per unprivilegied uid to kern.maxfiles This makes the limit simple to raise at run time. While there, document that fcntl(2) and flock(2) may return ENOMEM when this limit is reached.
2021-08-08Pull up following revision(s) (requested by skrll in ticket #1329):martin
lib/libc/arch/arm/gen/swapcontext.S: revision 1.18 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divsi3.S: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmp.S: revision 1.3 lib/libc/arch/arm/sys/__clone.S: revision 1.10 lib/libc/arch/arm/sys/__clone.S: revision 1.11 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S: revision 1.2 lib/libc/arch/arm/sys/__clone.S: revision 1.12 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/modsi3.S: revision 1.3 lib/libc/arch/arm/sys/__clone.S: revision 1.13 lib/libc/arch/arm/sys/__clone.S: revision 1.14 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/divmodsi4.S: revision 1.3 lib/libc/arch/arm/gen/swapcontext.S: revision 1.16 lib/libc/arch/arm/gen/swapcontext.S: revision 1.17 Align sp to 8-byte boundary as required by EABI. This is especially important for non-leaf functions; GCC optimizes codes based on assumption that sp is aligned properly. Mostly fix broken earmv5 userland compiled by GCC10 due to alignment faults in ld.elf_so, where {ld,st}rd are used for [sp, #8x]. No regression for ATF is observed for earmv[67]{,hf}{,eb}. Align sp to 8-byte boundary as required by EABI. IIUC, this change only affects libc compiled for ``Thumb-mode userland'', which we've not officially supported yet. Fix previous. For Thumb-1: - sp cannot be manipulated directly - {add,sub}s should be used instead of {add,sub} Trailing whitespace The _INVOKE_CERROR macro deals with thumb so simplify the code (at the expense of a couple more instructions). Do previous differently by pushing even number of registers and remove strange r7 usage. Do previous differtly by pushing two registers in the same way as the _INVOKE_CERROR macro
2021-08-08Pull up following revision(s) (requested by skrll in ticket #1328):martin
sys/external/bsd/compiler_rt/dist/lib/builtins/negsf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/muldf3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfhf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/negsf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/muldf3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cfcmpeq_check_nan.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfhf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.4 sys/external/bsd/compiler_rt/dist/lib/builtins/floatdidf.c: revision 1.5 sys/external/bsd/compiler_rt/dist/lib/builtins/divdf3.c: revision 1.2 sys/external/bsd/compiler_rt/abi.mk: revision 1.1 sys/external/bsd/compiler_rt/dist/lib/builtins/divdf3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsisf.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/comparesf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsisf.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/comparesf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.4 sys/external/bsd/compiler_rt/dist/lib/builtins/ashrdi3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/ashldi3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfsf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/subdf3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.5 sys/external/bsd/compiler_rt/dist/lib/builtins/ashrdi3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/ashldi3.c: revision 1.3 sys/lib/libkern/Makefile.compiler-rt: revision 1.13 sys/external/bsd/compiler_rt/dist/lib/builtins/truncdfsf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/subdf3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/int_lib.h: revision 1.6 sys/external/bsd/compiler_rt/dist/lib/builtins/lshrdi3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/floatsisf.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/extendhfsf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/lshrdi3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/floatsisf.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/extendhfsf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsidf.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/floatunsidf.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfsi.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfsi.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_frsub.c: revision 1.2 lib/libm/compiler_rt/Makefile.inc: revision 1.11 sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfsi.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/floatsidf.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfsi.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/divsi3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/floatsidf.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/divsi3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/adddf3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_div0.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/mulsf3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/mulsf3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfdi.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/fixdfdi.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/divsf3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/negdf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfdi.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/divsf3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/negdf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/fixunsdfdi.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/extendsfdf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/subsf3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/extendsfdf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/subsf3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/comparedf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/comparedf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/floatundisf.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/floatundisf.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfsi.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_drsub.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfsi.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/muldi3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfsi.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/arm/aeabi_cdcmpeq_check_nan.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/muldi3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfsi.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/floatdisf.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/floatdisf.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/addsf3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/addsf3.c: revision 1.3 lib/libc/compiler_rt/Makefile.inc: revision 1.40 sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfdi.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/fixunssfdi.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/udivsi3.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/truncsfhf2.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfdi.c: revision 1.2 sys/external/bsd/compiler_rt/dist/lib/builtins/udivsi3.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/truncsfhf2.c: revision 1.3 sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c: revision 1.4 sys/external/bsd/compiler_rt/dist/lib/builtins/fixsfdi.c: revision 1.3 PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 266891: https://github.com/llvm/llvm-project/commit/28e1b977d4694c6b3a5c4d8107570a969be71e77#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 ---- [PATCH] builtins: remove use of __attribute__((pcs("aapcs"))) on Windows Windows does not honour the __attribute__((pcs)) on ARM. Although this will result in ABI mismatches, compiler-rt should largely be unneeded for resolving dependencies as we generate MS ABI compliant library calls now for the most part. llvm-svn: 266891 PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 298974 for lib/builtins/int_lib.h. https://github.com/llvm/llvm-project/commit/d8ca74176e25bd4080ee81982819e2ef7a36553f#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 ---- [Builtin] Unxfail tests for armhf Summary: Originally, a few tests fail for armhf target due to: 1) COMPILER_RT_ARMHF_TARGET was not set when building the lib 2) COMPILER_RT_ABI should not be defined as `__attribute__((pcs("aapcs")))` for armhf when building for both lib and tests This addresshttps://bugs.llvm.org//show_bug.cgi?id=32261 mulsc3_test.c is a newly exposed issue, which will be addressed separately. Reviewers: rengolin, compnerd Reviewed By: compnerd Subscribers: aemerson, llvm-commits, mgorny Differential Revision:https://reviews.llvm.org/D31448 llvm-svn: 298974 PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 303138: https://github.com/llvm/llvm-project/commit/44c45717b9e9f3dc194508d2eeeb8599a9d76949#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 ---- [PATCH] builtins: use reserved spelling (NFC) llvm-svn: 303138 PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 303188: https://github.com/llvm/llvm-project/commit/36ac5ddff7377586390a71cb3261f0a40d274308#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 ---- [PATCH] builtins: expand out the AEABI function stubs These actually may change calling conventions. We cannot simply provide function aliases as the aliased function may have a different calling convention. Provide a forwarding function instead to permit the compiler to synthesize the calling convention adjustment thunk. Remove the `ARM_EABI_FNALIAS` macro as that is not safe to use. Resolves PR33030! llvm-svn: 303188 PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 303207: https://github.com/llvm/llvm-project/commit/4a45838d10085defac0f3b3003a5263e34536f3b#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 ---- [PATCH] builtins: fix guard __AEABI__ -> __ARM_EABI__ llvm-svn: 303207 PR port-arm/55897 Cherry-pick upstream commit llvm-svn: 314851: https://github.com/llvm/llvm-project/commit/0d586d06a756b126a7eb43a21ecc12bd243d7cd8#diff-549f1733063df365663fe375f336034e33e16d6bf2826cd4f966045aeb136007 ---- [PATCH] [compiler-rt] Add back ARM EABI aliases where legal. r303188 removed all the uses of aliases for EABI functions from compiler-rt, because some of them had mismatched calling conventions. Obviously, we can't use aliases for functions which don't have the same calling convention, but that's only an issue for floating-point functions with the hardfloat ABI. In other cases, the stubs increase size and reduce performance for no benefit. This patch adds back the aliases, with appropriate checks to make sure they're only used in cases where the calling convention matches. llvm-svn: 314851 PR port-arm/55897 Fix ABI mismatch for armhf runtime routines for floating-point arithmetics; For hard-float arm variants, provide (1) generic runtime routines with correct calling convention, and (2) EABI runtime routines at the same time. I've confirmed that no binary changes for kernels. LGTM by skrll
2021-06-21Pull up following revision(s) (requested by riastradh in ticket #1298):martin
lib/libc/gen/setjmp.3: revision 1.18 Clarify what happens when you longjmp(..., 0). Derived from C99 7.13.2.1 `The longjmp function'.
2021-03-05Pull up the following (all via patch), requested by mrg in ticket #1221:martin
lib/lua/bozohttpd/Makefile (apply patch) libexec/httpd/Makefile 1.30-1.31 libexec/httpd/Makefile.boot 1.7-1.9 libexec/httpd/auth-bozo.c 1.25-1.26 libexec/httpd/bozohttpd.8 1.80-1.87 libexec/httpd/bozohttpd.c 1.114-1.123,1.125-1.128 libexec/httpd/bozohttpd.h 1.61-1.68 libexec/httpd/cgi-bozo.c 1.49-1.53 libexec/httpd/content-bozo.c 1.17-1.20 libexec/httpd/daemon-bozo.c 1-.22 libexec/httpd/dir-index-bozo.c 1.33-1.34 libexec/httpd/main.c 1.23-1.27 libexec/httpd/printenv.lua 1.4-1.5 libexec/httpd/ssl-bozo.c 1.27-1.29 libexec/httpd/libbozohttpd/libbozohttpd.3 1.5-1.6 libexec/httpd/small/Makefile 1.4 libexec/httpd/testsuite/Makefile 1.14 libexec/httpd/testsuite/t16.in 1.1 libexec/httpd/testsuite/t16.out 1.1 libexec/httpd/testsuite/t17.in 1.1 libexec/httpd/testsuite/t17.out 1.1 libexec/httpd/testsuite/t18.in 1.1 libexec/httpd/testsuite/t18.out 1.1 Update to bozohttpd 20210227. Apply lua build fix (no blocklist support on this branch). changes in bozohttpd 20210227: o new support for content types: .tar.bz2, .tar.xz, .tar.lz, .tar.zst, .tbz2, .txz, .tlz, .zipx, .xz, .zst, .sz, .lz, .lzma, .lzo, .7z, .lzo, .cab, .dmg, .jar, and .rar. should fix netbsd PR#56026: MIME type of .tar.xz file on ny{cdn,ftp}.NetBSD.org is invalid changes in bozohttpd 20210211: o fix various NULL derefs from malformed headers. mostly from <emily@ingalls.rocks>. o fix memory leaks in library interface: add bozo_cleanup(). changes in bozohttpd 20201014: o also set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net. o fix array size botch (assertion, not exploitable.) from martin@netbsd.org. o also match %2F as well as %2f. from leah@vuxu.org. o many manual and help fixes. clean ups for higher lint levels, consistency/style clean ups. various option fixes including made -f imply -b. from <henrik@gulbra.net> for freebsd. changes in bozohttpd 20200912: o add .m4a and .m4v file extensions. changes in bozohttpd 20200820: o make this work on sun2 by reducing mmap window there. o fix SSL shutdown sequence. from spz@netbsd.org. o add readme support to directory indexing. from jmcneill@netbsd.org o add blocklist(8) support. from jruoho@netbsd.org.
2021-02-07Pull up following revision(s) (requested by jdolecek in ticket #1198):martin
lib/libc/stdio/fread.c: revision 1.24 (via patch) for unbuffered I/O arrange for the destination buffer to be filled in one go, instead of triggering long series of 1 byte read(2)s; this speeds up fread() several order of magnitudes for this case, directly proportional to the size of the supplied buffer change adapted from OpenBSD rev. 1.19 fixes PR lib/55808 by Roland Illig
2021-02-06Pull up following revision(s) (requested by simonb in ticket #1199):martin
lib/libc/arch/mips/sys/cerror.S: revision 1.20 For mips n32/n64 explicitly save the GP reg on the stack, and restore it _after_ the call to __errno(). Fixes sending the __errno() call off to nowhereland when this code is included in another library (eg __posix_cerror() in libposix). Failure picked up by the ATF lib/libposix/posix1/t_rename test.
2020-11-29Pull up following revision(s) (requested by is in ticket #1135):martin
lib/libc/net/getaddrinfo.c: revision 1.120 lib/libc/net/gethnamaddr.c: revision 1.93 include/arpa/nameser_compat.h: revision 1.8 Don't complain about additional DNAME records received when resolving A or AAAA (like already done for SIG/KEY and CNAME).
2020-09-13Pull up following revision(s) (requested by riastradh in ticket #1082):martin
share/man/man9/atomic_loadstore.9: revision 1.6 share/man/man9/ipi.9: revision 1.5 lib/libc/atomic/membar_ops.3: revision 1.6 Spell out acronyms in title for clarity. Update membar_ops(3) man page with examples and relation to C11. Add exhortation to always always always document how membars come in pairs for synchronization between two CPUs when you use them. atomic_load/store_* appeared in NetBSD 9, not 10. Pullup preceded release of 9.0.
2020-08-17Pull up following revision(s) (requested by riastradh in ticket #1050):martin
sys/ufs/lfs/lfs_subr.c: revision 1.101 sys/ufs/lfs/lfs_subr.c: revision 1.102 sys/ufs/lfs/lfs_inode.c: revision 1.158 sys/ufs/lfs/lfs_inode.h: revision 1.25 sys/ufs/lfs/lfs_balloc.c: revision 1.95 sys/ufs/lfs/lfs_pages.c: revision 1.21 sys/ufs/lfs/lfs_vnops.c: revision 1.330 sys/ufs/lfs/lfs_alloc.c: revision 1.140 (patch) sys/ufs/lfs/lfs_alloc.c: revision 1.141 (patch) lib/libp2k/p2k.c: revision 1.72 sys/ufs/lfs/lfs.h: revision 1.205 sys/ufs/lfs/lfs.h: revision 1.206 sys/ufs/lfs/lfs_segment.c: revision 1.284 sys/ufs/lfs/lfs.h: revision 1.207 sys/ufs/lfs/lfs_segment.c: revision 1.285 sys/ufs/lfs/lfs_debug.c: revision 1.55 sys/ufs/lfs/lfs_rename.c: revision 1.23 usr.sbin/dumplfs/dumplfs.c: revision 1.65 sys/ufs/lfs/lfs_vfsops.c: revision 1.371 sys/arch/i386/stand/efiboot/bootx64/Makefile: revision 1.3 sys/ufs/lfs/lfs_vfsops.c: revision 1.372 sys/ufs/lfs/lfs_vfsops.c: revision 1.373 sbin/fsck_lfs/pass1.c: revision 1.46 sys/ufs/lfs/lfs_vnops.c: revision 1.326 sys/ufs/lfs/lfs_vnops.c: revision 1.327 sys/ufs/lfs/lfs_vfsops.c: revision 1.375 (patch) sys/ufs/lfs/lfs_vnops.c: revision 1.328 sys/ufs/lfs/lfs_subr.c: revision 1.98 sys/ufs/lfs/lfs_extern.h: revision 1.116 sys/ufs/lfs/lfs_vnops.c: revision 1.329 sys/ufs/lfs/lfs_subr.c: revision 1.99 sys/ufs/lfs/lfs_extern.h: revision 1.117 sys/ufs/lfs/lfs_accessors.h: revision 1.49 sys/ufs/lfs/lfs_extern.h: revision 1.118 sys/rump/fs/lib/liblfs/Makefile: revision 1.15 sys/ufs/lfs/lfs_bio.c: revision 1.146 (patch) sys/ufs/lfs/lfs_bio.c: revision 1.147 sys/ufs/lfs/lfs_subr.c: revision 1.100 Fix kassert in lfs by initializing vp first. Use a marker node to iterate lfs_dchainhd / i_lfs_dchain. I believe elements can be removed while the lock is dropped, including the next node we're hanging on to. Just use VOP_BWRITE for lfs_bwrite_log. Hope this doesn't cause trouble with vfs_suspend. Teach lfs to transition ro<->rw. Prevent new dirops while we issue lfs_flush_dirops. lfs_flush_dirops assumes (by KASSERT((ip->i_state & IN_ADIROP) == 0)) that vnodes on the dchain will not become involved in active dirops even while holding no other locks (lfs_lock, v_interlock), so we must set lfs_writer here. All other callers already set lfs_writer. We set fs->lfs_writer++ without explicitly doing lfs_writer_enter because (a) we already waited for the dirops to drain, and (b) we hold lfs_lock and cannot drop it before setting lfs_writer. Assert lfs_writer where I think we can now prove it. Serialize access to the splay tree with lfs_lock. Change some cheap KDASSERT into KASSERT. Take a reference and fix assertions in lfs_flush_dirops. Fixes panic: KASSERT((ip->i_state & IN_ADIROP) == 0) at lfs_vnops.c:1670 lfs_flush_dirops lfs_check lfs_setattr VOP_SETATTR change_mode sys_fchmod syscall This assertion -- and the assertion that vp->v_uflag has VU_DIROP set -- is valid only until we release lfs_lock, because we may race with lfs_unmark_dirop which will remove the nodes and change the flags. Further, vp itself is valid only as long as it is referenced, which it is as long as it's on the dchain, but lfs_unmark_dirop drops the dchain's reference. Don't lfs_writer_enter while holding v_interlock. There's no need to lfs_writer_enter at all here, as far as I can see. lfs_flush_fs will do it for us. Break deadlock in PR kern/52301. The lock order is lfs_writer -> lfs_seglock. The problem in 52301 is that lfs_segwrite violates this lock order by sometimes doing lfs_seglock -> lfs_writer, either (a) when doing a checkpoint or (b), opportunistically, when there are no dirops pending. Both cases can deadlock, because dirops sometimes take the seglock (lfs_truncate, lfs_valloc, lfs_vfree): (a) There may be dirops pending, and they may be waiting for the seglock, so we can't wait for them to complete while holding the seglock. (b) The test for fs->lfs_dirops == 0 happens unlocked, and the state may change by the time lfs_writer_enter acquires lfs_lock. To resolve this in each case: (a) Do lfs_writer_enter before lfs_seglock, since we will need it unconditionally anyway. The worst performance impact of this should be that some dirops get delayed a little bit. (b) Create a new lfs_writer_tryenter to use at this point so that the test for fs->lfs_dirops == 0 and the acquisition of lfs_writer happen atomically under lfs_lock. Initialize/destroy lfs_allclean_wakeup in modcmd, not lfs_mountfs. Fixes reloading lfs.kmod. In lfs_update, hold lfs_writer around lfs_vflush. Otherwise, we might do lfs_vflush -> lfs_seglock -> lfs_segwait(SEGM_CKP) -> lfs_writer_enter which is the reverse of the lfs_writer -> lfs_seglock ordering. Call lfs_orphan in lfs_rename while we're still in the dirop. lfs_writer_enter can't fail; keep it simple and don't pretend it can. Assert that mtsleep can't fail either -- it doesn't catch signals and there's no timeout. Teach LFS_ORPHAN_NEXTFREE about lfs64. Dust off the orphan detection code and try to make it work. Fix !DIAGNOSTIC compile Fix userland references to LFS_ORPHAN_NEXTFREE. Forgot to grep for these or do a full distribution build, oops! Fix missing <sys/evcnt.h> by removing the evcnts instead. Just wanted to confirm that a race might happen, and indeed it did. These serve little diagnostic value otherwise. OR into bp->b_cflags; don't overwrite. CTASSERT lfs on-disk structure sizes. Avoid misaligned access to lfs64 on-disk records in memory. lfs64 directory entries are only 32-bit aligned in order to conserve space in directory blocks, and we had a hack to stuff a 64-bit inode in them. This replaces the hack by __aligned(4) __packed, and goes further: 1. It's not clear that all the other lfs64 data structures are 64-bit aligned on disk to begin with. We can go through these later and upgrade them from struct foo64 { ... } __aligned(4) __packed; union foo { struct foo64 f64; ... }; to struct foo64 { ... }; union foo { struct foo64 f64 __aligned(8); ... } __aligned(4) __packed; if we really want to take advantage of 64-bit memory accesses. However, the __aligned(4) __packed must remain on the union because: 2. We access even the lfs32 data structures via a union that has lfs64 members, and it turns out that compilers will assume access through a union with 64-bit aligned members implies the whole union has 64-bit alignment, even if we're only accessing a 32-bit aligned member. Fix clang build after packed lfs64 accessor change. Suppress spurious address-of-packed error in rump lfs too.
2020-07-14Pull up following revision(s) (requested by uwe in ticket #1004):martin
lib/libcurses/newwin.c: revision 1.58 newwin - fix crash with negative ncols. When support for negative nrows/ncols was added, one s/ncols/maxx/ was missed so we ended up passing negative (i.e. huge unsigned) length when hashing the line contents. Reported by Naman Jain in PR lib/55484
2020-07-07Pull up following revision(s) (requested by uwe in ticket #987):martin
lib/libcurses/get_wch.c: revision 1.24 lib/libcurses/getch.c: revision 1.75 Pads are not to be automatically refreshed on input. X/Open Curses says in the documentation for newpad(): Automatic refreshes of pads (e.g., from scrolling or echoing of input) do not occur. And in the documentation for get*(): If the current or specified window is not a pad, and it has been moved or modified since the last refresh operation, then it will be refreshed before another character is read. From Michael Forney in PR lib/55457
2020-07-07Pull up following revision(s) (requested by uwe in ticket #986):martin
lib/libcurses/insch.c: revision 1.26 lib/libcurses/ins_wch.c: revision 1.15 lib/libcurses/ins_wstr.c: revision 1.15 lib/libcurses/insstr.c: revision 1.8 mvwins*(WINDOW *win, ...) functions - call wins* on win, not stdscr. From Naman Jain in PR lib/55460.
2020-06-20Pull up following revision(s) (requested by rmind in ticket #956):martin
usr.sbin/npf/npf-params.7: revision 1.4 sys/net/npf/npf_worker.c: revision 1.9 usr.sbin/npf/npftest/npftest.h: revision 1.17 usr.sbin/npf/npfctl/npf_bpf_comp.c: revision 1.16 usr.sbin/npf/npf-params.7: revision 1.5 sys/net/npf/npf_state_tcp.c: revision 1.21 usr.sbin/npf/npfctl/npf_build.c: revision 1.55 usr.sbin/npf/npf-params.7: revision 1.6 sys/net/npf/npfkern.h: revision 1.5 lib/libnpf/npf.c: revision 1.49 usr.sbin/npf/npf-params.7: revision 1.7 sys/net/npf/npf_impl.h: revision 1.81 sys/net/npf/npf_ext_log.c: revision 1.17 usr.sbin/npf/npfctl/npfctl.h: revision 1.53 usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.11 sys/net/npf/npf_nat.c: revision 1.50 sys/net/npf/npf_mbuf.c: revision 1.24 sys/net/npf/npf_alg.c: revision 1.22 usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.14 usr.sbin/npf/npftest/libnpftest/npf_conn_test.c: file removal usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.10 sys/net/npf/npf.h: revision 1.63 usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.21 usr.sbin/npf/npfctl/npf_var.c: revision 1.13 sys/net/npf/files.npf: revision 1.23 usr.sbin/npf/npfctl/npf_show.c: revision 1.32 usr.sbin/npf/npfctl/npf.conf.5: revision 1.91 sys/net/npf/npf_os.c: revision 1.18 sys/net/npf/npf_connkey.c: revision 1.2 sys/net/npf/npf_conf.c: revision 1.17 lib/libnpf/libnpf.3: revision 1.12 usr.sbin/npf/npftest/npftest.c: revision 1.25 usr.sbin/npf/npftest/libnpftest/npf_gc_test.c: revision 1.1 usr.sbin/npf/npfctl/npf_parse.y: revision 1.51 sys/net/npf/npf_tableset.c: revision 1.35 usr.sbin/npf/npftest/npftest.conf: revision 1.9 sys/net/npf/npf_sendpkt.c: revision 1.22 usr.sbin/npf/npfctl/npf_var.h: revision 1.10 sys/net/npf/npf_state.c: revision 1.23 sys/net/npf/npf_conn.h: revision 1.20 usr.sbin/npf/npfctl/npfctl.c: revision 1.64 usr.sbin/npf/npfctl/npf_cmd.c: revision 1.1 sys/net/npf/npf_portmap.c: revision 1.5 sys/net/npf/npf_params.c: revision 1.3 usr.sbin/npf/npfctl/npf_scan.l: revision 1.32 tests/net/npf/t_npf.sh: revision 1.4 sys/net/npf/npf_ext_rndblock.c: revision 1.9 lib/libnpf/npf.h: revision 1.39 sys/net/npf/npf_ruleset.c: revision 1.51 sys/net/npf/npf_alg_icmp.c: revision 1.33 sys/net/npf/npf.c: revision 1.43 usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.17 usr.sbin/npf/npfctl/npfctl.8: revision 1.25 sys/net/npf/npf_ctl.c: revision 1.60 usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.18 usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.11 sys/net/npf/npf_handler.c: revision 1.49 sys/net/npf/npf_inet.c: revision 1.57 sys/net/npf/npf_ifaddr.c: revision 1.7 sys/net/npf/npf_conndb.c: revision 1.9 sys/net/npf/npf_if.c: revision 1.13 usr.sbin/npf/npfctl/Makefile: revision 1.15 sys/net/npf/npf_conn.c: revision 1.32 sys/net/npf/npf_ext_normalize.c: revision 1.10 sys/net/npf/npf_rproc.c: revision 1.20 sys/net/npf/npf_worker.c: revision 1.8 Major NPF improvements (merge from upstream): - Switch to the C11-style atomic primitives using atomic_loadstore(9). - npfkern: introduce the 'state.key.interface' and 'state.key.direction' settings. Users can now choose whether the connection state should be strictly per-interface or global at the configuration level. Keep NAT logic to be always per-interface, though. - npfkern: rewrite the G/C worker logic and make it self-tuning. - npfkern and libnpf: multiple bug fixes; add param exporting; introduce more parameters. Remove npf_nvlist_{copyin,copyout}() functions and refactor npfctl_load_nvlist() with others; add npfctl_run_op() to have a single entry point for operations. Introduce npf_flow_t and clean up some code. - npfctl: lots of fixes for the 'npfctl show' logic; make 'npfctl list' more informative; misc usability improvements and more user-friendly error messages. - Amend and improve the manual pages. npf_worker_sys{init,fini}: initialize/destroy the exit_cv condvar. npftest -- npf_test_init(): add a workaround for NetBSD. npf-params(7): fix the state.key defaults. npf-params.7: s/filer/filter/ Adjust to "npfctl debug" command line changes, from rmind@. Use more markup.
2020-05-31Pull up following revision(s) (requested by roy in ticket #936):martin
lib/libterminfo/curterm.c: revision 1.14 terminfo: test strlcpy result against space free, not string length riastradh@ yep, looks good.
2020-05-25Pull up following revision(s) (requested by riastradh in ticket #920):martin
lib/libc/compat/gen/compat_ldexp_ieee754.c: revision 1.8 Teach libc's compat ldexp stub to raise fp exceptions. This ldexp stub will shadow the ldexp weak alias for scalbn in libm, which is unfortunate but hard to fix properly without chasing the mythical libc bump beast. With the change here, we should raise all the same exceptions that libm's scalbn does -- overflow, underflow, inexact-result, and (for signalling NaN only) invalid-operation. This in turn should correct the missing overflow/underflow exceptions of our portable C fma, and perhaps other routines. XXX pullup
2020-05-13Pull up following revision(s) (requested by chs in ticket #907):martin
libexec/ld.elf_so/rtld.c: revision 1.205 libexec/ld.elf_so/rtld.h: revision 1.140 libexec/ld.elf_so/symbols.map: revision 1.3 libexec/ld.elf_so/symbols.map: revision 1.4 lib/libc/gen/pthread_atfork.c: revision 1.13 lib/libc/gen/pthread_atfork.c: revision 1.14 libexec/ld.elf_so/rtld.h: revision 1.139 libexec/ld.elf_so/rtld.c: revision 1.204 Introduce intermediate locking for fork, so that the dynamic linker is in a consistent state. This most importantly avoids races between dlopen and friends and fork, potentially resulting in dead locks in the child when it itself tries to acquire locks. Rename __atomic_fork to __locked_fork and give it &errno as argument. rtld and libc use different storage, so the initial version would incorrectly report the failure reason for fork(). There is still a small race condition inside ld.elf_so as it doesn't use thread-safe errno internally, but that's a more contained internal issue.
2020-05-13Pull up following revision(s) (requested by skrll in ticket #901):martin
sys/arch/aarch64/include/setjmp.h: revision 1.2 lib/libc/arch/aarch64/genassym.cf: revision 1.2 lib/libc/arch/aarch64/gen/setjmp.S: revision 1.3 lib/libc/arch/aarch64/gen/_setjmp.S: revision 1.4 Don't futz with tpidr_el0 in {set,long}jmp as it breaks TLS as seen in qemu
2020-04-27Pull up following revision(s) (requested by nia in ticket #855):martin
lib/libossaudio/ossaudio.c: revision 1.41 lib/libossaudio/ossaudio.c: revision 1.42 lib/libossaudio/ossaudio.c: revision 1.43 sys/compat/ossaudio/ossaudio.c: revision 1.80 sys/compat/ossaudio/ossaudio.c: revision 1.81 sys/compat/ossaudio/ossaudio.c: revision 1.82 lib/libossaudio/ossaudio.c: revision 1.39 sys/compat/ossaudio/ossaudio.c: revision 1.79 lib/libossaudio/ossaudio.c: revision 1.40 ossaudio: Make SNDCTL_DSP_SPEED more robust when using invalid rates. From the perspective of reading the OSSv4 specification, NetBSD's behaviour when an invalid sample rate is set makes no sense at all: AUDIO_SETINFO simply returns an error code, and then we immediately fall through to getting the sample rate, which is still set to the legacy default of 8000 Hz. Instead, what OSS applications generally expect is that they will be able to receive the actual hardware sample rate. This is very, very unlikely to be 8000 Hz on a modern machine. No functional change when setting a sample rate between the supported rates of 1000 and 192000 Hz. When a rate outside this range is requested, the hardware rate is returned (on modern hardware, generally always 48000 Hz or a multiple of 48000 Hz). ossaudio: Make SNDCTL_DSP_SETFMT conform with OSSv4. The OSSv4 spec says we shouldn't really error if an invalid format is chosen by an application. Things are especially likely to be confused if we return MULAW, since in OSSv4 terms that means that's the native hardware format. Instead, set and return the current hardware format if an invalid format is chosen. For the 24-bit sample formats, note that the NetBSD kernel currently can't handle them in its default configuration, and will return an error code if you attempt to use them. So, if an applicaton requests 24-bit PCM, promote it to 32-bit PCM. According to the spec, this is valid and applications should be checking the return value anyway. In the Linux compat layer, we just use S16LE as a fallback. The OSSv3 headers that are still being shipped with Linux don't contain definitions for fancier formats and we can reasonably expect all applications to support S16LE. ossaudio: If the user's channel count is rejected, use the hardware count ossaudio: Make SNDCTL_DSP_[GET|SET][PLAY|RECORD]VOL closer to OSSv4 Problems in the previous code include returning values in the 0-255 range NetBSD uses instead of the 0-100 range OSSv4 expects, using AUDIO_GETBUFINFO (which doesn't even return the mixer bits), and not encoding channels as specified: "level=(left)|(right << 8)". In reality, setting the gain in this way (through /dev/audio rather than /dev/mixer) doesn't seem to work properly, and the mixer-set value seems to be retained. However, these changes at least ensure that the return values are correct and the balance is set correctly. I've only found one application using this API (audio/audacious), and OSSv4 support in it is currently disabled precisely because it breaks when it attempts to set the track volume using it. ossaudio: Implement SNDCTL_DSP_(SET|GET)TRIGGER.
2020-04-22Pull up following revision(s) (requested by gdt in ticket #840):martin
sys/kern/vfs_syscalls.c: revision 1.544 lib/libc/sys/fdatasync.2: revision 1.17 Relax fdatasync restriction that fd be writable The restriction that a fd passed to fdatasync(2) must be writable was added in 2003 in order to comply with POSIX. Since then, POSIX has removed that requirement, and POSIX-valid programs have been therefore encountering errors on NetBSD. Patch by Paul Ripke after discussion on netbsd-users. Issue discovered with pkgsrc/databases/mongodb3 as used by pkgsrc/net/unifi.
2020-04-12Pull up following revision(s) (requested by rin in ticket #826):martin
lib/libpthread/arch/powerpc/pthread_md.h: revision 1.9 sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.48 Revert previous: http://mail-index.netbsd.org/source-changes/2020/02/20/msg114173.html Comment turned out to be wrong, and KASSERT fires for oea. XXX Need to revisit shortly...
2020-03-08Pull up following revision(s) (requested by chs in ticket #763):martin
lib/libkvm/kvm.c: revision 1.105 lib/libkvm/kvm_x86_64.c: revision 1.11 only do bounce buffering for character devices. use a binary search in _kvm_pa2off(). this helps a lot for sparse dumps, which can have millions of memory segments.
2020-03-03Pull up following revision(s) (requested by riastradh in ticket #756):martin
lib/Makefile: revision 1.276 Remove unfinished hack I accidentally committed in 2017. This caused make to unconditionally take ages running useless submakes in every subdirectory. Accidentally committed during the MKCRYPTO option removal when I was presumably experimenting with automating library dependency generation in lib. Should shave a few seconds at least off every build!
2020-02-27Pull up following revision(s) (requested by rin in ticket #736):martin
lib/libpthread/arch/powerpc/pthread_md.h: revision 1.8 sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.47 libpthread sets initial value of MSR for lwp's. However, appropriate value differs b/w oea/booke/ibm4xx, and there's no way to obtain it from userland. Therefore, this initial value should be corrected by cpu_setmcontext(). - Comment this in libpthread - Add KASSERT in cpu_mcontext_validate()
2020-02-20Pull up following revision(s) (requested by riastradh in ticket #713):martin
lib/libdm/libdm_ioctl.c: revision 1.4 Let's not write temporary files to fixed paths in /tmp, shall we? XXX pullup
2020-02-10Pull up following revision(s) (requested by maxv in ticket #688):martin
share/man/man4/nvmm.4: revision 1.5 lib/libnvmm/libnvmm.3: revision 1.26 sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.47 Mmh, as noted in PR/54847, this should be uint64_t, not uint16_t. Harmless because we use only the two lowest bits anyway. I believe this could be caught by KUBSAN; time to do another round of NVMM+K_SAN testing. Reference nvmmctl(8).
2020-01-26Pull up following revision(s) (requested by ad in ticket #647):martin
lib/libpthread/pthread_rwlock.c: revision 1.37 (patch) lib/libpthread/pthread_misc.c: revision 1.16 lib/libpthread/pthread.c: revision 1.154 lib/libpthread/pthread_int.h: revision 1.98 lib/libpthread/pthread_cond.c: revision 1.66 lib/libpthread/pthread_mutex.c: revision 1.66 Rip out some very ambitious optimisations around pthread_mutex that are don't buy much. This stuff is hard enough to get right in the kernel let alone userspace, and I don't trust that it's right.
2019-12-18Pull up following revision(s) (requested by joerg in ticket #572):martin
sys/kern/uipc_sem.c: revision 1.56 lib/libc/gen/sysconf.c: revision 1.43 PR 54619: Remove semaphore limit introduce as part of GSoC 2016 with _SC_SEM_NSEMS_MAX. Report no limit for getconf(3). The ressource is naturally limited by the backing file descriptor, so no separate limit is necessary. Keep the accounting for debugging as it is part of the sysctl ABI exposed by the kernel.
2019-12-18Pull up following revision(s) (requested by joerg in ticket #571):martin
lib/libpthread/pthread_int.h: revision 1.97 Bump PTHREAD__UNPARK_MAX to 128 as bandaid for locking related hangs.
2019-12-09Pull up following revision(s) (requested by pgoyette in ticket #527):martin
sbin/modstat/modstat.8: revision 1.24 sbin/modstat/modstat.8: revision 1.26 lib/libc/sys/modctl.2: revision 1.16 Note that the size returned by modctl(2) and displayed by modstat(8) is only for the module's text section, not for the entire size of the module. Addresses PR kern-54737 Remove superfluous Pp.
2019-12-08Pull up following revision(s) (requested by riastradh in ticket #507):martin
lib/libm/arch/aarch64/fenv.c: revision 1.5 lib/libm/arch/aarch64/fenv.c: revision 1.6 Fix fesetenv and feupdateenv. - fesetenv is supposed to set the stored rounding mode (and stored trap settings, but they have no effect on any ARMv8 I know). - feupdateenv is supposed to re-raise the exceptions that were raised in the environment when it was called. XXX atf test XXX pullup-9 Fix feraiseexcept. - Don't touch the trap flags (though on all ARMv8 I know they have no effect anyway). - Don't clear any existing raised exception flags; just add to them. XXX atf test XXX pullup-9
2019-12-08Pull up following revision(s) (requested by riastradh in ticket #506):martin
lib/libc/gdtoa/Makefile.inc: revision 1.11 lib/libc/gdtoa/gdtoa_fltrnds.h: revision 1.2 lib/libc/gdtoa/gdtoaimp.h: revision 1.15 lib/libc/gdtoa/gdtoaimp.h: revision 1.17 Honour the floating-point rounding mode in floating-point formatting. C99, Sec. 7.19.6.1 `The fprintf function', paragraph 13, p. 281: (Recommended practice) For e, E, f, F, g, and G conversions, if the number of significant decimal digits is at most DECIMAL_DIG, then the result should be correctly rounded. If the number of significant decimal digits is more than DECIMAL_DIG but the source value is exactly representable with DECIMAL_DIG digits, then the result should be an exact representation with trailing zeros. Otherwise, the source value is bounded by two adjacent decimal strings L < U, both having DECIMAL_DIG significant idgits; the value of the resultant decimal string D should satisfy L <= D <= U, _with the extra stipulation that the error should have a correct sign for the current rounding direction_. [emphasis added] The gdtoa code base already supports respecting the floating-point rounding mode, as long as we compile it with Honor_FLT_ROUNDS defined. However, for this to work, fegetround must be available in libc, which it is not currently -- the fenv logic is in libm. Fortunately, we don't have to move all of fenv from libm to libc -- programs that do not link against libm don't have fesetround, so the rounding mode is always the default (barring asm shenanigans that bypass the API -- tough). So use a weak reference to fegetround; by default, assume FE_TONEAREST if it is not defined. Mark the libc fegetround weak reference unused. Not all .c files that include gdtoaimp.h use it, which makes clang unhappy.
2019-11-26Pull up following revision(s) (requested by nakayama in ticket #469):martin
lib/libc/tls/tls.c: revision 1.10 lib/libc/tls/tls.c: revision 1.11 lib/libc/tls/tls.c: revision 1.12 lib/libc/tls/tls.c: revision 1.13 libexec/ld.elf_so/tls.c: revision 1.13 libexec/ld.elf_so/tls.c: revision 1.14 libexec/ld.elf_so/Makefile: revision 1.142 lib/libc/tls/Makefile.inc: revision 1.3 usr.bin/ldd/Makefile.elf: revision 1.6 PR 54093: Align static TLS area to max_align_t. Use alignof and not size_t for platforms with non-natural base alignments. Mirror the ld.elf_so logic for handling aligning the TLS size. Most noticable, recompute the start of the TLS area for variant I relative to the TCB. This makes a difference when the segment size and base alignment don't agree. Fix PR/54074 and PR/54093 completely. More similar to the ld.elf_so logic, it is necessary to align with p_align first. Also, invert the #ifdef condition for consistency. Should fix regression for static linking binaries: http://releng.netbsd.org/b5reports/sparc/commits-2019.11.html#2019.11.10.23.39.03 http://releng.netbsd.org/b5reports/sparc64/commits-2019.11.html#2019.11.16.04.10.33
2019-11-21In preparation for the upcoming release, turn off DIAGNOSTIC in mostmartin
kernel configs, modules and libc.
2019-11-19Pull up following revision(s) (requested by isaki in ticket #446):martin
lib/libossaudio/ossaudio.c: revision 1.37 lib/libossaudio/ossaudio.c: revision 1.38 sys/compat/ossaudio/ossaudio.c: revision 1.77 sys/compat/ossaudio/ossaudio.c: revision 1.78 Use record.sample_rate for recording on SNDCTL_DSP_SPEED. Fix PR lib/54667. Use record.sample_rate for recording on SNDCTL_DSP_SPEED. It's kernel side of PR lib/54667. Use record field for recording even on SNDCTL_DSP_STEREO, SNDCTL_DSP_SETFMT, and SNDCTL_DSP_CHANNELS.
2019-11-10Pull up following revision(s) (requested by maxv in ticket #405):martin
usr.sbin/nvmmctl/nvmmctl.8: revision 1.2 lib/libnvmm/libnvmm.3: revision 1.24 sys/dev/nvmm/nvmm.h: revision 1.11 lib/libnvmm/libnvmm.3: revision 1.25 sys/dev/nvmm/x86/nvmm_x86.h: revision 1.16 sys/dev/nvmm/nvmm.h: revision 1.12 sys/dev/nvmm/x86/nvmm_x86.h: revision 1.17 tests/lib/libnvmm/h_mem_assist.c: revision 1.12 sys/dev/nvmm/x86/nvmm_x86.h: revision 1.18 share/mk/bsd.hostprog.mk: revision 1.82 lib/libnvmm/libnvmm.c: revision 1.15 distrib/sets/lists/base/md.amd64: revision 1.281 tests/lib/libnvmm/h_mem_assist.c: revision 1.13 lib/libnvmm/libnvmm.c: revision 1.16 tests/lib/libnvmm/h_mem_assist.c: revision 1.14 lib/libnvmm/libnvmm_x86.c: revision 1.32 lib/libnvmm/libnvmm.c: revision 1.17 tests/lib/libnvmm/h_mem_assist.c: revision 1.15 lib/libnvmm/libnvmm_x86.c: revision 1.33 lib/libnvmm/libnvmm.c: revision 1.18 usr.sbin/nvmmctl/Makefile: revision 1.1 tests/lib/libnvmm/h_mem_assist_asm.S: revision 1.7 tests/lib/libnvmm/h_mem_assist.c: revision 1.16 lib/libnvmm/libnvmm_x86.c: revision 1.34 usr.sbin/nvmmctl/Makefile: revision 1.2 tests/lib/libnvmm/h_mem_assist_asm.S: revision 1.8 tests/lib/libnvmm/h_mem_assist.c: revision 1.17 sys/dev/nvmm/nvmm_internal.h: revision 1.13 lib/libnvmm/libnvmm_x86.c: revision 1.35 lib/libnvmm/libnvmm_x86.c: revision 1.36 usr.sbin/postinstall/postinstall.in: revision 1.8 lib/libnvmm/libnvmm_x86.c: revision 1.37 lib/libnvmm/libnvmm_x86.c: revision 1.38 lib/libnvmm/libnvmm_x86.c: revision 1.39 usr.sbin/Makefile: revision 1.282 lib/libnvmm/nvmm.h: revision 1.13 lib/libnvmm/nvmm.h: revision 1.14 lib/libnvmm/nvmm.h: revision 1.15 sys/dev/nvmm/nvmm.c: revision 1.23 lib/libnvmm/nvmm.h: revision 1.16 sys/dev/nvmm/nvmm.c: revision 1.24 lib/libnvmm/nvmm.h: revision 1.17 sys/dev/nvmm/nvmm.c: revision 1.25 tests/lib/libnvmm/h_io_assist.c: revision 1.9 etc/MAKEDEV.tmpl: revision 1.209 tests/lib/libnvmm/h_io_assist.c: revision 1.10 tests/lib/libnvmm/h_io_assist.c: revision 1.11 etc/group: revision 1.35 distrib/sets/lists/man/mi: revision 1.1660 sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.40 sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.41 sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.42 sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.43 sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.44 sys/dev/nvmm/x86/nvmm_x86_svm.c: revision 1.51 sys/dev/nvmm/nvmm_ioctl.h: revision 1.8 sys/dev/nvmm/x86/nvmm_x86_svm.c: revision 1.52 sys/dev/nvmm/nvmm_ioctl.h: revision 1.9 sys/dev/nvmm/x86/nvmm_x86_svm.c: revision 1.53 usr.sbin/nvmmctl/nvmmctl.c: revision 1.1 lib/libnvmm/libnvmm.3: revision 1.20 distrib/sets/lists/debug/md.amd64: revision 1.106 lib/libnvmm/libnvmm.3: revision 1.21 lib/libnvmm/libnvmm.3: revision 1.22 usr.sbin/nvmmctl/nvmmctl.8: revision 1.1 lib/libnvmm/libnvmm.3: revision 1.23 Fix incorrect parsing: the R/M field uses a special GPR map when the address size is 16 bits, regardless of the actual operating mode. With this special map there can be two registers referenced at once, and also disp16-only. Implement this special behavior, and add associated tests. While here simplify a few things. With this in place, the Windows 95 installer initializes correctly. Part of PR/54611. add missing initializer Implement XCHG, add associated tests, and add comments to explain. With this in place the Windows 95 installer completes successfuly. Part of PR/54611. Improve nvmm_vcpu_dump(). Put back 'default', because llvm apparently doesn't realize that all cases are covered in the switch. Miscellaneous changes in NVMM, to address several inconsistencies and issues in the libnvmm API. - Rename NVMM_CAPABILITY_VERSION to NVMM_KERN_VERSION, and check it in libnvmm. Introduce NVMM_USER_VERSION, for future use. - In libnvmm, open "/dev/nvmm" as read-only and with O_CLOEXEC. This is to avoid sharing the VMs with the children if the process forks. In the NVMM driver, force O_CLOEXEC on open(). - Rename the following things for consistency: nvmm_exit* -> nvmm_vcpu_exit* nvmm_event* -> nvmm_vcpu_event* NVMM_EXIT_* -> NVMM_VCPU_EXIT_* NVMM_EVENT_INTERRUPT_HW -> NVMM_VCPU_EVENT_INTR NVMM_EVENT_EXCEPTION -> NVMM_VCPU_EVENT_EXCP Delete NVMM_EVENT_INTERRUPT_SW, unused already. - Slightly reorganize the MI/MD definitions, for internal clarity. - Split NVMM_VCPU_EXIT_MSR in two: NVMM_VCPU_EXIT_{RD,WR}MSR. Also provide separate u.rdmsr and u.wrmsr fields. This is more consistent with the other exit reasons. - Change the types of several variables: event.type enum -> u_int event.vector uint64_t -> uint8_t exit.u.*msr.msr: uint64_t -> uint32_t exit.u.io.type: enum -> bool exit.u.io.seg: int -> int8_t cap.arch.mxcsr_mask: uint64_t -> uint32_t cap.arch.conf_cpuid_maxops: uint64_t -> uint32_t - Delete NVMM_VCPU_EXIT_MWAIT_COND, it is AMD-only and confusing, and we already intercept 'monitor' so it is never armed. - Introduce vmx_exit_insn() for NVMM-Intel, similar to svm_exit_insn(). The 'npc' field wasn't getting filled properly during certain VMEXITs. - Introduce nvmm_vcpu_configure(). Similar to nvmm_machine_configure(), but as its name indicates, the configuration is per-VCPU and not per-VM. Migrate and rename NVMM_MACH_CONF_X86_CPUID to NVMM_VCPU_CONF_CPUID. This becomes per-VCPU, which makes more sense than per-VM. - Extend the NVMM_VCPU_CONF_CPUID conf to allow triggering VMEXITs on specific leaves. Until now we could only mask the leaves. An uint32_t is added in the structure: uint32_t mask:1; uint32_t exit:1; uint32_t rsvd:30; The two first bits select the desired behavior on the leaf. Specifying zero on both resets the leaf to the default behavior. The new NVMM_VCPU_EXIT_CPUID exit reason is added. Three changes in libnvmm: - Add 'mach' and 'vcpu' backpointers in the nvmm_io and nvmm_mem structures. - Rename 'nvmm_callbacks' to 'nvmm_assist_callbacks'. - Rename and migrate NVMM_MACH_CONF_CALLBACKS to NVMM_VCPU_CONF_CALLBACKS, it now becomes per-VCPU. Update the libnvmm man page: - Sync the naming with reality. - Replace "relevant" by "desired" and "virtualizer" by "emulator", closer to what I meant. - Add a "VCPU Configuration" section. - Add a "Machine Ownership" section. Add the "nvmm" group, and make nvmm_init() public. Sent to tech-kern@ a few days ago. Use the new PTE naming, and define CR3_FRAME_* separately. No functional change. Add a new VCPU conf option, that allows userland to request VMEXITs after a TPR change. This is supported on all Intel CPUs, and not-too-old AMD CPUs. The reason for wanting this option is that certain OSes (like Win10 64bit) manage interrupt priority in hardware via CR8 directly, and for these OSes, the emulator may want to sync its internal TPR state on each change. Add two new fields in cap.arch, to report the conf capabilities. Report TPR only on Intel for now, not AMD, because I don't have a recent AMD CPU on which to test. Mask CPUID leaf 0x0A on Intel, because we don't want the guest to try (and fail) to probe the PMC MSRs. This avoids "Unexpected WRMSR" warnings in qemu-nvmm. Add PCID support in the guests. This speeds up most 64bit guests, because since Meltdown, everybody uses PCID (including NetBSD). Change the way root_owner works: consider the calling process as root_owner not if it has root privileges, but if the /dev/nvmm device was opened with write permissions. Introduce the undocumented nvmm_root_init() function to achieve that. The goal is to simplify the logic and have more granularity, eg if we want a monitoring agent to access VMs but don't want to give this agent real root access on the system. A few changes: - Use smaller types in struct nvmm_capability. - Use smaller type for nvmm_io.port. - Switch exitstate to a compacted structure. Add nram in struct nvmm_ctl_mach_info. Add nvmmctl, with two commands for now. Macro tidyness. Sort SEE ALSO. should be fork(2), noticed by wiz Add debug entry for newly introduced nvmmctl utility. Annotate a covering switch as such to avoid warnings about missing returns. Forgot to put nvmmctl in the "nvmm" group. Add nvmm group.
2019-10-15Pull up following revision(s) (requested by kamil in ticket #326):martin
lib/libc/sys/ptrace.2: revision 1.81 Document PT_STOP, update PT_KILL in the ptrace(2) man-page Formatting by <mgorny>
2019-10-04Pull up following revision(s) (requested by rmind in ticket #282):martin
usr.sbin/npf/npfctl/npf_build.c: revision 1.53 lib/libnpf/npf.c: revision 1.48 usr.sbin/npf/npfctl/npfctl.h: revision 1.50 sys/net/npf/npf_impl.h: revision 1.80 usr.sbin/npf/npfctl/npfctl.h: revision 1.51 sys/net/npf/npf_ruleset.c: revision 1.49 usr.sbin/npf/npfctl/npf.conf.5: revision 1.90 sys/net/npf/npf_ctl.c: revision 1.59 lib/libnpf/libnpf.3: revision 1.11 usr.sbin/npf/npfctl/npf_parse.y: revision 1.50 usr.sbin/npf/npftest/npftest.conf: revision 1.8 usr.sbin/npf/npfctl/npfctl.c: revision 1.62 usr.sbin/npf/npfctl/npfctl.c: revision 1.63 usr.sbin/npf/npfctl/npf_scan.l: revision 1.30 usr.sbin/npf/npfctl/npfctl.8: revision 1.22 lib/libnpf/npf.h: revision 1.38 usr.sbin/npf/npfctl/npfctl.8: revision 1.23 usr.sbin/npf/npfctl/npfctl.8: revision 1.24 sys/net/npf/npf_if.c: revision 1.11 sys/net/npf/npf_if.c: revision 1.12 usr.sbin/npf/npfctl/npf.conf.5: revision 1.89 sys/net/npf/npf_conn.c: revision 1.30 usr.sbin/npf/npfctl/npf_build.c: revision 1.52 npfctl: implement table replace subcommand. Contributed by Timshel Knoll-Miller. NPF ifmap: rework and fix a few small bugs. npfctl: implement table replace subcommand. Contributed by Timshel Knoll-Miller. (missed a file in previous commit; cvs is so helpful..) libnpf/npfctl: support dynamic NAT rulesets using a name prefix. Use -width Pa for FILES. Fix pasto in table replace -t type Use -width Pa for FILES. npf_ifmap_copylogname: be more defensive.
2019-09-27Pull up following revision(s) (requested by brad in ticket #252):martin
external/cddl/osnet/lib/libzpool/Makefile: revision 1.13 lib/libpthread/Makefile: revision 1.95 external/cddl/osnet/lib/libuutil/Makefile: revision 1.6 distrib/sets/lists/base/shl.mi: revision 1.871 external/cddl/osnet/lib/libzfs_core/Makefile: revision 1.2 external/cddl/osnet/lib/libnvpair/Makefile: revision 1.11 external/cddl/osnet/lib/libzfs/Makefile: revision 1.10 external/cddl/osnet/lib/libavl/Makefile: revision 1.6 distrib/sets/lists/debug/shl.mi: revision 1.230 external/cddl/osnet/lib/libumem/Makefile: revision 1.7 Add USE_SHLIBDIR=yes to a number of Makefiles for the libraries used by /sbin/{zfs,zpool,mount_zfs}. The general effect is to move them from /usr/lib to /lib. Compatibility links are installed in /usr/lib and nothing that is installed, say in /usr/pkg, appears to break. With this, it is possible to have a /var and /usr mount using ZFS legacy mounting early on in the boot process. Run tested on amd64 and i386 and compile tested on evbarm. Fix MKDEBUG distrib sets Add libpthread, libnvpair and ZFS libs to dynamicroot.
2019-09-13Pull up following revision(s) (requested by kamil in ticket #198):martin
lib/libpthread/thrd.c: revision 1.4 lib/libpthread/threads.h: revision 1.3 Switch back _Noreturn to __dead in C11 threads There is an ongoing discussion to unify unreturn attribute between C and C++, making a compatible version, shared between languages. Instead of picking C11-only approach here, switch back to __dead that wraps the compiler extension for the same purpose. This change makes this header more compatible with C++ and pre-C11. Reference: <a rel="nofollow" href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2410.pdf">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2410.pdf</a>
2019-09-06Pull up following revision(s) (requested by maya in ticket #186):martin
lib/libc/nameser/ns_name.c: revision 1.12 Since we advance cp after the bounds check, we need to test for bounds again before using it. Discovered via fuzzing, reported by enh at google, via: https://android-review.googlesource.com/c/platform/bionic/+/1093130
2019-09-05Pull up following revision(s) (requested by sevan in ticket #174):martin
lib/libc/sys/chmod.2: revision 1.48 lib/libc/sys/stat.2: revision 1.59 lib/libc/sys/unlink.2: revision 1.30 lib/libc/sys/lseek.2: revision 1.25 lib/libc/sys/getuid.2: revision 1.18 lib/libc/sys/chown.2: revision 1.37 lib/libm/man/exp.3: revision 1.32 lib/libm/man/log.3: revision 1.7 lib/libc/sys/open.2: revision 1.60 lib/libc/stdio/fopen.3: revision 1.36 lib/libc/stdio/putc.3: revision 1.14 lib/libc/sys/mount.2: revision 1.51 share/man/man9/copy.9: revision 1.22 share/man/man9/uiomove.9: revision 1.20 lib/libc/sys/setuid.2: revision 1.23 lib/libc/sys/close.2: revision 1.18 sbin/init/init.8: revision 1.61 lib/libc/sys/write.2: revision 1.36 lib/libc/sys/read.2: revision 1.39 sbin/init/init.8: revision 1.62 lib/libc/sys/wait.2: revision 1.40 usr.bin/tty/tty.1: revision 1.10 lib/libc/sys/link.2: revision 1.33 usr.bin/du/du.1: revision 1.24 lib/libc/stdlib/exit.3: revision 1.17 usr.bin/su/su.1: revision 1.53 usr.bin/mail/mail.1: revision 1.66 lib/libc/sys/fork.2: revision 1.25 usr.bin/su/su.1: revision 1.54 usr.bin/mail/mail.1: revision 1.67 lib/libm/man/sin.3: revision 1.15 share/man/man9/intro.9: revision 1.26 share/man/man5/utmp.5: revision 1.17 lib/libc/compat-43/creat.3: revision 1.17 lib/libc/time/ctime.3: revision 1.61 lib/libcompat/4.1/stty.3: revision 1.10 usr.bin/dc/dc.1: revision 1.3 lib/libm/man/cos.3: revision 1.17 lib/libc/sys/chdir.2: revision 1.23 lib/libc/gen/exec.3: revision 1.30 lib/libc/gen/exec.3: revision 1.31 games/bcd/bcd.6: revision 1.18 games/bcd/bcd.6: revision 1.19 usr.bin/write/write.1: revision 1.7 usr.bin/wc/wc.1: revision 1.18 usr.bin/pr/pr.1: revision 1.24 usr.bin/who/who.1: revision 1.25 lib/libc/sys/mkdir.2: revision 1.30 lib/libc/stdio/getc.3: revision 1.13 usr.bin/sort/sort.1: revision 1.40 usr.bin/mesg/mesg.1: revision 1.11 share/man/man5/passwd.5: revision 1.34 sort was there since v1 https://www.bell-labs.com/usr/dmr/www/man61.pdf dc was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf du was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf mail was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf mesg was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf Document history https://www.bell-labs.com/usr/dmr/www/man13.pdf su was in v1 https://www.bell-labs.com/usr/dmr/www/man13.pdf Document history https://www.bell-labs.com/usr/dmr/www/man13.pdf Document history https://www.bell-labs.com/usr/dmr/www/man14.pdf Update URL write was in v1 https://www.bell-labs.com/usr/dmr/www/man14.pdf grammar passwd(5) was in v1 https://www.bell-labs.com/usr/dmr/www/man51.pdf utmp(5) was present in v1 https://www.bell-labs.com/usr/dmr/www/man51.pdf Earliest version of wtmp I could find was in v3 https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5 Document history of chdir(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of chmod(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of chown(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf create was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of exec() Move statement on execlpe() & execvpe() to HISTORY section. Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf fork was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf stat() was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf document history of fstat() https://www.bell-labs.com/usr/dmr/www/man21.pdf getuid was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf stty & gtty were around since v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf https://www.bell-labs.com/usr/dmr/www/man22.pdf mount & umount were present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf Open was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf read was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf seek was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf setuid was in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf unlink was presen in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf wait was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf write was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf start documenting history exp was present in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf log appeared in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf putc & putw were in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf putchar was in v4 https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3 Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf Document history. https://www.bell-labs.com/usr/dmr/www/man11.pdf Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which version, hence I've skipped mentioning it. End sentence with a dot. Remove superfluous Pp. Remove superfluous Pp. Remove superfluous Ns. Remove superfluous Pp. fetch(9) -> ufetch(9) fetch(9) -> ufetch(9). Remove superfluous Pp. fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
2019-09-02Pull up following revision(s) (requested by brad in ticket #110):martin
libexec/lfs_cleanerd/lfs_cleanerd.c: revision 1.59 libexec/lfs_cleanerd/lfs_cleanerd.8: revision 1.19 sbin/resize_lfs/resize_lfs.c: revision 1.15 usr.sbin/puffs/rump_lfs/rump_lfs.c: revision 1.19 libexec/lfs_cleanerd/lfs_cleanerd.c: revision 1.60 lib/libutil/getdiskrawname.c: revision 1.6 tests/fs/common/fstest_lfs.c: revision 1.7 Use getdiskrawname to find the device name. Reviewed by Christos - Teach getdiskrawname and getdiskcookedname about zvols. Reviewed by Christos - Add support for passing the raw device name separate from the filesystem. This is useful in the case where the cleaner is compiled into code, such as rump_lfs and the ATF tests. This helps to fix bin/54488 - The cleaner is compiled into rump_lfs and executed as a thread. Pass in the raw device using the new -J option. This avoids the use of getdiskrawname which is not particularly rump safe in this context and insures that the rump container device is used for cleaning, not the outer device.