Page MenuHomeFreeBSD
Feed Advanced Search

May 6 2024

kib committed rGd63c680d39f5: rtld: add direct-exec option -o (authored by kib).
rtld: add direct-exec option -o
May 6 2024, 4:43 AM
kib added inline comments to D45053: tests/fusefs: fix all tests that depend on kern.maxphys.
May 6 2024, 4:01 AM
kib committed rGc097967b9af9: mlx5en: add diagnostic in one more case of failed eeprom read preparation (authored by kib).
mlx5en: add diagnostic in one more case of failed eeprom read preparation
May 6 2024, 3:16 AM

May 4 2024

kib added inline comments to D45043: vm_reserv: introduce unmanaged reservations.
May 4 2024, 11:13 PM
kib added inline comments to D45084: uma: deduplicate uma_small_alloc.
May 4 2024, 9:04 PM
kib added a comment to D45058: linuxkpi: Fix arch_io_reserve_memtype_wc.

Include missing headers sys/queue.h from vm/_vm_phys.h for TAILQ, and sys/param.h from vm/vm_phys.h for NULL so linux/io.h doesn't have to include them.

I think this part should be committed separately.

arch_io_reserve_memtype_wc is implemented using PHYS_TO_DMAP and pmap_change_attr but not all architectures have a DMAP and this doesn't match the upstream implementation.

Looking at Linux, the old version of this diff actually does partially match the implementation. If the platform doesn't have a direct map, or the PA range isn't backed by RAM, then it does nothing. Otherwise it updates the mapping type of the range in the direct map, presumably to avoid the UB that kib mentions.

I think what this function is supposed to do is check whether the PA range is covered by the vm_page_array and update the direct map if so, otherwise register a fictitious range. Perhaps this is best implemented in the VM system rather than the LinuxKPI?

May 4 2024, 2:48 AM
kib accepted D45090: ofed: don't expose symbols twice.
May 4 2024, 12:09 AM

May 3 2024

kib committed rGb27eb9ce96b8: __cxa_thread_call_dtors(3): fix dtor pointer validity check (authored by kib).
__cxa_thread_call_dtors(3): fix dtor pointer validity check
May 3 2024, 11:24 PM
kib closed D45074: __cxa_thread_call_dtors(3): fix dtor pointer validity check.
May 3 2024, 11:24 PM
kib added a comment to D45074: __cxa_thread_call_dtors(3): fix dtor pointer validity check.
In D45074#1027845, @dim wrote:

Does the cxa_thread_dtor::dso field serve any function after this change? I couldn't see any other references to it.

May 3 2024, 10:57 AM
kib requested review of D45074: __cxa_thread_call_dtors(3): fix dtor pointer validity check.
May 3 2024, 9:38 AM
kib added a comment to D45058: linuxkpi: Fix arch_io_reserve_memtype_wc.

As I noted, I am not sure that vm_phys_fictitious_reg() KPI is prepared for such use. IMO it needs to be enhanced to check if the registering range is already backed by some vm_page_t storage and not create an overlap. Right now there are only minor piece of such care, for the case where the range intersects with vm_page_array[]. Otherwise the result is UB both for memattr use, and for consequent RBTREE manipulations.

May 3 2024, 2:46 AM
kib accepted D45045: malloc(9): introduce M_NEVERFREED.

Mentioning the supposed scope of use for flag in the review would be best. BTW if it is internal to vm allocators, why not call it M_VM_NOFREE?

