Page MenuHomeFreeBSD

kib (Konstantin Belousov)
User

Projects

User Details

User Since
May 16 2014, 7:35 PM (599 w, 3 d)

Recent Activity

Yesterday

kib committed rGef75e3c9b5e1: kern/subr_syscalls.c: declare 'traced' local variables boolean (authored by kib).
kern/subr_syscalls.c: declare 'traced' local variables boolean
Sun, Nov 9, 12:39 AM
kib committed rGfe5f45696edd: atomic.9: provide fine details about CAS memory model MD semantic (authored by kib).
atomic.9: provide fine details about CAS memory model MD semantic
Sun, Nov 9, 12:39 AM
kib committed rGed278aabc26c: atomic.9: fix description of acquire and release (authored by kib).
atomic.9: fix description of acquire and release
Sun, Nov 9, 12:39 AM
kib committed rG074fc34c842c: atomic.9: provide fine details about CAS memory model MD semantic (authored by kib).
atomic.9: provide fine details about CAS memory model MD semantic
Sun, Nov 9, 12:38 AM
kib committed rG21b0a62ebcdc: atomic.9: fix description of acquire and release (authored by kib).
atomic.9: fix description of acquire and release
Sun, Nov 9, 12:37 AM
kib committed rG7a9378856ae0: kern_jail_set(): do not double-free opts (authored by kib).
kern_jail_set(): do not double-free opts
Sun, Nov 9, 12:37 AM
kib committed rGe02ff3003bf6: ipsec_offload: do not leak drv_spi unr (authored by kib).
ipsec_offload: do not leak drv_spi unr
Sun, Nov 9, 12:37 AM

Sat, Nov 8

kib accepted D53636: proc_set_cred(): Allow 'newcred' to have multiple references.
Sat, Nov 8, 8:01 PM
kib accepted D53640: rm(1): remove whiteouts when forcibly removing directories.
Sat, Nov 8, 10:24 AM

Fri, Nov 7

kib added inline comments to D53599: tmpfs: Include inactive memory in "available" calculation.
Fri, Nov 7, 10:37 PM
kib added inline comments to D53599: tmpfs: Include inactive memory in "available" calculation.
Fri, Nov 7, 7:51 PM

Thu, Nov 6

kib updated the diff for D53624: kern_thread: thread_suspend_check(1) must never suspend.

Assert always true condition, instead of checking for it.

Thu, Nov 6, 9:15 PM
kib closed D53612: kern_jail_set(): do not double-free opts.
Thu, Nov 6, 7:33 PM
kib committed rG3f5f52216f7e: kern_jail_set(): do not double-free opts (authored by kib).
kern_jail_set(): do not double-free opts
Thu, Nov 6, 7:33 PM
kib added a comment to D53612: kern_jail_set(): do not double-free opts.

