Page MenuHomeFreeBSD

kib (Konstantin Belousov)
User

Projects

User Details

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

Recent Activity

Today

kib requested review of D58393: getpgrp(2), getsid(2): allow to call on zombies.
Wed, Jul 22, 9:51 AM
kib added a comment to D58314: pwait: Optionally wait until process is reaped.
In D58314#1339356, @kib wrote:

This obviously changes the semantic of the pwait(1) tool. Before, it returned control after the process exited. Now, it additionally wait until a reaper makes the wait*() call.

But what does "exited" really mean in this context?

Wed, Jul 22, 1:49 AM
kib added a comment to D58314: pwait: Optionally wait until process is reaped.

This obviously changes the semantic of the pwait(1) tool. Before, it returned control after the process exited. Now, it additionally wait until a reaper makes the wait*() call.

Wed, Jul 22, 1:22 AM
kib accepted D58386: pwait: Add a SIGINFO handler.
Wed, Jul 22, 1:18 AM
kib added a comment to D58264: processes: add zombie references, each of them prevents reap.
In D58264#1339297, @kib wrote:

proc_to_reap(orphan) can reap.

I promised to look at the tests if there is an agreement on the idea of this change. I know that there is some breakage.

Some summary of 1) current semantics 2) proposed semantics would be useful. The review description is not very clear.

As I understand it, 2) is:

  • only the parent can reap the child, by calling wait() or pdwait(),
  • any procdescs which refer to the child will prevent the child PID from being recycled,
  • anybody may use pdwait() to fetch the status of the child, but only the parent can consume the status.
Wed, Jul 22, 12:00 AM

Yesterday

kib updated the diff for D58264: processes: add zombie references, each of them prevents reap.

proc_to_reap(orphan) can reap.

Tue, Jul 21, 11:13 PM
kib added a comment to D58264: processes: add zombie references, each of them prevents reap.

Did you run the ptrace tests? Several fail, and then I see a panic

panic: reaped an orphan (pid 0)
cpuid = 13
time = 1784674501
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0xa5/frame 0xfffffe00f1a525b0
kdb_backtrace() at kdb_backtrace+0xc6/frame 0xfffffe00f1a52710
vpanic() at vpanic+0x214/frame 0xfffffe00f1a528b0
panic() at panic+0xb5/frame 0xfffffe00f1a52980
kern_wait6() at kern_wait6+0x57c/frame 0xfffffe00f1a52a10
sys_wait4() at sys_wait4+0x18e/frame 0xfffffe00f1a52d10
amd64_syscall() at amd64_syscall+0x3d8/frame 0xfffffe00f1a52f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00f1a52f30
--- syscall (7, FreeBSD ELF64, wait4), rip = 0x3ce8fd7e46ea, rsp = 0x3ce8f93b2d78, rbp = 0x3ce8f93b2db0 ---
Tue, Jul 21, 11:09 PM
kib accepted D58388: libsysdecode: Recognize NOTE_PDSIGCHLD.
Tue, Jul 21, 9:55 PM
kib accepted D58383: loader: Allocate trampoline as EfiLoaderCode, not Data.
Tue, Jul 21, 9:01 PM
kib added inline comments to D58383: loader: Allocate trampoline as EfiLoaderCode, not Data.
Tue, Jul 21, 8:15 PM
kib updated the diff for D58264: processes: add zombie references, each of them prevents reap.

Rename PZOMBIEREF_ORPHAN to PZOMBIEREF_REALPARENT.
Move an assert into proc_realparent().
Correct the condition to reparent on the last procdesc close.
Start modifying the man pages.

Tue, Jul 21, 8:13 PM
kib added inline comments to D58264: processes: add zombie references, each of them prevents reap.
Tue, Jul 21, 8:12 PM
kib updated the diff for D58264: processes: add zombie references, each of them prevents reap.

Fix one more locking comment.

Tue, Jul 21, 6:49 PM
kib updated the diff for D58264: processes: add zombie references, each of them prevents reap.

Change p_zombieref lock annotation to be just proctree_lock.