May 3 2024, 12:36 AM
kib accepted D45057: linuxkpi: Fix set_memory_*.
May 3 2024, 12:34 AM
kib committed rGd9ec850bde3c: rtld snprintf: do not erronously skip a char at the buffer boundary (authored by kib).
rtld snprintf: do not erronously skip a char at the buffer boundary
May 3 2024, 12:27 AM
kib committed rGcf2750be9e32: kcmp_pget(): do not accept TIDs (authored by kib).
kcmp_pget(): do not accept TIDs
May 3 2024, 12:27 AM
kib committed rG6b667b46ab19: kcmp_pget(): add an assert that we did not hold the current process (authored by kib).
kcmp_pget(): add an assert that we did not hold the current process
May 3 2024, 12:27 AM
kib committed rG44debee9fc1f: rtld snprintf: do not erronously skip a char at the buffer boundary (authored by kib).
rtld snprintf: do not erronously skip a char at the buffer boundary
May 3 2024, 12:26 AM
kib committed rG33cac296a266: kcmp_pget(): do not accept TIDs (authored by kib).
kcmp_pget(): do not accept TIDs
May 3 2024, 12:26 AM
kib committed rG66e0bf766854: kcmp_pget(): add an assert that we did not hold the current process (authored by kib).
kcmp_pget(): add an assert that we did not hold the current process
May 3 2024, 12:26 AM

May 2 2024

kib added a comment to D45053: tests/fusefs: fix all tests that depend on kern.maxphys.

u_long

May 2 2024, 6:00 AM

May 1 2024

kib accepted D44216: Make WITHOUT_UNDEFINED_VERSION the default.
May 1 2024, 10:33 PM
kib accepted D32306: Import _FORTIFY_SOURCE implementation from NetBSD.
May 1 2024, 10:30 PM
kib added a comment to D45045: malloc(9): introduce M_NEVERFREED.

Why not M_NOFREE?

May 1 2024, 10:25 PM
kib added inline comments to D45044: uma: retire UMA_MD_SMALL_ALLOC.
May 1 2024, 10:15 PM
kib accepted D44893: Simplify signal handling code in libthr by removing use of SYS_sigreturn.
May 1 2024, 2:59 PM
kib added a comment to D44893: Simplify signal handling code in libthr by removing use of SYS_sigreturn.

Please upload patches with full context.

May 1 2024, 10:01 AM

Apr 30 2024

kib added inline comments to D44271: bsd.lib.mk: add targets to detect symbol changes.
Apr 30 2024, 10:46 PM
kib added inline comments to D44271: bsd.lib.mk: add targets to detect symbol changes.
Apr 30 2024, 10:13 PM
kib added a comment to D44893: Simplify signal handling code in libthr by removing use of SYS_sigreturn.

Can you upload the full context for the diff?

