Page MenuHomeFreeBSD
Feed Search

Today

kib updated the diff for D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).

Add tests

Thu, Oct 29, 6:01 PM
kib committed rGed059dbfe2ef: rtld: free heap donelists abandoned by the lookup restart.
Thu, Oct 29, 3:56 PM
kib committed rG87a7419c6375: rtld: add lockstate_rlocked().
Thu, Oct 29, 3:56 PM
kib committed rG500924a6b16d: rtld: add RtldLockState initializer.
Thu, Oct 29, 3:56 PM
kib committed rG53cbd14ea7ca: rtld: extract donelist heap allocation into donelist_alloc().
Thu, Oct 29, 3:56 PM
kib committed rG2fd12bf2dd9c: amd64 resumectx(): restore FRED state before loading %cr4.
Thu, Oct 29, 8:49 AM
kib committed rG8671e823b767: amd64: do not pass SYSENTER frame to FRED fast syscall handler.
Thu, Oct 29, 8:49 AM
kib committed rG175595ba6c52: dl_iterate_phdr(3): do not return garbage for objects not using TLS.
Thu, Oct 29, 8:49 AM
kib committed rG7787316e1957: sys: centralize SV_* flags definitions for ELF Linux ABIs.
Thu, Oct 29, 8:45 AM
kib committed rGcf4ff7bd369e: amd64 FRED: fix dtrace fbt.
Thu, Oct 29, 8:44 AM
kib committed rG32b9c967e07c: amd64 FRED: handle INT 3, INT 4, and INT 0x92 same as for IDT.
Thu, Oct 29, 8:44 AM
kib committed rGbf074ee97407: amd64 FRED: fix handling of ATPIC IRQ range when no atpic is configured.
Thu, Oct 29, 8:44 AM
kib committed rG7f49a62e3c5f: amd64: add helpers to set up thread state on trap.
Thu, Oct 29, 8:44 AM
kib committed rG0213bd5e5639: amd64 FRED: re-wrap the comment.
Thu, Oct 29, 8:44 AM
kib committed rG6105e8589b2c: amd64 FRED: explain why %rax is saved early.
Thu, Oct 29, 8:44 AM
kib committed rG78962f9b66d1: amd64 FRED: normalize the user-provided 'fred' knob value.
Thu, Oct 29, 8:44 AM
kib committed rG0cfbb34a12e5: amd64 FRED: add missed newline in the diagnostic.
Thu, Oct 29, 8:44 AM
kib committed rG6ca697360b53: amd64 FRED: no need to store fs/gsbase on user_fred_not_syscall path.
Thu, Oct 29, 8:44 AM
kib committed rG837bb27c93a5: amd64 FRED: clear %dr6 on #DB from kernel.
Thu, Oct 29, 8:44 AM
kib committed rG1c25a7f1cb29: amd64 FRED: mark trap frame as initialized for KASAN/KMSAN.
Thu, Oct 29, 8:44 AM
kib committed rGdcc5adb27e3b: amd64: strictly enforce the caller's mode for FRED 64bit syscall handler in C.
Thu, Oct 29, 8:43 AM
kib committed rG5bc997b6f5b1: amd64: do not allow to set IOPL to 3 when FRED is used.
Thu, Oct 29, 8:43 AM
kib committed rG4ab9e73994e6: libthr/thr_mutex.c: make mutex asserts more useful.
Thu, Oct 29, 8:43 AM
kib committed rG473cd1bba9b4: amd64: fixes for register handling of syscall entry for FRED.
Thu, Oct 29, 8:43 AM
kib committed rG73b3fb41e67a: amd64: Make the SYSENTER and INTn action same as for IDT case..
Thu, Oct 29, 8:43 AM
kib committed rG787e2e411d2a: amd64_cpu_init_fred(): set stack level for NMI and not #NM.
Thu, Oct 29, 8:43 AM
kib committed rGe86a612d77ab: trap_fred_handle_k_exc(): handle #AC in kernel.
Thu, Oct 29, 8:43 AM
kib committed rG91d8163803b4: rtld: fix leak in get_program_var_addr() on the error path.
Thu, Oct 29, 8:43 AM
kib committed rGe2979f4cbbf6: rtld: some cosmetics in donelist_init().
Thu, Oct 29, 8:43 AM
kib committed rG9a8d5af1ba01: linux: correct errors from mremap(2) (authored by amutu_amutu.com).
Thu, Oct 29, 8:43 AM
kib committed rGa3d1d4e88ae7: arm64 linux: Allow FUTEX_REQUEUE on arm64 by setting the brand flag (authored by amutu_amutu.com).
Thu, Oct 29, 8:43 AM
kib committed rGdc1514eda55c: x86: make machine/sysarch.h usable from assembler.
Thu, Oct 29, 8:43 AM
kib committed rGcf63e3f3cd8e: pdfork.2: improve markup.
Thu, Oct 29, 8:42 AM
kib committed rGfb97b4f1e3a5: termios.4: clarify the behavior on the last close of controlling terminal (authored by vova_fbsd.ru).
Thu, Oct 29, 8:40 AM
kib committed rG9dcc20504c8b: devfs: make persistent controlling terminal an ABI property (authored by vova_fbsd.ru).
Thu, Oct 29, 8:40 AM
kib committed rGc1bc47341008: pdfork.2: improve markup.
Thu, Oct 29, 8:40 AM
kib committed rGe29de8c40b7e: sys: centralize SV_* flags definitions for several FreeBSD ABIs.
Thu, Oct 29, 8:40 AM
kib committed rG15f2dc698aa7: sys/sysent.h: align SV_* flags values, provide full 32bit.
Thu, Oct 29, 8:40 AM
kib committed rG16f4a87a50ca: mlx5: support DevX UMEM page size bitmap (authored by aehrenberg_nvidia.com).
Thu, Oct 29, 8:40 AM
kib committed rGa401023a0263: linux: preserve epoll descriptors across fork using KQUEUE_CPONFORK (authored by vova_fbsd.ru).
Thu, Oct 29, 8:40 AM
kib committed rG41435c768d63: pty: preserve O_NONBLOCK when opening /dev/ptmx (authored by vova_fbsd.ru).
Thu, Oct 29, 8:40 AM
kib committed rGc3f6fef402d7: sysarch.x86.2: manual page for the sysarch(2) functions on x86.
Thu, Oct 29, 8:40 AM
kib committed rG4a6f371902a9: machine/floatingpoing.h: harmonize all arches.
Thu, Oct 29, 8:40 AM

