Page MenuHomeFreeBSD

kib (Konstantin Belousov)
User

Projects (3)

User Details

User Since
May 16 2014, 7:35 PM (610 w, 6 h)

Recent Activity

Today

kib committed rG95eec982c37a: vm/swap_pager.c: silence compiler warning.
Sat, Jan 24, 12:33 AM
kib committed rG2a27aefcefe0: swap_pager_getpages(): some pages from ma[] might be bogus.
Sat, Jan 24, 12:33 AM
kib committed rG102400e5d07a: swap_pager_getpages(): assert that bp->b_pages[] is accessed in bounds.
Sat, Jan 24, 12:33 AM
kib committed rGa6cc48e22ba7: sendfile: remove calculation of unused bsize.
Sat, Jan 24, 12:33 AM
kib committed rGb3e6c8eb7eba: tuning.7: wording fixes.
Sat, Jan 24, 12:33 AM
kib committed rG7768be681bed: tuning.7: use the correct word for collapsing (authored by Oliver Pinter <oliver.pntr+freebsd@gmail.com>).
Sat, Jan 24, 12:33 AM
kib committed rG9dbc47d79efe: vm_map_entry_delete(): fix the calculation of swap release.
Sat, Jan 24, 12:33 AM
kib committed rG10af3b3b71a0: tuning.7: add more explanation about swap (over-)accounting.
Sat, Jan 24, 12:33 AM
kib committed rGa4123ac9f596: vm_object: remove the charge member.
Sat, Jan 24, 12:33 AM
kib committed rG0ab96c91676d: rfork(2): fix swap accounting in vmspace_unshare().
Sat, Jan 24, 12:33 AM
kib committed rG1f6db7d73474: swap_release_by_cred*(): give some additional info on panics due to underflow.
Sat, Jan 24, 12:33 AM
kib committed rG249939298daf: vm_object_coalesce(): return swap reservation back if overcharged.
Sat, Jan 24, 12:33 AM
kib committed rG1e1727a7d7bd: vm_object_coalesce(): do not account holes twice.
Sat, Jan 24, 12:33 AM
kib committed rG99fab30f7272: vm_object_coalesce(): simplify common expression.
Sat, Jan 24, 12:32 AM
kib committed rG84cab089ed77: vm_object_coalesce(): remove commented out code.
Sat, Jan 24, 12:32 AM

Thu, Jan 22

kib committed rG2b1db07bec92: x86: add machine/ifunc.h.
Thu, Jan 22, 9:15 PM
kib committed rGdfc4186c6dcf: x86 lapic: Dump LVTs from the ddb show lapic command.
Thu, Jan 22, 9:15 PM

Wed, Jan 21

kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Avoid racy access to the p_pid member of possibly reclaimed struct proc.
Other review' comments are handled.

Wed, Jan 21, 12:33 AM
kib added inline comments to D54592: Add pdrfork(2) and pdwait(2).
Wed, Jan 21, 12:31 AM

Tue, Jan 20

kib added a comment to D54785: witness: Provide facility to print detailed lock tree.
In D54785#1252692, @jtl wrote:
In D54785#1252666, @kib wrote:

I do not think that trying to schedule a task is very robust with a LOR detected. We are already in the situation risking the deadlock.

Fair point!

If you refuse to make this a default, I am asking to add a simple knob which would make this additional info to be printed in all situations.

I don't "refuse"; I was just giving my thinking.

Ok, refuse was probably too strong word, sorry about this.

Tue, Jan 20, 9:03 PM
kib added a comment to D54785: witness: Provide facility to print detailed lock tree.

I do not think that trying to schedule a task is very robust with a LOR detected. We are already in the situation risking the deadlock.
Also I do not think that the doubts of the stack overflow is very grounded, since WITNESS typically has spinlock recording disabled II believe there are not solved issues with console spinlock which in reality cause hard hang). So there is definitely the space for interrupt frame, and mode, when WITNESS running.

Tue, Jan 20, 7:55 PM
kib closed D54804: ktrace: do not enqueue request if the process' ktrioparams are freed.
Tue, Jan 20, 7:47 PM
kib committed rG6bb3f208617b: ktrace: do not enqueue request if the process' ktrioparams are freed.
Tue, Jan 20, 7:47 PM
kib requested review of D54804: ktrace: do not enqueue request if the process' ktrioparams are freed.
Tue, Jan 20, 7:38 PM
kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Correct macro names.

