Page MenuHomeFreeBSD

kib (Konstantin Belousov)
User

Projects

User Details

User Since
May 16 2014, 7:35 PM (635 w, 2 d)

Recent Activity

Today

kib added inline comments to D58264: pdopenpid(2): do not steal exit status from the parent.
Mon, Jul 20, 5:20 AM
kib committed rGb328975b9d7c: procdesc: report NOTE_PDSIGCHLD for traced and stopped process (authored by kib).
procdesc: report NOTE_PDSIGCHLD for traced and stopped process
Mon, Jul 20, 2:01 AM
kib closed D58327: procdesc: report NOTE_PDSIGCHLD for traced/stopped process.
Mon, Jul 20, 2:01 AM

Yesterday

kib added a comment to D58094: Capsicumise truss(1).

This is still not intended for review, I just demonstrate the (IMO) full branch where the end is the ability to run truss in cap mode.
I am posting individual commits from the branch for review still.

Sun, Jul 19, 11:49 PM
kib updated the diff for D58094: Capsicumise truss(1).
Sun, Jul 19, 11:48 PM
kib committed rGe8d4d754e1c7: EVFILT_PROCDESC: support NOTE_FORK (authored by kib).
EVFILT_PROCDESC: support NOTE_FORK
Sun, Jul 19, 8:41 PM
kib committed rG3f88f6b89942: kqueue.2: document EVFILT_PROCDESC support for NOTE_FORK (authored by kib).
kqueue.2: document EVFILT_PROCDESC support for NOTE_FORK
Sun, Jul 19, 8:41 PM
kib closed D58292: EVFILT_PROCDESC: support NOTE_FORK.
Sun, Jul 19, 8:41 PM
kib accepted D58350: vfs_unmountall.9: Fix an outdated .Xr to boot(9).
Sun, Jul 19, 8:37 PM · Contributor Reviews (src), manpages, docs
kib accepted D58336: hwpstate_intel(4): use CPU_FOREACH instead of an IPI.
Sun, Jul 19, 8:35 PM
kib updated the diff for D58327: procdesc: report NOTE_PDSIGCHLD for traced/stopped process.

Update comment.

Sun, Jul 19, 6:53 PM
kib added inline comments to D58327: procdesc: report NOTE_PDSIGCHLD for traced/stopped process.
Sun, Jul 19, 6:52 PM
kib updated the diff for D58292: EVFILT_PROCDESC: support NOTE_FORK.

Edit comments and the man page update.

Sun, Jul 19, 6:50 PM
kib updated the diff for D58327: procdesc: report NOTE_PDSIGCHLD for traced/stopped process.

Use atomic to load p_flag.

Sun, Jul 19, 6:45 PM
kib added inline comments to D58327: procdesc: report NOTE_PDSIGCHLD for traced/stopped process.
Sun, Jul 19, 6:42 PM
kib updated the diff for D58315: ptrace(2): add PT_GET_CHILDREN.

Fix PTCHLD_TRACED_BY_ME.
Check uap->data < 0.
Use more correct type for rsrv[] to avoid compat32 conversions.
Man page editing.

Sun, Jul 19, 6:36 PM
kib added a comment to D58315: ptrace(2): add PT_GET_CHILDREN.

Why not implement this with procctl()? That seems more natural to me.

Sun, Jul 19, 6:34 PM
kib added a comment to D58322: exterror tests: harden the checks.

please re-upload the patch with the full context.

Sun, Jul 19, 4:58 PM
kib updated the diff for D58315: ptrace(2): add PT_GET_CHILDREN.

Add PTCHLD_TRACED_BY_ME.
Add space for future ABI expansion.

Sun, Jul 19, 4:53 PM
kib added a comment to D58321: exterror: advertise error strings via kern.features.exterr_strings.

Please upload patches with the full context.