Tue, Jul 21, 6:04 PM
kib accepted D58379: amd64: Remove a prototype for an unimplemented function.
Tue, Jul 21, 4:08 PM
kib accepted D58378: amd64: Fix an off-by-one in the fred_ipi_handlers definition.
Tue, Jul 21, 4:07 PM
kib committed rGeca7b25c101a: kern/sys_ptrace: do not skip P2_PTRACEREQ wait for PT_CLEARSTEP/PT_GET_CHILDREN (authored by kib).
kern/sys_ptrace: do not skip P2_PTRACEREQ wait for PT_CLEARSTEP/PT_GET_CHILDREN
Tue, Jul 21, 2:59 AM
kib closed D58364: kern/sys_ptrace: do not skip P2_PTRACEREQ wait for PT_CLEARSTEP/PT_GET_CHILDREN.
Tue, Jul 21, 2:59 AM
kib updated the diff for D58264: processes: add zombie references, each of them prevents reap.
Tue, Jul 21, 2:19 AM
kib abandoned D58331: wait6(): fix reporting of orphan exits.

Will be consumed by D58264

Tue, Jul 21, 1:53 AM

Mon, Jul 20

kib updated the diff for D58364: kern/sys_ptrace: do not skip P2_PTRACEREQ wait for PT_CLEARSTEP/PT_GET_CHILDREN.

Add a control variable for proc_can_ptrace() calls.

Mon, Jul 20, 10:37 PM
kib requested review of D58364: kern/sys_ptrace: do not skip P2_PTRACEREQ wait for PT_CLEARSTEP/PT_GET_CHILDREN.
Mon, Jul 20, 10:13 PM
kib added inline comments to D58315: ptrace(2): add PT_GET_CHILDREN.
Mon, Jul 20, 10:00 PM
kib accepted D58322: exterror tests: harden the checks.
Mon, Jul 20, 9:58 PM
kib committed rG29d1a3248a6d: lookup: do not return vp_crossmp as dvp for mount over the reg file (authored by kib).
lookup: do not return vp_crossmp as dvp for mount over the reg file
Mon, Jul 20, 9:56 PM
kib closed D58191: lookup: do not return vp_crossmp as dvp for mount over the reg file.
Mon, Jul 20, 9:56 PM
kib committed rG6e93f5e4d693: amd64: FRED support (authored by kib).
amd64: FRED support
Mon, Jul 20, 9:52 PM
kib committed rG0e5b1384df10: x86 xen: provide the prototype for xen_arch_intr_handle_upcall() in x86/apicvar. (authored by kib).
x86 xen: provide the prototype for xen_arch_intr_handle_upcall() in x86/apicvar.
Mon, Jul 20, 9:52 PM
kib closed D55829: amd64: FRED support.
Mon, Jul 20, 9:52 PM
kib closed D56005: x86 xen: provide the prototype for xen_arch_intr_handle_upcall() in xen/arch-intr.h.
Mon, Jul 20, 9:51 PM
kib committed rG009e83b5ebf3: 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
Mon, Jul 20, 8:55 PM
kib committed rGfab43c031ccd: mlx5ib: initialize DEVX subscription state before the eventfd fdget() (authored by aehrenberg_nvidia.com).
mlx5ib: initialize DEVX subscription state before the eventfd fdget()
Mon, Jul 20, 8:55 PM
kib committed rG7b0e4a73ebb6: mlx5: pass the full EQE to the DEVX event notifier (authored by aehrenberg_nvidia.com).
mlx5: pass the full EQE to the DEVX event notifier
Mon, Jul 20, 8:55 PM
kib committed rG2c713c35b430: mlx5ib: advertise write-combining support for dynamic BlueFlame UARs (authored by aehrenberg_nvidia.com).
mlx5ib: advertise write-combining support for dynamic BlueFlame UARs
Mon, Jul 20, 8:55 PM
kib committed rG86cdda181e4e: mlx5: propagate the DEVX uid through SRQ create and destroy (authored by aehrenberg_nvidia.com).
mlx5: propagate the DEVX uid through SRQ create and destroy
Mon, Jul 20, 8:55 PM
kib committed rG012c852efd27: mlx5: guard against a NULL CQ event handler in mlx5_cq_event() (authored by aehrenberg_nvidia.com).
mlx5: guard against a NULL CQ event handler in mlx5_cq_event()
Mon, Jul 20, 8:55 PM
kib committed rGe611f58ae361: ofed/ib_uverbs: release rdma_user_mmap entry ref in rdma_umap_close() (authored by aehrenberg_nvidia.com).
ofed/ib_uverbs: release rdma_user_mmap entry ref in rdma_umap_close()
Mon, Jul 20, 8:55 PM
kib committed rGc15fa820881d: mlx5ib: encode dynamic UAR mmap offsets in the reserved command range (authored by aehrenberg_nvidia.com).
mlx5ib: encode dynamic UAR mmap offsets in the reserved command range
Mon, Jul 20, 8:55 PM
kib committed rGe3f260ad6614: mlx5: mark completion EQs as a shared resource for DEVX uids (authored by aehrenberg_nvidia.com).
mlx5: mark completion EQs as a shared resource for DEVX uids
Mon, Jul 20, 8:55 PM
kib committed rG8d198bba057c: mlx5ib: implement the MLX5_IB_OBJECT_UAR ioctl object (authored by aehrenberg_nvidia.com).
mlx5ib: implement the MLX5_IB_OBJECT_UAR ioctl object
Mon, Jul 20, 8:54 PM
kib committed rGc122d64b5ab2: mlx5ib: allocate IB queue counters as a shared resource (authored by aehrenberg_nvidia.com).
mlx5ib: allocate IB queue counters as a shared resource
Mon, Jul 20, 8:54 PM
kib committed rG8d518f4b482f: mlx5_ib: do not consume CMD/PAGE_REQUEST events in the DEVX notifier (authored by aehrenberg_nvidia.com).
mlx5_ib: do not consume CMD/PAGE_REQUEST events in the DEVX notifier
Mon, Jul 20, 8:54 PM
kib committed rGf7280623cdfe: mlx5_ib: register DEVX objects in the uverbs ioctl parse tree (authored by aehrenberg_nvidia.com).
mlx5_ib: register DEVX objects in the uverbs ioctl parse tree
Mon, Jul 20, 8:54 PM
kib committed rGea6c3833438a: mlx5: extend mlx5_ib_create_cq struct with fields from the current Linux ABI (authored by kib).
mlx5: extend mlx5_ib_create_cq struct with fields from the current Linux ABI
Mon, Jul 20, 8:54 PM
kib committed rGfcee136ce056: kern_writefile(): fix several regressions (authored by kib).
kern_writefile(): fix several regressions
Mon, Jul 20, 8:54 PM
kib committed rG1712dc691e0a: kern_filewrite(): unconditionally calculate cnt, it is used by callers (authored by kib).
kern_filewrite(): unconditionally calculate cnt, it is used by callers
Mon, Jul 20, 8:54 PM
kib committed rGc7663578a278: init(8): extract reroot transient code into reroot_seed (authored by kib).
init(8): extract reroot transient code into reroot_seed
Mon, Jul 20, 8:54 PM
kib committed rGe19778bd3e98: sendfile: stop abusing kern_writev() (authored by kib).
sendfile: stop abusing kern_writev()
Mon, Jul 20, 8:54 PM
kib committed rG842e271b7b8b: amd64 efirt: register all runtime regions as fictitious (authored by kib).
amd64 efirt: register all runtime regions as fictitious
Mon, Jul 20, 8:54 PM
kib updated the diff for D58264: processes: add zombie references, each of them prevents reap.