Tue, Jan 20, 3:03 PM
kib committed rG96acaa960023: compat32: provide a type and a macro for (u)int64_t handling on non-x86 arches.
Tue, Jan 20, 2:43 PM
kib committed rGbe1b2da855cc: sys/abi_compat.h: fix UB for bintime32 handling.
Tue, Jan 20, 2:43 PM
kib closed D54663: sys/abi_compat.h: fix UB.
Tue, Jan 20, 2:43 PM
kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Grammar and wording of the man page update.

Tue, Jan 20, 2:35 PM
kib added inline comments to D54592: Add pdrfork(2) and pdwait(2).
Tue, Jan 20, 2:34 PM
kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Add note about the pid reuse.

Tue, Jan 20, 3:45 AM
kib added a comment to D54592: Add pdrfork(2) and pdwait(2).

This looks great, @kib! If you commit it, I'll follow up with the test suite. A few questions:

  • Are you planning to write the man page yourself, or would you like help with that?
Tue, Jan 20, 3:42 AM
kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Add documentation.
Fix pdwait() prototype.

Tue, Jan 20, 3:41 AM

Mon, Jan 19

kib added a comment to D54785: witness: Provide facility to print detailed lock tree.

This should be extremely useful, I already anticipate it. But, why not make this information available by default? I am not even sure that the knob is needed to hide it.

Mon, Jan 19, 8:19 PM
kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Renumber AUE_PDRFORK.
Drop contrib/openbsm patch, similar to how other new AUE_ constants are not imported there.

Mon, Jan 19, 7:20 PM
kib added a comment to D54323: krb5: Expose missing symbols.
In D54323#1252001, @cy wrote:

DSO bump.

Mon, Jan 19, 5:34 PM
kib committed rG902e3057cd5c: lib/libthr: add pthread_tryjoin(3) test.
Mon, Jan 19, 4:58 PM
kib committed rG7f026a58691d: Document pthread_tryjoin_np(3).
Mon, Jan 19, 4:58 PM
kib committed rGafa70a8496e9: libthr: add pthread_tryjoin_np().
Mon, Jan 19, 4:58 PM
kib closed D54766: Add pthread_tryjoin_np(3) as provided by glibc.
Mon, Jan 19, 4:58 PM
kib committed rGce16be73707e: libthr/thread/thr_join.c: deduplicate backout_join() helper.
Mon, Jan 19, 4:58 PM
kib committed rG002c50ea23b9: amd64/vmm: remove unused static function vcpu_state2str().
Mon, Jan 19, 4:46 PM
kib closed D54781: amd64/vmm: remove unused static function vcpu_state2str().
Mon, Jan 19, 4:46 PM
kib requested review of D54781: amd64/vmm: remove unused static function vcpu_state2str().
Mon, Jan 19, 4:30 PM
kib committed rG709a53c8b20b: x86/local_apic.c: Properly calculate the number of LVT entries.
Mon, Jan 19, 4:21 PM
kib committed rGad5e3cb95034: x86/local_apic.c: add lapic_maxlvt() helper.
Mon, Jan 19, 4:21 PM
kib committed rG83d988288675: sys: do not allow entering vm_fault() on boot until VM is initialized.
Mon, Jan 19, 4:21 PM
kib closed D54773: x86/local_apic.c: Properly calculate the number of LVT entries.
Mon, Jan 19, 4:21 PM
kib closed D54768: sys: do not allow entering vm_fault() on boot until VM is initialized.
Mon, Jan 19, 4:21 PM
kib updated the diff for D54773: x86/local_apic.c: Properly calculate the number of LVT entries.

Use lapic_maxlvt() everywhere.

Mon, Jan 19, 4:07 PM
kib updated the diff for D54768: sys: do not allow entering vm_fault() on boot until VM is initialized.

Save file before diffing.

Mon, Jan 19, 4:02 PM
kib updated the diff for D54768: sys: do not allow entering vm_fault() on boot until VM is initialized.

Add comment in vm_init.c

Mon, Jan 19, 4:01 PM
kib added a comment to D54768: sys: do not allow entering vm_fault() on boot until VM is initialized.

To be clear, the point is to have an explicit panic rather than a boot hang because we end up spinning in an uninitialized trap handler?

Mon, Jan 19, 3:58 PM
kib updated the diff for D54766: Add pthread_tryjoin_np(3) as provided by glibc.