Thu, Oct 22

kib added inline comments to D60894: pf: optimize state key comparison on amd4.
Thu, Oct 22, 6:54 AM
kib accepted D60958: libthr: Deduplicate some rwlock code.
Thu, Oct 22, 5:31 AM
kib added a comment to D60959: libthr: Return EDEADLK if it is held by ourself.

Why did you left trywrlock() out of this change? POSIX allows both wrlock() and trywrlock() to return EDEADLK, and our man page notes the error for both functions. So if making one return the error, I do not see why not making another to behave identically.

Thu, Oct 22, 5:16 AM
kib updated the diff for D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).

Lock curthread for name.
Rename to pthread_query_all_np().
Man page editing.

Thu, Oct 22, 12:37 AM

Wed, Oct 21

kib updated the diff for D60035: chaltroot(2).

Disallow altroot use for RBENEATH lookups.
Clear altroot on cap_enter().
Hardening of cap_enter().

Wed, Oct 21, 11:49 PM
kib added a comment to D60035: chaltroot(2).

I would really like to see tests which specifically exercise handling of the altroot across execution of setuid executables, and jail_attach(). We should also make sure that if a process sets an altroot and enters capability mode, that the altroot doesn't enable lookups that would otherwise be disallowed. In other words, if a process in capability mode does a dirfd-relative lookup and the lookup fails with ENOENT, then the fallback lookup must not succeed. Same for O_RESOLVE_BENEATH lookups. Right now it appears that we retry failed dirfd-relative lookups unnecessarily?

Wed, Oct 21, 11:48 PM
kib added a comment to D60832: libthr: Robust tryjoin test.
In D60832#1397040, @kib wrote:
In D60832#1395914, @kib wrote:
In D60832#1395064, @kib wrote:

You could query the kernel to see the state of the thread using kinfo_proc().

Somewhat curiously, I thought about adding an API to query the list of the threads for the current process.

Yes, but it is a test for pthread_tryjoin_np so :).

I do not understand what do you intended to say by this sentence.

I mean this robustness change is needed as we are testing pthread_tryjoin_np, which should not query status by using kinfo_proc.

I still do not understand why should it not. Using kinfo would make the test more precise IMO, But I do not intend to block this change.