Remove the weird block.
Several minor fixes accumulated from the testing.

Mon, Jul 20, 8:28 PM
kib committed rGd3b7bbee9275: ptrace(2): add PT_GET_CHILDREN (authored by kib).
ptrace(2): add PT_GET_CHILDREN
Mon, Jul 20, 8:21 PM
kib committed rG6dbeaf1afaba: ptrace.2: document PT_GET_CHILDREN (authored by kib).
ptrace.2: document PT_GET_CHILDREN
Mon, Jul 20, 8:21 PM
kib closed D58315: ptrace(2): add PT_GET_CHILDREN.
Mon, Jul 20, 8:20 PM
kib accepted D58236: exterr: split category into multiple sources.
Mon, Jul 20, 4:01 PM
kib added inline comments to D58058: exterr: relax format restrictions.
Mon, Jul 20, 3:59 PM
kib accepted D58321: exterror: advertise error strings via kern.features.exterr_strings.
Mon, Jul 20, 3:55 PM
kib updated the diff for D58315: ptrace(2): add PT_GET_CHILDREN.

Allocate children big enough to hold information about all children processes, regardless of the p_cansee() return value.

Mon, Jul 20, 2:21 PM
kib added inline comments to D58315: ptrace(2): add PT_GET_CHILDREN.
Mon, Jul 20, 2:20 PM
kib added inline comments to D58264: processes: add zombie references, each of them prevents reap.
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

Sun, Jul 19

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 the ability to set exterrors in userspace.
Sat, Jul 18, 1:46 PM
kib accepted D58059: runtime: add the ability to set exterrors 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