While I prefer the version I mentioned in the inline notes (it's a little less branchy), I'm also fine with the patch as originally given.

Thu, Nov 6, 7:30 PM
kib requested review of D53624: kern_thread: thread_suspend_check(1) must never suspend.
Thu, Nov 6, 7:28 PM
kib requested review of D53612: kern_jail_set(): do not double-free opts.
Thu, Nov 6, 9:34 AM
kib committed rG0401498ab1ac: ipsec offload: never return error from the newkey/spdadd callbacks (authored by kib).
ipsec offload: never return error from the newkey/spdadd callbacks
Thu, Nov 6, 4:01 AM
kib accepted D53599: tmpfs: Include inactive memory in "available" calculation.

I do not object. tmpfs_mem_avail() is too naive without or with this augmentation.

Thu, Nov 6, 3:58 AM

Wed, Nov 5

kib accepted D53570: mlx5: Preallocate ktls tags asynchronously.
Wed, Nov 5, 11:07 PM
kib accepted D53563: kern: RACCT: Keep process credentials alive via references.

This is still a bad code. It allows two threads to race to cause rctl idea of the proc ucred to be different from the actual curproc->p_ucred.

Wed, Nov 5, 3:45 AM
kib committed rGb72337250610: kern/subr_syscalls.c: declare 'traced' local variables boolean (authored by kib).
kern/subr_syscalls.c: declare 'traced' local variables boolean
Wed, Nov 5, 2:25 AM
kib accepted D53570: mlx5: Preallocate ktls tags asynchronously.
Wed, Nov 5, 1:18 AM
kib updated the diff for D53589: exterror.9 man page.

Fix attribution. Remove two articles.

Wed, Nov 5, 1:09 AM
kib added inline comments to D53589: exterror.9 man page.
Wed, Nov 5, 1:07 AM
kib updated the diff for D53589: exterror.9 man page.

Mention scope of intent.

Wed, Nov 5, 12:13 AM

Tue, Nov 4

kib updated the diff for D53589: exterror.9 man page.

Add note about valid contexts.

Tue, Nov 4, 11:30 PM
kib committed rG7d495be8d4bd: exterr: print exterr for struct buf and bio in ddb show commands (authored by kib).
exterr: print exterr for struct buf and bio in ddb show commands
Tue, Nov 4, 10:56 PM
kib committed rG9521b0b91ea3: exterr: add exterr_db_print(), to be used by several ddb dumpers (authored by kib).
exterr: add exterr_db_print(), to be used by several ddb dumpers
Tue, Nov 4, 10:56 PM
kib added a comment to D53589: exterror.9 man page.

After this goes in, I will write the documentation for buf(9) and bio(9) BIO_EXTERR. This cannot be done in the same commit, because buf/bio layout are changed by exterr, which seems to prevent the merge into the stable branches (I did not decided yet).

Tue, Nov 4, 9:58 PM
kib requested review of D53589: exterror.9 man page.
Tue, Nov 4, 9:55 PM
kib committed rG4accefc998e7: ipsec_offload: do not leak drv_spi unr (authored by kib).
ipsec_offload: do not leak drv_spi unr
Tue, Nov 4, 7:21 PM
kib committed rG8794e3718ec3: sys/bio.h: print BIO_EXTERR flag (authored by kib).
sys/bio.h: print BIO_EXTERR flag
Tue, Nov 4, 7:19 PM
kib added a comment to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
In D53438#1223367, @kib wrote:
In D53438#1223311, @kib wrote:

The actions that are prevented by atomic_load_ptr() are basically arbitrary reloads of si_drv1 at places where the tp value is needed. Epoch, being fenced by compiler membar, already disallows that.

The flow of the code is:

epoch_enter();
load si_drv1 and check it
...
load si_drv1 and use it
...
epoch_exit();

so I don't see how epoch is relevant.

epoch_enter();
load si_drv1 into p and check it
...
tp = p;
...
epoch_exit();
use tp

The code was previously written like this:

NET_EPOCH_ENTER(et);
if (dev->si_drv1 == dev) {
        NET_EPOCH_EXIT(et);
        return (ENXIO);
}
...
tp = dev->si_drv1;
TUN_LOCK(tp);
...
NET_EPOCH_EXIT();

So what happens if tp == dev and we call TUN_LOCK(tp)?

Tue, Nov 4, 7:11 PM
kib added a comment to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
In D53438#1223311, @kib wrote:

The actions that are prevented by atomic_load_ptr() are basically arbitrary reloads of si_drv1 at places where the tp value is needed. Epoch, being fenced by compiler membar, already disallows that.

The flow of the code is:

epoch_enter();
load si_drv1 and check it
...
load si_drv1 and use it
...
epoch_exit();

so I don't see how epoch is relevant.

Tue, Nov 4, 4:47 PM
kib added inline comments to D53570: mlx5: Preallocate ktls tags asynchronously.
Tue, Nov 4, 4:45 PM
kib added a comment to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.

The actions that are prevented by atomic_load_ptr() are basically arbitrary reloads of si_drv1 at places where the tp value is needed. Epoch, being fenced by compiler membar, already disables that.

Tue, Nov 4, 4:32 PM
kib accepted D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.

EPOCH_ENTER_PREEMPT() should be at least as strong as compiler membarrier, and it is indeed due to use of critical enter, so I do not think that si_drv1 can be re-loaded outside the epoch region. It does not hurt of course to use explicit load_ptr().

Tue, Nov 4, 4:20 PM
kib accepted D53537: posix_fallocate(2): move unsupported case to EOPNOTSUPP.
Tue, Nov 4, 4:16 PM
kib committed rG515fa5ff2e4d: geom/geom_vfs.c: use EXTERROR_KE() in g_vfs_strategy for ENXIOs (authored by kib).
geom/geom_vfs.c: use EXTERROR_KE() in g_vfs_strategy for ENXIOs
Tue, Nov 4, 4:12 AM
kib committed rG6c406b5b9312: exterror(9): add infra for bufs and bios (authored by kib).
exterror(9): add infra for bufs and bios
Tue, Nov 4, 4:12 AM
kib committed rG069e2fb5506f: exterror(9): add two helpers (authored by kib).
exterror(9): add two helpers
Tue, Nov 4, 4:12 AM
kib committed rG7746b51dae12: exterror(9): add SETEXTERROR_KE() macro (authored by kib).
exterror(9): add SETEXTERROR_KE() macro
Tue, Nov 4, 4:12 AM
kib committed rG58e5f3b84df0: sys/: rename bio_error variable to abio_error (authored by kib).
sys/: rename bio_error variable to abio_error
Tue, Nov 4, 4:12 AM
kib closed D53351: exterror(9): add infra for bufs and bios.
Tue, Nov 4, 4:12 AM

Mon, Nov 3

kib accepted D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.

Still, add the comment please.

Mon, Nov 3, 3:38 AM
kib added inline comments to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Mon, Nov 3, 12:19 AM

Sun, Nov 2

kib updated the diff for D53482: syscalls: if ptrace(PT_SETREG) occured during syscall, do not do set_syscall_retval().

Rebase

Sun, Nov 2, 9:35 PM
kib reopened D53482: syscalls: if ptrace(PT_SETREG) occured during syscall, do not do set_syscall_retval().
Sun, Nov 2, 9:35 PM
kib committed rGa6a9d97708ec: kern/subr_syscalls.c: declare 'traced' local variables boolean (authored by kib).
kern/subr_syscalls.c: declare 'traced' local variables boolean
Sun, Nov 2, 9:22 PM
kib committed rG269b1c238806: atomic.9: provide fine details about CAS memory model MD semantic (authored by kib).
atomic.9: provide fine details about CAS memory model MD semantic
Sun, Nov 2, 9:22 PM
kib committed rGf26382dd72df: atomic.9: fix description of acquire and release (authored by kib).
atomic.9: fix description of acquire and release
Sun, Nov 2, 9:22 PM
kib closed D53482: syscalls: if ptrace(PT_SETREG) occured during syscall, do not do set_syscall_retval().
Sun, Nov 2, 9:22 PM
kib closed D52744: atomic.9: provide fine details about CAS memory model MD semantic.
Sun, Nov 2, 9:22 PM
kib accepted D53535: fusefs: standardize on OPNOTSUPP for posix_fallocate(2).
Sun, Nov 2, 8:24 PM
kib accepted D53536: nfs_clvnops: standardize on EOPNOTSUPP for posix_fallocate(2).
Sun, Nov 2, 8:22 PM
kib accepted D53537: posix_fallocate(2): move unsupported case to EOPNOTSUPP.
In D53537#1222227, @imp wrote:

Worth an issue 8 note in the history standards section?

Sun, Nov 2, 8:20 PM

Sat, Nov 1

kib committed rG3c44b007b9a2: Match style in 3613896 (authored by obrien).
Match style in 3613896
Sat, Nov 1, 12:47 AM
kib committed rGa8bf2a1a3c27: knotes: kqueue: handle copy for trivial filters (authored by kib).
knotes: kqueue: handle copy for trivial filters
Sat, Nov 1, 12:46 AM
kib committed rG3aae49be3d12: kqueue.2: document KQUEUE_CPONFORK (authored by kib).
kqueue.2: document KQUEUE_CPONFORK
Sat, Nov 1, 12:45 AM
kib committed rGb4946ace9b04: kqueue: handle copy for netmap filters (authored by kib).
kqueue: handle copy for netmap filters
Sat, Nov 1, 12:45 AM
kib committed rGb7b6d45008fd: kqueue: handle copy for vnode filters (authored by kib).
kqueue: handle copy for vnode filters
Sat, Nov 1, 12:45 AM
kib committed rGc8e5a235b9c6: kern_event.c: support copy for timer events (authored by kib).
kern_event.c: support copy for timer events
Sat, Nov 1, 12:45 AM
kib committed rG2002e0712320: kqueuex(2): add KQUEUE_CPONFORK (authored by kib).
kqueuex(2): add KQUEUE_CPONFORK
Sat, Nov 1, 12:45 AM
kib committed rGf9dfc0023528: kern/kern_event.c: extract kqueue_acquire_ref() from kqueue_acquire() (authored by kib).
kern/kern_event.c: extract kqueue_acquire_ref() from kqueue_acquire()
Sat, Nov 1, 12:45 AM
kib committed rGee7be79f7ed3: kern/kern_event.c: extract kern_kqueue_alloc() from kern_kqueue() (authored by kib).
kern/kern_event.c: extract kern_kqueue_alloc() from kern_kqueue()
Sat, Nov 1, 12:45 AM
kib committed rG4ae2965258e8: kqueue_fo_release(): print filter with underflow (authored by kib).
kqueue_fo_release(): print filter with underflow
Sat, Nov 1, 12:45 AM
kib committed rG23d4dd1d53bf: kern_descrip.c: add struct proc argument to fdcopy() (authored by kib).
kern_descrip.c: add struct proc argument to fdcopy()
Sat, Nov 1, 12:45 AM
kib committed rG77a5c63f7923: struct file: add DFLAG_FORK, indicate copying on fork (authored by kib).
struct file: add DFLAG_FORK, indicate copying on fork
Sat, Nov 1, 12:45 AM
kib accepted D53508: pathconf.2: Document the new _PC_CASE_INSENSITIVE name.
Sat, Nov 1, 12:06 AM

Fri, Oct 31

kib added inline comments to D53508: pathconf.2: Document the new _PC_CASE_INSENSITIVE name.
Fri, Oct 31, 10:54 PM
kib added inline comments to D53508: pathconf.2: Document the new _PC_CASE_INSENSITIVE name.
Fri, Oct 31, 9:58 PM
kib added a comment to D53424: ufs: support unmapped bufs for indirect blocks in bmap.

Is there any concern that this new use will add pressure to the sf_buf system on non-direct map platforms?

Fri, Oct 31, 6:24 PM
kib added inline comments to D53456: kern: Fix credentials leaks on RACCT but no RCTL.
Fri, Oct 31, 4:27 PM
kib committed rGa83f433a9d0e: x86 LAPIC: force edge-triggered mode for !bootverbose as well (authored by kib).
x86 LAPIC: force edge-triggered mode for !bootverbose as well
Fri, Oct 31, 2:43 PM
kib committed rGdbdb47165ad3: vfs_syscalls.c::flags_to_right(): O_DSYNC should be allowed for CAP_FSYNC (authored by kib).
vfs_syscalls.c::flags_to_right(): O_DSYNC should be allowed for CAP_FSYNC
Fri, Oct 31, 2:43 PM
kib committed rGc19f161f5f65: write.2: explain the atomicity guarantees of the writes (authored by kib).
write.2: explain the atomicity guarantees of the writes
Fri, Oct 31, 2:43 PM
kib committed rGf02006793b78: sys/dev/md: cleanup includes (authored by kib).
sys/dev/md: cleanup includes
Fri, Oct 31, 2:42 PM
kib committed rG7e3c0565cfbf: x86 LAPIC: force edge-triggered mode for !bootverbose as well (authored by kib).
x86 LAPIC: force edge-triggered mode for !bootverbose as well
Fri, Oct 31, 2:42 PM
kib committed rG514c8f173ce0: write.2: explain the atomicity guarantees of the writes (authored by kib).
write.2: explain the atomicity guarantees of the writes
Fri, Oct 31, 2:42 PM
kib committed rG0111b0f6ac8a: vfs_syscalls.c::flags_to_right(): O_DSYNC should be allowed for CAP_FSYNC (authored by kib).
vfs_syscalls.c::flags_to_right(): O_DSYNC should be allowed for CAP_FSYNC
Fri, Oct 31, 2:42 PM
kib updated the diff for D53482: syscalls: if ptrace(PT_SETREG) occured during syscall, do not do set_syscall_retval().

Clear TDB_USERWR under proc lock. Do it earlier.

Fri, Oct 31, 2:09 PM

Thu, Oct 30

kib added a comment to D53482: syscalls: if ptrace(PT_SETREG) occured during syscall, do not do set_syscall_retval().

That said, I disagree that this is a kernel bug at all.

Thu, Oct 30, 6:42 PM
kib requested review of D53482: syscalls: if ptrace(PT_SETREG) occured during syscall, do not do set_syscall_retval().
Thu, Oct 30, 6:41 PM
kib committed rG8b2f4e6b3a47: ipsec offload: never return error from the newkey/spdadd callbacks (authored by kib).
ipsec offload: never return error from the newkey/spdadd callbacks
Thu, Oct 30, 2:55 PM
kib added inline comments to D53160: kthread: Add a wrapper macro KPROC_START.
Thu, Oct 30, 9:05 AM
kib added inline comments to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Thu, Oct 30, 9:03 AM

Wed, Oct 29

kib added a comment to D52744: atomic.9: provide fine details about CAS memory model MD semantic.

Alan. do you plan to comment on this?

Wed, Oct 29, 7:55 PM
kib added inline comments to D53438: if_tuntap: defer transient destroy_dev() to a taskqueue.
Wed, Oct 29, 4:48 PM
kib accepted D53439: makedev(9): drop an additional note about cdevpriv dtors.
Wed, Oct 29, 4:09 PM
kib added a reviewer for D53351: exterror(9): add infra for bufs and bios: mckusick.
Wed, Oct 29, 7:30 AM

Tue, Oct 28

kib added a comment to D53424: ufs: support unmapped bufs for indirect blocks in bmap.

I strongly do not like this, esp the proliferation of PMAP_HAS_DMAP into MD code.

Tue, Oct 28, 9:25 PM
kib updated the diff for D53351: exterror(9): add infra for bufs and bios.

Debugged version. Worked for me with the artificial random errors returned from md(4) start_swap() on BIO_READ.

Tue, Oct 28, 6:56 PM
kib committed rGc6e12d38f167: sys/dev/md: cleanup includes (authored by kib).
sys/dev/md: cleanup includes
Tue, Oct 28, 6:53 PM
kib added inline comments to D53160: kthread: Add a wrapper macro KPROC_START.
Tue, Oct 28, 5:44 PM

Mon, Oct 27

kib accepted D53246: vmm: Fix routines which create maps of the guest physical address space.
Mon, Oct 27, 3:47 PM
kib committed rG64fb7033d752: amd64: print 'EFI RT fault' line before fault CPU state (authored by kib).
amd64: print 'EFI RT fault' line before fault CPU state
Mon, Oct 27, 3:09 AM
kib committed rGc412af68cb60: amd64: print 'EFI RT fault' line before fault CPU state (authored by kib).
amd64: print 'EFI RT fault' line before fault CPU state
Mon, Oct 27, 3:08 AM

Sun, Oct 26

kib committed rG1c8d7bb4cf7a: write.2: explain the atomicity guarantees of the writes (authored by kib).
write.2: explain the atomicity guarantees of the writes
Sun, Oct 26, 5:36 PM
kib closed D53361: write.2: explain the atomicity guarantees of the writes.
Sun, Oct 26, 5:36 PM