I also do not really understand. It seems fine to use kinfo. See tests/sys/kern/procdesc.c:wait_for_naptime() for an example. It is just an alternative method to avoid polling while you are waiting for thr_fun() to wake up.

Wouldn't wait_for_naptime still poll on something?

Wed, Oct 21, 11:17 PM
kib accepted D60935: vm_kern: wrap around in kmem_back() when the last domain is empty.
Wed, Oct 21, 9:27 PM
kib accepted D60937: link_elf_obj: bounds-check a relocation section's sh_info.

This is fine but also it means that the object is corrupted. We do not perform exhaustive checks for the ELF consistency in kernel, generally.

Wed, Oct 21, 8:47 PM

Tue, Oct 20

kib added reviewers for D60791: vm: Run the getpages completion on every requested page: alc, markj.
Tue, Oct 20, 9:09 PM
kib added a comment to D60791: vm: Run the getpages completion on every requested page.

I only asked about one chunk from three. I still think that the other two chunks are good.

Tue, Oct 20, 9:09 PM
kib committed rG8dfa23d81f5e: sys: centralize SV_* flags definitions for ELF Linux ABIs.
Tue, Oct 20, 8:56 PM
kib committed rGf69d974bf6d2: sys: centralize SV_* flags definitions for several FreeBSD ABIs.
Tue, Oct 20, 8:56 PM
kib committed rGdca0b0ad8bc7: sys/sysent.h: align SV_* flags values, provide full 32bit.
Tue, Oct 20, 8:56 PM
kib committed rG40582412d3fc: x86/mp_x86.c: unbreak COUNT_IPIS.
Tue, Oct 20, 8:56 PM
kib added inline comments to D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).
Tue, Oct 20, 7:09 PM
kib accepted D60832: libthr: Robust tryjoin test.
In D60832#1395914, @kib wrote:
In D60832#1395064, @kib wrote:

You could query the kernel to see the state of the thread using kinfo_proc().

Somewhat curiously, I thought about adding an API to query the list of the threads for the current process.

Yes, but it is a test for pthread_tryjoin_np so :).

I do not understand what do you intended to say by this sentence.

I mean this robustness change is needed as we are testing pthread_tryjoin_np, which should not query status by using kinfo_proc.

Tue, Oct 20, 7:05 PM
kib committed rGe8923c7346a8: devfs: make persistent controlling terminal an ABI property (authored by vova_fbsd.ru).
Tue, Oct 20, 5:41 PM
kib committed rG44961edac855: termios.4: clarify the behavior on the last close of controlling terminal (authored by vova_fbsd.ru).
Tue, Oct 20, 5:41 PM
kib closed D60701: devfs: Keep a Linux controlling tty across the last slave close.
Tue, Oct 20, 5:40 PM
kib updated the diff for D60035: chaltroot(2).

Fix chroot(8) -A.
Lots of nits fixed found with the automatic review.

Tue, Oct 20, 5:29 PM
kib updated the diff for D59883: linuxkpi: lkpi_vmf_insert_special_pte_locked().

Hopefully better comments, passed though some automatic checker.

Tue, Oct 20, 2:11 AM
kib updated the diff for D59883: linuxkpi: lkpi_vmf_insert_special_pte_locked().

Free allocated fake pages.
Add some comments explaining the intent.
Avoid going through the vm_page_array[] at all, the page physical address is all that is needed for a fake page construction.

Tue, Oct 20, 1:14 AM

Mon, Oct 19

kib updated the diff for D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).

Add copyright statement to the man page.

Mon, Oct 19, 11:16 PM
kib updated the diff for D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).

Rework API.
Add man page.
Fix pre-existing race also affecting the patch.

Mon, Oct 19, 11:12 PM
kib added a comment to D60832: libthr: Robust tryjoin test.
In D60832#1395064, @kib wrote:

You could query the kernel to see the state of the thread using kinfo_proc().

Somewhat curiously, I thought about adding an API to query the list of the threads for the current process.

Yes, but it is a test for pthread_tryjoin_np so :).

Mon, Oct 19, 6:34 PM
kib accepted D60861: x86: ipi_bitmap_handler(): Preempt last, reduce critical section.
Mon, Oct 19, 6:28 PM
kib accepted D60862: x86: ipi_bitmap_handler(): Account for IPIs correctly on COUNT_IPIS.
Mon, Oct 19, 5:16 PM
kib updated the diff for D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).