Apr 30 2024, 10:10 PM
kib committed rG1e01650a7870: kcmp_pget(): add an assert that we did not hold the current process (authored by kib).
kcmp_pget(): add an assert that we did not hold the current process
Apr 30 2024, 7:08 AM
kib committed rG5b3e5c6ce3e5: kcmp_pget(): do not accept TIDs (authored by kib).
kcmp_pget(): do not accept TIDs
Apr 30 2024, 7:08 AM
kib committed rG509819691cb8: libc_private.h: use private namespace name for size_t (authored by kib).
libc_private.h: use private namespace name for size_t
Apr 30 2024, 1:17 AM
kib committed rGa951992d1eb3: libc_private.h: use private namespace name for size_t (authored by kib).
libc_private.h: use private namespace name for size_t
Apr 30 2024, 1:17 AM
kib committed rG6a7819e43f93: rtld.1: clarify interaction between -u and -o (authored by kib).
rtld.1: clarify interaction between -u and -o
Apr 30 2024, 12:55 AM
kib committed rGef2694f368ce: rtld direct exec: make -u behavior match the description (authored by kib).
rtld direct exec: make -u behavior match the description
Apr 30 2024, 12:55 AM
kib committed rGd1cd0cc32b53: rtld: add direct-exec option -o (authored by kib).
rtld: add direct-exec option -o
Apr 30 2024, 12:55 AM
kib closed D44999: rtld direct exec: make -u behavior match the description.
Apr 30 2024, 12:55 AM
kib closed D44988: rtld: add direct-exec option -o.
Apr 30 2024, 12:55 AM
kib committed rGf0e8600d71e0: libc printf_render_errno(): do not use strerror() (authored by kib).
libc printf_render_errno(): do not use strerror()
Apr 30 2024, 12:50 AM
kib committed rGa8ae94b9e2cb: libc: make strerror_rl() usable for libc (authored by kib).
libc: make strerror_rl() usable for libc
Apr 30 2024, 12:50 AM
kib committed rGfcac864ee14b: libc: minor style, wrap long lines (authored by kib).
libc: minor style, wrap long lines
Apr 30 2024, 12:50 AM
kib committed rG27e54c9f1628: __vprintf(): switch from strerror() to strerror_rl() (authored by kib).
__vprintf(): switch from strerror() to strerror_rl()
Apr 30 2024, 12:50 AM
kib committed rG09bcfbd1aede: libc printf_render_errno(): do not use strerror() (authored by kib).
libc printf_render_errno(): do not use strerror()
Apr 30 2024, 12:50 AM
kib committed rG0451d4287a92: libc: minor style, wrap long lines (authored by kib).
libc: minor style, wrap long lines
Apr 30 2024, 12:50 AM
kib committed rGbd30b3dfd5c8: Add test for pthread_sigqueue(3) (authored by kib).
Add test for pthread_sigqueue(3)
Apr 30 2024, 12:50 AM
kib committed rGade62d406239: __vprintf(): switch from strerror() to strerror_rl() (authored by kib).
__vprintf(): switch from strerror() to strerror_rl()
Apr 30 2024, 12:50 AM
kib committed rG8f19af4b0955: libc: make strerror_rl() usable for libc (authored by kib).
libc: make strerror_rl() usable for libc
Apr 30 2024, 12:50 AM
kib committed rG42b071cbc91e: pthread_sigqueue(3): document (authored by kib).
pthread_sigqueue(3): document
Apr 30 2024, 12:49 AM
kib committed rGe449481bee5f: libthr: add pthread_sigqueue(3) (authored by kib).
libthr: add pthread_sigqueue(3)
Apr 30 2024, 12:49 AM
kib committed rG3fbb97541cfe: sys/signal.h: move union sigval into dedicated private header sys/_sigval.h (authored by kib).
sys/signal.h: move union sigval into dedicated private header sys/_sigval.h
Apr 30 2024, 12:49 AM
kib committed rGafc8b17816e4: sigqueue(2): Document __SIGQUEUE_TID (authored by kib).
sigqueue(2): Document __SIGQUEUE_TID
Apr 30 2024, 12:49 AM
kib committed rGed9e2991c2da: sigqueue(2): add impl-specific flag __SIGQUEUE_TID (authored by kib).
sigqueue(2): add impl-specific flag __SIGQUEUE_TID
Apr 30 2024, 12:49 AM
kib committed rGde4b8c8ae1a8: kern_thr.c: normalize includes (authored by kib).
kern_thr.c: normalize includes
Apr 30 2024, 12:49 AM
kib committed rG29c4e3198456: kern_thr.c/kern_sig.c: remove sys/cdefs.h (authored by kib).
kern_thr.c/kern_sig.c: remove sys/cdefs.h
Apr 30 2024, 12:49 AM
kib committed rG6bf819c91048: kern_thread.c: remove unneeded include of sys/param.h (authored by kib).
kern_thread.c: remove unneeded include of sys/param.h
Apr 30 2024, 12:49 AM
kib accepted D45019: vm: Fix error handling in vm_thread_stack_back().
Apr 30 2024, 12:19 AM
kib added inline comments to D44988: rtld: add direct-exec option -o.
Apr 30 2024, 12:15 AM
kib added a comment to D44271: bsd.lib.mk: add targets to detect symbol changes.
In D44271#1025583, @kib wrote:

Private versioning namespace should be filtered out, I think.

I think we want to know when that set changes even if we don't consider it part of the ABI, but I probably could be persuaded otherwise. I might want to make it optional so libraries can opt in and others opt out.

Apr 30 2024, 12:09 AM

Apr 29 2024

kib accepted D44986: Fix new users of MAXPHYS and hide it from the kernel namespace.
Apr 29 2024, 11:54 PM
kib added a comment to D44910: sys: Add cpu_update_pcb hook.
In D44910#1026299, @jhb wrote:
In D44910#1024125, @kib wrote:

Could the purpose of the new cpu method expressed as "move CPU state to PCB/thread save location in preparation for ..."? I think a comment like that would be due.

Where would you want that comment to go? Next to its prototype in <sys/proc.h>?

Apr 29 2024, 10:50 PM
kib accepted D44986: Fix new users of MAXPHYS and hide it from the kernel namespace.
Apr 29 2024, 5:45 PM

Apr 28 2024

kib requested review of D44999: rtld direct exec: make -u behavior match the description.
Apr 28 2024, 9:02 PM
kib updated the diff for D44988: rtld: add direct-exec option -o.

Grammar updates.

Apr 28 2024, 8:01 PM
kib added inline comments to D44988: rtld: add direct-exec option -o.
Apr 28 2024, 8:01 PM
kib committed rG56ee5fc43c40: rtld snprintf: do not erronously skip a char at the buffer boundary (authored by kib).
rtld snprintf: do not erronously skip a char at the buffer boundary
Apr 28 2024, 7:44 PM
kib closed D44987: rtld snprintf: do not erronously skip a char at the buffer boundary.
Apr 28 2024, 7:44 PM
kib requested review of D44988: rtld: add direct-exec option -o.
Apr 28 2024, 6:55 AM
kib requested review of D44987: rtld snprintf: do not erronously skip a char at the buffer boundary.
Apr 28 2024, 6:54 AM
kib accepted D44986: Fix new users of MAXPHYS and hide it from the kernel namespace.
Apr 28 2024, 2:16 AM
kib added a comment to D44306: linuxkpi: Provide a non-NULL value for THIS_MODULE.
In D44306#1025639, @ashafer_badland.io wrote:

Do we have a good way to detect if we are building for a dynamic module or not during build? I looked for a macro that signaled that but couldn't find anything in kmod.mk.

Apr 28 2024, 2:14 AM

Apr 27 2024

kib accepted D44980: nfscl: Clear out a lot of cruft related to B_DIRECT that is never executed.
Apr 27 2024, 11:06 PM
kib added a comment to D44271: bsd.lib.mk: add targets to detect symbol changes.

Private versioning namespace should be filtered out, I think.

Apr 27 2024, 6:57 PM
kib accepted D32306: Import _FORTIFY_SOURCE implementation from NetBSD.
Apr 27 2024, 6:08 PM
kib added inline comments to D44980: nfscl: Clear out a lot of cruft related to B_DIRECT that is never executed.
Apr 27 2024, 5:59 PM
kib added a comment to D44306: linuxkpi: Provide a non-NULL value for THIS_MODULE.
In D44306#1025524, @ashafer_badland.io wrote:

It seems the way it works is that THIS_MODULE is a NULL pointer during "builtin" (statically building modules into the kernel), and points to the struct module of the dynamically loaded module otherwise. I think we could do something similar where we get the current linuxkpi behavior (THIS_MODULE is null) if we aren't building a dynamically loaded module?

With that concern resolved I guess the question now is do we want to:

a) have __this_module magically resolve to the current linker_file_t, implementing module_put as jhb suggested (no wrapper struct, close to what the current revision is)
b) have some linuxkpi macro declare a struct module global, validate usage at module load time (similar to the previous version I linked)
c) maybe have the module loader allocate space at load time, placing __this_module there and filling it with a wrapper struct? Not sure how possible this is.
d) something else?

Of the options I think (a) is the simplest, but (c) would probably be the most robust. I'm not expert but happy to implement whatever you all suggest.

Apr 27 2024, 5:55 PM
kib added a comment to D32306: Import _FORTIFY_SOURCE implementation from NetBSD.

Do we need to put SPD tags in the added files?

Apr 27 2024, 1:41 AM

Apr 25 2024

kib added a comment to D44306: linuxkpi: Provide a non-NULL value for THIS_MODULE.
In D44306#1023990, @ashafer_badland.io wrote:

Instead, it should be only resolved locally, causing undefined symbol error if attempt is made to reference it from kld without the module symbol (section ?).