Sun, Jul 19, 3:46 PM
kib accepted D58336: hwpstate_intel(4): use CPU_FOREACH instead of an IPI.
Sun, Jul 19, 3:40 PM
kib accepted D58335: i386: provide PCPU pc_small_core for amd64 compat.
Sun, Jul 19, 3:40 PM
kib closed D58334: kern_ptrace(): reduce code duplication.
Sun, Jul 19, 2:49 PM
kib committed rG9b21a5249575: kern_ptrace(): reduce code duplication (authored by kib).
kern_ptrace(): reduce code duplication
Sun, Jul 19, 2:49 PM
kib added inline comments to D58336: hwpstate_intel(4): use CPU_FOREACH instead of an IPI.
Sun, Jul 19, 2:47 PM
kib requested review of D58334: kern_ptrace(): reduce code duplication.
Sun, Jul 19, 1:16 AM
kib accepted D58332: i386: supply thermal interrupt handler.
Sun, Jul 19, 12:50 AM

Sat, Jul 18

kib requested review of D58331: wait6(): fix reporting of orphan exits.
Sat, Jul 18, 9:58 PM
kib added a comment to D58321: exterror: advertise error strings via kern.features.exterr_strings.

So you disagree with kern.features.exterror.
Do you also disagree with kern.features.exterr_strings which covers the optional behavior of verbose exterror and is useful in unit tests to differentiate between "fails because something is wrong -> error" and "fails because it does not exist -> intendet -> ok".

Sat, Jul 18, 6:14 PM
kib requested review of D58327: procdesc: report NOTE_PDSIGCHLD for traced/stopped process.
Sat, Jul 18, 5:35 PM
kib committed rG2038232e3e40: thread_stopped(): style (authored by kib).
thread_stopped(): style
Sat, Jul 18, 4:54 PM
kib added a comment to D58191: lookup: do not return vp_crossmp as dvp for mount over the reg file.
In D58191#1337590, @pho wrote:

I ran all of the stress2 tests without seeing any issues.

Sat, Jul 18, 2:52 PM
kib added a comment to D58238: uexterr_gettext(3): support dynamic kernel categories.

This adds two syscalls to each dynamic syscall failure path. I understand that calling the sysctl is the easiest way to handle dynamically loaded modules. But I already got some negative comments due to exterrors adding some nanoseconds to the failing syscalls timings.
Although I do not object in principle, can we have some smarter way to avoid the sysctl if we already queried the specific module? E.g. we can make each module to register 'range' for dynamic errors' pathes, and memoize the range with the values in libc.
This is esp. sorrow because the display of the source line is really a niche feature.

Sat, Jul 18, 2:07 PM
kib added inline comments to D58059: runtime: add uexterr_set(3) to set errors in userspace.
Sat, Jul 18, 1:46 PM
kib accepted D58059: runtime: add uexterr_set(3) to set errors in userspace.
Sat, Jul 18, 1:45 PM
kib added inline comments to D58236: exterr: split category into multiple sources.
Sat, Jul 18, 1:41 PM
kib added a comment to D58178: vfs: handle file mounts in vn_fullpath_hardlink().

Could somebody provide an isolated test for the situation where the patch is needed?

Sat, Jul 18, 1:39 PM
kib added inline comments to D58058: exterr: relax format restrictions.
Sat, Jul 18, 1:35 PM
kib added a comment to D58321: exterror: advertise error strings via kern.features.exterr_strings.

As I said it elsewhere, there is no point in kern.features.exterror. You cannot run 15 userspace on <= 14 kernel.