Zero reserved fields of the info structure.

Mon, Oct 19, 8:57 AM
kib added inline comments to D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).
Mon, Oct 19, 8:56 AM

Sun, Oct 18

kib updated the diff for D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).

Do not expose internal pointer to the thread name.

Sun, Oct 18, 11:53 AM
kib added a comment to D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).

Man page and test will be done after discussion.

Sun, Oct 18, 11:27 AM
kib added a comment to D60832: libthr: Robust tryjoin test.
In D60832#1395064, @kib wrote:

Somewhat curiously, I thought about adding an API to query the list of the threads for the current process.

Sun, Oct 18, 11:26 AM
kib requested review of D60838: libthr: pthread_query_np(3) and pthread_query_all_np(3).
Sun, Oct 18, 11:25 AM
kib added a comment to D60832: libthr: Robust tryjoin test.

You could query the kernel to see the state of the thread using kinfo_proc().

Sun, Oct 18, 9:02 AM
kib accepted D60717: libthr: drop use of try_gc in the end of thr_join.
Sun, Oct 18, 6:48 AM

Sat, Oct 17

kib added inline comments to D60668: sys: Use armv7 instead of i386 for 32-bit KBI assertions.
Sat, Oct 17, 11:37 PM
kib accepted D58855: namei: retry absolute symlink expansions from the native root.
Sat, Oct 17, 8:27 PM
kib added inline comments to D60807: bxe: Use __SIZEOF_LONG__ to compute BITS_PER_LONG.
Sat, Oct 17, 6:23 PM
kib accepted D60809: x86 lapic: Assume amd64 values when setting IDT entries.
Sat, Oct 17, 6:19 PM
kib accepted D60808: amd64: Close gap between the TLB shootdown and bitmap IPIs.
Sat, Oct 17, 6:18 PM
kib accepted D60806: padlock: Remove architecture #ifdefs.
Sat, Oct 17, 6:17 PM
kib added inline comments to D60791: vm: Run the getpages completion on every requested page.
Sat, Oct 17, 1:11 AM
kib committed rGafea1a2429bf: rtld: release rtld_bind_lock around calls to .preinit_array initializers.
Sat, Oct 17, 12:27 AM

Fri, Oct 16

kib committed rGbdcfeac3e1cb: sysarch.x86.2: manual page for the sysarch(2) functions on x86.
Fri, Oct 16, 11:18 PM
kib closed D60047: sysarch.x86.2: manual page for the sysarch(2) functions on x86.
Fri, Oct 16, 11:17 PM
kib committed rGb3836322a1e6: linux: preserve epoll descriptors across fork using KQUEUE_CPONFORK (authored by vova_fbsd.ru).
Fri, Oct 16, 8:16 PM
kib closed D60783: linux: preserve epoll descriptors across fork using KQUEUE_CPONFORK.
Fri, Oct 16, 8:16 PM
kib added inline comments to D60751: vm_fault.c: Introduce 'vm_fault_wire'.
Fri, Oct 16, 8:07 PM
kib accepted D60750: vm_reserv.c: Introduce 'vm_reserv_pindex_aligned'.
Fri, Oct 16, 7:55 PM
kib accepted D60783: linux: preserve epoll descriptors across fork using KQUEUE_CPONFORK.
Fri, Oct 16, 7:39 PM
kib accepted D60701: devfs: Keep a Linux controlling tty across the last slave close.
Fri, Oct 16, 5:14 PM
kib accepted D60782: inotify: Open target the directory when adding a watch.
Fri, Oct 16, 5:13 PM
kib closed D60255: machine/floatingpoing.h: harmonize all arches.
Fri, Oct 16, 4:28 PM
kib committed rG43c79c64af48: machine/floatingpoing.h: harmonize all arches.
Fri, Oct 16, 4:28 PM
kib added a comment to D60701: devfs: Keep a Linux controlling tty across the last slave close.

I believe this is fine as the code change. The termios(4) man page would benefit from some clarification of this sentence:

A process does not relinquish its
controlling terminal simply by closing all of its file descriptors
associated with the controlling terminal if other processes continue to
have it open.
Fri, Oct 16, 4:23 PM
kib added inline comments to D60701: devfs: Keep a Linux controlling tty across the last slave close.
Fri, Oct 16, 2:41 PM