Handle review' comments.

Mon, Jan 19, 3:55 PM
kib updated the diff for D54773: x86/local_apic.c: Properly calculate the number of LVT entries.

Add helper

Mon, Jan 19, 12:56 PM
kib requested review of D54773: x86/local_apic.c: Properly calculate the number of LVT entries.
Mon, Jan 19, 12:14 PM

Sun, Jan 18

kib updated the diff for D54768: sys: do not allow entering vm_fault() on boot until VM is initialized.

Make this MI.

Sun, Jan 18, 10:58 PM
kib requested review of D54768: sys: do not allow entering vm_fault() on boot until VM is initialized.
Sun, Jan 18, 9:18 PM
kib committed rG11f954b021a1: x86: mask all LAPIC vectors early, before BSP interrupts are enabled.
Sun, Jan 18, 7:50 PM
kib committed rG4938ee806486: x86/local_apic.c: convert lvts[] and elvts[] arrays to designated initializers.
Sun, Jan 18, 7:50 PM
kib committed rG87ed56a5c435: x88/local_apic.c: for each lvt element, add LVT register index.
Sun, Jan 18, 7:50 PM
kib closed D54543: Mask local APIC vectors on init, before enabling interrupts.
Sun, Jan 18, 7:50 PM
kib updated the diff for D54766: Add pthread_tryjoin_np(3) as provided by glibc.

After a second thought, the pthread_tryjoin_np(3) function must be non-cancelling.

Sun, Jan 18, 3:03 PM
kib updated the diff for D54766: Add pthread_tryjoin_np(3) as provided by glibc.

Convert test to the proper atf, instead of using err()

Sun, Jan 18, 1:12 PM
kib requested review of D54766: Add pthread_tryjoin_np(3) as provided by glibc.
Sun, Jan 18, 12:57 PM

Sat, Jan 17

kib committed rG325baf007357: vm/swap_pager.c: silence compiler warning.
Sat, Jan 17, 3:34 AM
kib committed rGd198ad51ea73: swap_pager_getpages(): some pages from ma[] might be bogus.
Sat, Jan 17, 2:09 AM
kib closed D54713: Fix sendfile over tmpfs.
Sat, Jan 17, 2:09 AM
kib committed rGb02ddb59e646: swap_pager_getpages(): assert that bp->b_pages[] is accessed in bounds.
Sat, Jan 17, 2:09 AM
kib committed rG3fe275c1ef45: sendfile: remove calculation of unused bsize.
Sat, Jan 17, 2:09 AM

Fri, Jan 16

kib added inline comments to D54751: time: Add EXTERROR for all EINVAL returns.
Fri, Jan 16, 9:37 PM
kib accepted D54746: Initialize CLOCK_UPTIME for itmer events.

You might consider EXTERROR-ise kern_ktimer_create(), there are too many EINVALs there. Specific diagnostic would be useful.

Fri, Jan 16, 7:21 PM
kib updated the diff for D54663: sys/abi_compat.h: fix UB.

Use array member for freebsd32_uint64_t on amd64.

Fri, Jan 16, 7:11 PM
kib added inline comments to D54663: sys/abi_compat.h: fix UB.
Fri, Jan 16, 7:11 PM
kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Drop the patch to sort exterr_cat_filenames.h

Fri, Jan 16, 4:11 PM
kib added a comment to D54663: sys/abi_compat.h: fix UB.
In D54663#1250782, @kib wrote:
In D54663#1250766, @kib wrote:

After we agree on the approach and this change lands, I plan to do the pass over uses of val1/val2 in compat32, where int64_t val is used by the host ABI, converting them to freebsd32_uint64_t.

Please consider limiting this sweep to cases where the value will be mis-aligned relative to the struct.

Can you elaborate please, why? I understand that it formally changes nothing.

I'd rather we only have messy MD things where they are needed. That being said, the benefit of doing it everywhere is you do it once and don't have to think about it again so perhaps you are right that we should do it everywhere.

Fri, Jan 16, 4:03 PM
kib updated the diff for D54663: sys/abi_compat.h: fix UB.

Switch to memcpy

Fri, Jan 16, 4:01 PM
kib added a comment to D54663: sys/abi_compat.h: fix UB.
In D54663#1250766, @kib wrote:

After we agree on the approach and this change lands, I plan to do the pass over uses of val1/val2 in compat32, where int64_t val is used by the host ABI, converting them to freebsd32_uint64_t.