Sat, Jul 18, 1:32 PM
kib committed rG672345cd24e1: tmpfs: implement AT_RENAME_EXCHANGE (authored by kib).
tmpfs: implement AT_RENAME_EXCHANGE
Sat, Jul 18, 12:29 AM
kib committed rGfeb4c9d089bf: tmpfs: extract tmpfs_rename_check/set_parent() from tmpfs_rename() (authored by kib).
tmpfs: extract tmpfs_rename_check/set_parent() from tmpfs_rename()
Sat, Jul 18, 12:29 AM
kib committed rG5dc55cc4591e: tmpfs_rename(): style (authored by kib).
tmpfs_rename(): style
Sat, Jul 18, 12:28 AM
kib committed rG090fff7c6e88: rename.2: Document AT_RENAME_EXCHANGE (authored by kib).
rename.2: Document AT_RENAME_EXCHANGE
Sat, Jul 18, 12:28 AM
kib committed rGe0fe82303f0d: renameat(2): add AT_RENAME_EXCHANGE flag (authored by kib).
renameat(2): add AT_RENAME_EXCHANGE flag
Sat, Jul 18, 12:28 AM

Fri, Jul 17

kib accepted D58317: unix: Preserve FD_RESOLVE_BENEATH when passing an fd.
Fri, Jul 17, 11:01 PM
kib updated the diff for D58264: pdopenpid(2): do not steal exit status from the parent.

Restore P2_ZOMBIEREF_PARENT when reparenting to reaper, to allow reaper do it deeds.

Fri, Jul 17, 9:25 PM
kib added inline comments to D58264: pdopenpid(2): do not steal exit status from the parent.
Fri, Jul 17, 9:24 PM
kib updated the diff for D58292: EVFILT_PROCDESC: support NOTE_FORK.

Add comment for the placement of NOTE_FORK activation.
Edit the man page.

Fri, Jul 17, 8:50 PM
kib added a comment to D58292: EVFILT_PROCDESC: support NOTE_FORK.
In D58292#1337327, @kib wrote:

Report NOTE_FORK for procdesc after the child is attached to the debugger.

I suggest adding a test for this, or at least a comment explaining why it is important.

Fri, Jul 17, 8:48 PM
kib requested review of D58315: ptrace(2): add PT_GET_CHILDREN.
Fri, Jul 17, 8:14 PM
kib updated the diff for D58264: pdopenpid(2): do not steal exit status from the parent.

Fix inverted assertion.

Fri, Jul 17, 8:03 PM
kib updated the diff for D58292: EVFILT_PROCDESC: support NOTE_FORK.

Report NOTE_FORK for procdesc after the child is attached to the debugger.

Fri, Jul 17, 8:02 PM
kib added a comment to D58302: kern: Bump static assert for i386.
In D58302#1337163, @kib wrote:

Could f6ee1d20d36813e990691 fixed your issue?

Anyway, the useful tool is gdb' pinfo /o type.

It should be the correct reason. Thanks! I don't have ia32 machine so I planned to check the dwarf info.

Fri, Jul 17, 4:04 PM
kib added a comment to D58302: kern: Bump static assert for i386.

Could f6ee1d20d36813e990691 fixed your issue?

Fri, Jul 17, 3:35 PM
kib added a comment to D58302: kern: Bump static assert for i386.

Why? p_asig and p_tree_refcount are at the end of the struct proc.

Fri, Jul 17, 3:23 PM
kib added inline comments to D58292: EVFILT_PROCDESC: support NOTE_FORK.
Fri, Jul 17, 2:11 PM
kib updated the diff for D58264: pdopenpid(2): do not steal exit status from the parent.

Upload the right patch

Fri, Jul 17, 2:06 PM
kib updated the diff for D58264: pdopenpid(2): do not steal exit status from the parent.

The current commit from the topic branch.

Fri, Jul 17, 2:03 PM
kib added a comment to D58264: pdopenpid(2): do not steal exit status from the parent.
In D58264#1336261, @kib wrote:

Note that the patch breaks existing tests, but IMO the current behavior is not logical. For instance, when I truss -f /bin/sh using process descriptors, shell is missing the zombie exit status. In other words, pdopenpid() breaks correct code.

Maybe pdwait() shouldn't let you reap a zombie that isn't your child?