Could you elaborate a little on what you mean by this?

There was an earlier version of this which used LKPI_DRIVER_MODULE to create a global variable for each lkpi module, do you mean something like that? It would be very easy to create the dummy struct module there.

https://github.com/freebsd/drm-kmod/pull/297

Apr 25 2024, 9:26 PM
kib added inline comments to D32306: Import _FORTIFY_SOURCE implementation from NetBSD.
Apr 25 2024, 7:15 PM
kib added inline comments to D32306: Import _FORTIFY_SOURCE implementation from NetBSD.
Apr 25 2024, 7:10 PM
kib added a comment to D32306: Import _FORTIFY_SOURCE implementation from NetBSD.

So overall this stuff is in principle incompatible with the code like memcmp(*a++, *b++, XXX) ?

Apr 25 2024, 7:00 PM

Apr 24 2024

kib committed rG6b0cf2a2379b: vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled (authored by kib).
vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled
Apr 24 2024, 7:44 PM
kib closed D44931: vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled.
Apr 24 2024, 7:44 PM
kib committed rG66df81021e54: sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c (authored by kib).
sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c
Apr 24 2024, 7:44 PM
kib accepted D44930: syscalls.master: correct return type of {read,write}v.
Apr 24 2024, 7:16 PM
kib requested review of D44931: vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled.
Apr 24 2024, 7:08 PM
kib accepted D44927: kthread: Set *tdptr earlier in kproc_kthread_add().
Apr 24 2024, 2:03 PM

Apr 23 2024

kib committed rGaa66995b4c80: libc printf_render_errno(): do not use strerror() (authored by kib).
libc printf_render_errno(): do not use strerror()
Apr 23 2024, 7:44 PM
kib committed rGbac9d7e8f293: libc: minor style, wrap long lines (authored by kib).
libc: minor style, wrap long lines
Apr 23 2024, 7:44 PM
kib committed rGf88766769463: __vprintf(): switch from strerror() to strerror_rl() (authored by kib).
__vprintf(): switch from strerror() to strerror_rl()
Apr 23 2024, 7:44 PM
kib committed rG92771bc00ad0: libc: make strerror_rl() usable for libc (authored by kib).
libc: make strerror_rl() usable for libc
Apr 23 2024, 7:44 PM
kib closed D44916: Stop using strerror() in printf*() guts.
Apr 23 2024, 7:44 PM
kib added a comment to D44910: sys: Add cpu_update_pcb hook.

Could the purpose of the new cpu method expressed as "move CPU state to PCB/thread save location in preparation for ..."? I think a comment like that would be due.

Apr 23 2024, 6:00 PM
kib requested review of D44916: Stop using strerror() in printf*() guts.
Apr 23 2024, 5:18 PM
kib committed rGfb2ab7ce52d3: Add test for pthread_sigqueue(3) (authored by kib).
Add test for pthread_sigqueue(3)
Apr 23 2024, 4:53 PM
kib committed rG91da6becae62: pthread_sigqueue(3): document (authored by kib).
pthread_sigqueue(3): document
Apr 23 2024, 4:53 PM
kib committed rG220aa0f45040: libthr: add pthread_sigqueue(3) (authored by kib).
libthr: add pthread_sigqueue(3)
Apr 23 2024, 4:53 PM
kib committed rG97acb35bd704: sys/signal.h: move union sigval into dedicated private header sys/_sigval.h (authored by kib).
sys/signal.h: move union sigval into dedicated private header sys/_sigval.h
Apr 23 2024, 4:53 PM
kib committed rGdcc180c51b9c: sigqueue(2): Document __SIGQUEUE_TID (authored by kib).
sigqueue(2): Document __SIGQUEUE_TID
Apr 23 2024, 4:53 PM
kib committed rG53186bc1435e: sigqueue(2): add impl-specific flag __SIGQUEUE_TID (authored by kib).
sigqueue(2): add impl-specific flag __SIGQUEUE_TID
Apr 23 2024, 4:53 PM