Please consider limiting this sweep to cases where the value will be mis-aligned relative to the struct.

Fri, Jan 16, 2:49 PM
kib added a comment to D54663: sys/abi_compat.h: fix UB.

After we agree on the approach and this change lands, I plan to do the pass over uses of val1/val2 in compat32, where int64_t val is used by the host ABI, converting them to freebsd32_uint64_t.

Fri, Jan 16, 2:24 PM
kib updated the diff for D54663: sys/abi_compat.h: fix UB.

freebsd32_uint64_t

Fri, Jan 16, 2:23 PM
kib added inline comments to D54663: sys/abi_compat.h: fix UB.
Fri, Jan 16, 2:20 PM
kib added a comment to D54713: Fix sendfile over tmpfs.

I wonder why we bother with bogus page replacement in sendfile_swapin(). Why not pass valid pages to the pager and let it decide how to handle it?

Fri, Jan 16, 10:09 AM

Thu, Jan 15

kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Make free_pid automatic, remote the proc_reap(free_pid) arg

Thu, Jan 15, 5:41 AM
kib updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Fix pdwait() userspace prototype.
Drop not useful operations on curproc procdesc.
Postpone freeing the zombie' pid until procdesc is freed.

Thu, Jan 15, 5:31 AM
kib added a comment to D54592: Add pdrfork(2) and pdwait(2).

I had to build an aarch64 VM just to test the RFSPAWN change, but it works now. It probably works on amd64 too, but I can't test it without writing assembly code.

Thu, Jan 15, 5:30 AM
kib accepted D54699: tdestroy: don't visit one-child node twice.
Thu, Jan 15, 4:23 AM
kib accepted D54507: rtld: Use a helper variable to simplify a few lines.
Thu, Jan 15, 3:58 AM
kib added inline comments to D54663: sys/abi_compat.h: fix UB.
Thu, Jan 15, 3:58 AM

Wed, Jan 14

kib accepted D54507: rtld: Use a helper variable to simplify a few lines.

I am fine with jrtc27' suggested name.

Wed, Jan 14, 6:25 PM
kib accepted D54701: termios.4: Cross-reference stack(9) for the STATUS character.
Wed, Jan 14, 5:16 PM · manpages
kib added a comment to D54699: tdestroy: don't visit one-child node twice.

Did you tested this with lib/libc/tests/stdlib/tsearch_test.c?
If it works, I am fine with it.

Wed, Jan 14, 5:04 PM
kib added inline comments to D54701: termios.4: Cross-reference stack(9) for the STATUS character.
Wed, Jan 14, 4:56 PM · manpages
kib accepted D54712: rtld: Switch to using <assert.h> for assert.

Ok

Wed, Jan 14, 4:28 PM
kib accepted D54710: rtld: Simplify walking program headers.
In D54710#1249915, @jhb wrote:
In D54710#1249909, @kib wrote:

I think this is fine, but for completeness we probably should check that ehdr->e_phentsize == sizeof(Elf_Phdr), and return if not.

Yes. I do think we already check AT_PHENT, but might not be checking the size in the ehdr. Granted, that's a bug in the current code, and I might fix it in a separate commit.

Wed, Jan 14, 4:04 PM
kib accepted D54669: exterr: Sort output from make_libc_exterr_cat_filenames.sh.
Wed, Jan 14, 4:03 PM
kib added a comment to D54669: exterr: Sort output from make_libc_exterr_cat_filenames.sh.

I also noted it, but used find | sort in D54592.

Wed, Jan 14, 4:03 PM
kib added a comment to D54701: termios.4: Cross-reference stack(9) for the STATUS character.

You need to explain what you put into the summary, in the man page itself. Otherwise the reference to stack(9) looks out of context.

Wed, Jan 14, 4:00 PM · manpages
kib added a comment to D54712: rtld: Switch to using <assert.h> for assert.

No, this is not going to work. This brings stdio + locale into rtld.

Wed, Jan 14, 3:58 PM
kib accepted D54711: rtld: Use uintptr_t instead of Elf_Addr for init/fini function pointers.
Wed, Jan 14, 3:56 PM
kib added a comment to D54710: rtld: Simplify walking program headers.

I think this is fine, but for completeness we probably should check that ehdr->e_phentsize == sizeof(Elf_Phdr), and return if not.

Wed, Jan 14, 3:54 PM