Fri, Jul 17, 2:02 PM
kib updated the diff for D58292: EVFILT_PROCDESC: support NOTE_FORK.

Update the man page with the review comments.

Fri, Jul 17, 1:57 PM
kib added inline comments to D58292: EVFILT_PROCDESC: support NOTE_FORK.
Fri, Jul 17, 1:57 PM
kib accepted D58298: LinuxKPI: page.h: use atop() and ptoa() instead of PAGE_SHIFT.

For the discussion, I am still somewhat surprised that so much of the FreeBSD symbols are leaked into linuxkpi headers, Most amusing and dangerous is PAGE_MASK (AFAIR).

Fri, Jul 17, 1:47 PM
kib requested review of D58292: EVFILT_PROCDESC: support NOTE_FORK.
Fri, Jul 17, 5:41 AM
kib added a comment to D58056: exterr: allow exterr to fit pointers on CHERI targets.
In D58056#1336833, @kib wrote:

This change broke the build on armv7 (32-bit ARM). I addressed the definition/declaration mismatch in rG5cafd6213f14.

This is the supposed fix, I am waiting for tinderbox to finish.

diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index c867867f2618..c16e806e0bd7 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -2353,8 +2353,8 @@ kern_exterrctl(struct thread *td, u_int op, u_int flags, void *ptr)
 }
 
 int
-exterr_set(int eerror, int category, const char *mmsg, uintptr_t pp1,
-    uintptr_t pp2, int line)
+exterr_set(int eerror, int category, const char *mmsg, uint64ptr_t pp1,
+    uint64ptr_t pp2, int line)
 {
   struct thread *td;
 

I *just* committed that 😅...

Fri, Jul 17, 2:52 AM
kib added a comment to D58056: exterr: allow exterr to fit pointers on CHERI targets.

This change broke the build on armv7 (32-bit ARM). I addressed the definition/declaration mismatch in rG5cafd6213f14.

Fri, Jul 17, 2:39 AM
kib committed rGf5f296477da5: kern_execve.c: simplify execve_block_wait() (authored by kib).
kern_execve.c: simplify execve_block_wait()
Fri, Jul 17, 1:36 AM

Thu, Jul 16

kib committed rGf967dd04c880: ptrace.2: Document PT_SET_SC_RET (authored by kib).
ptrace.2: Document PT_SET_SC_RET
Thu, Jul 16, 10:42 PM
kib committed rGfd5faa5629ae: ptrace(2): PT_SET_SC_RET request (authored by kib).
ptrace(2): PT_SET_SC_RET request
Thu, Jul 16, 10:42 PM
kib closed D58247: ptrace(2): PT_SET_SC_RET request.
Thu, Jul 16, 10:42 PM
kib added inline comments to D58247: ptrace(2): PT_SET_SC_RET request.
Thu, Jul 16, 3:51 PM
kib accepted D58283: vm_phys: Add a sysctl to dump registered fictitious memory ranges.
Thu, Jul 16, 3:45 PM
kib committed rGa2f50c4b32d1: amd64 efirt: register all runtime regions as fictitious (authored by kib).
amd64 efirt: register all runtime regions as fictitious
Thu, Jul 16, 3:33 PM
kib closed D58274: amd64 efirt: register all runtime regions as fictitious.
Thu, Jul 16, 3:33 PM
kib accepted D58283: vm_phys: Add a sysctl to dump registered fictitious memory ranges.
Thu, Jul 16, 3:32 PM
kib accepted D58263: ifconfig: Improve CMIS parsing of breakout configs.
Thu, Jul 16, 2:44 PM
kib accepted D58261: vm_page: Fix dequeue on arches with weak ordering.
Thu, Jul 16, 2:43 PM
kib added inline comments to D58283: vm_phys: Add a sysctl to dump registered fictitious memory ranges.
Thu, Jul 16, 2:32 PM
kib added inline comments to D58274: amd64 efirt: register all runtime regions as fictitious.
Thu, Jul 16, 2:29 PM
kib updated the summary of D58274: amd64 efirt: register all runtime regions as fictitious.
Thu, Jul 16, 12:54 PM
kib committed rGe18844223d1e: fget_procdesc(): change error for non-procdesc type from EBADF to EINVAL (authored by kib).
fget_procdesc(): change error for non-procdesc type from EBADF to EINVAL
Thu, Jul 16, 7:55 AM
kib requested review of D58274: amd64 efirt: register all runtime regions as fictitious.
Thu, Jul 16, 6:52 AM

Wed, Jul 15

kib updated the diff for D58247: ptrace(2): PT_SET_SC_RET request.

Validate uap->data to be the size of the structure.
Edit man page.

Wed, Jul 15, 9:58 PM
kib added inline comments to D58247: ptrace(2): PT_SET_SC_RET request.
Wed, Jul 15, 9:57 PM
kib updated the diff for D58247: ptrace(2): PT_SET_SC_RET request.

Style

Wed, Jul 15, 9:04 PM
kib committed rGfed49793ddd1: kern/sys_process.c: remove extra () (authored by kib).
kern/sys_process.c: remove extra ()
Wed, Jul 15, 9:03 PM
kib added inline comments to D58247: ptrace(2): PT_SET_SC_RET request.
Wed, Jul 15, 8:56 PM
kib added inline comments to D58264: pdopenpid(2): do not steal exit status from the parent.
Wed, Jul 15, 7:27 PM
kib added a comment to D58264: pdopenpid(2): do not steal exit status from the parent.

Note that the patch breaks existing tests, but IMO the current behavior is not logical. For instance, when I truss -f /bin/sh using process descriptors, shell is missing the zombie exit status. In other words, pdopenpid() breaks correct code.

Wed, Jul 15, 7:21 PM
kib added reviewers for D58264: pdopenpid(2): do not steal exit status from the parent: markj, kevans.
Wed, Jul 15, 7:20 PM
kib updated the diff for D58264: pdopenpid(2): do not steal exit status from the parent.

Real latest diff.

Wed, Jul 15, 7:19 PM
kib requested review of D58264: pdopenpid(2): do not steal exit status from the parent.
Wed, Jul 15, 7:12 PM
kib committed rGa48a27532567: sys/proc.h: remove spurious blank lines (authored by kib).
sys/proc.h: remove spurious blank lines
Wed, Jul 15, 7:05 PM
kib committed rG1f5fe8ad5293: kern: change several int types to bools (authored by kib).
kern: change several int types to bools
Wed, Jul 15, 7:04 PM
kib added a reviewer for D58263: ifconfig: Improve CMIS parsing of breakout configs: slavash.
Wed, Jul 15, 6:06 PM
kib updated the diff for D58247: ptrace(2): PT_SET_SC_RET request.

Document PT_SET_SC_RET

Wed, Jul 15, 1:45 PM
kib committed rG00e880819cc5: libc locale/localeconv.c: use release semantic when clearing locale_changed (authored by kib).
libc locale/localeconv.c: use release semantic when clearing locale_changed
Wed, Jul 15, 1:37 PM
kib accepted D58244: stand: Recognize SHT_INIT_ARRAY sections as constructor sections.
Wed, Jul 15, 1:35 PM
kib accepted D58245: linker: Recognize SHT_INIT_ARRAY sections as constructor sections.
Wed, Jul 15, 1:35 PM
kib requested review of D58247: ptrace(2): PT_SET_SC_RET request.
Wed, Jul 15, 2:24 AM

Tue, Jul 14

kib committed rG40cc9de950f7: mlx5ib: use the eventfd_ctx API for DEVX event subscriptions (authored by aehrenberg_nvidia.com).
mlx5ib: use the eventfd_ctx API for DEVX event subscriptions
Tue, Jul 14, 7:27 PM