Page MenuHomeFreeBSD

kib (Konstantin Belousov)
User

Projects

User Details

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

Recent Activity

Today

kib added inline comments to D40443: linux(4): In preparation for xsave refactor fxsave code on amd64.
Wed, Jun 7, 12:11 AM · Linux Emulation

Yesterday

kib added inline comments to D40443: linux(4): In preparation for xsave refactor fxsave code on amd64.
Tue, Jun 6, 11:09 PM · Linux Emulation
kib added inline comments to D40443: linux(4): In preparation for xsave refactor fxsave code on amd64.
Tue, Jun 6, 10:31 PM · Linux Emulation
kib added inline comments to D40443: linux(4): In preparation for xsave refactor fxsave code on amd64.
Tue, Jun 6, 9:14 PM · Linux Emulation

Mon, Jun 5

kib added a comment to D40403: vm_page: Implement lazy page initialization.
In D40403#920211, @kib wrote:

Suppose that a kernel dump happens very early, before pages are initialized. Then, e.g. kernel memory needs the backing pages to be functional for some variations of busdma to work. I know that at very least DMAR busdma requires it.

"kernel dump" meaning minidump? I think it is not a problem, since the minidump code always excludes free pages (they are not set in the vm_page_dump bitset), and non-free pages are always initialized.

Mon, Jun 5, 9:31 PM
kib committed rG91880e07f605: rtld: do not allow both dynamic DTV index and static TLS offset (authored by kib).
rtld: do not allow both dynamic DTV index and static TLS offset
Mon, Jun 5, 7:34 PM
kib committed rG283a4f409731: rtld: rename tls_done to tls_static (authored by kib).
rtld: rename tls_done to tls_static
Mon, Jun 5, 7:34 PM
kib committed rGa7bca6949252: rtld_tls.h: style (authored by kib).
rtld_tls.h: style
Mon, Jun 5, 7:34 PM
kib committed rGe99631746701: open(2): fix typo (authored by kib).
open(2): fix typo
Mon, Jun 5, 8:37 AM
kib committed rG1e26f443cd2b: __acl_get_fd(2), __acl_aclcheck_fd(2): enable for O_PATH filedescriptors (authored by kib).
__acl_get_fd(2), __acl_aclcheck_fd(2): enable for O_PATH filedescriptors
Mon, Jun 5, 8:37 AM
kib committed rGbb75966eaa31: reapkill: handle possible pid reuse after the pid was recorded as signalled (authored by kib).
reapkill: handle possible pid reuse after the pid was recorded as signalled
Mon, Jun 5, 8:37 AM
kib committed rG135bc1d49de5: unr(9): document iterators (authored by kib).
unr(9): document iterators
Mon, Jun 5, 8:37 AM
kib committed rGd4fb56c08fb9: unr(9) iterator: add naive test (authored by kib).
unr(9) iterator: add naive test
Mon, Jun 5, 8:37 AM
kib committed rGe7c3889a1736: unr(9): add 'show unrhdr_iter' command (authored by kib).
unr(9): add 'show unrhdr_iter' command
Mon, Jun 5, 8:37 AM
kib committed rG4ae4e074ebe8: unr(9): document clean_unrhdr() (authored by kib).
unr(9): document clean_unrhdr()
Mon, Jun 5, 8:37 AM
kib committed rG694714adcd19: unr(9): add 'show unrhdr' ddb command (authored by kib).
unr(9): add 'show unrhdr' ddb command
Mon, Jun 5, 8:37 AM
kib committed rGc0360504add5: unr(9): add iterator interface (authored by kib).
unr(9): add iterator interface
Mon, Jun 5, 8:37 AM
kib committed rGc26549327f42: subr_unit.c: explain first/last special ranges (authored by kib).
subr_unit.c: explain first/last special ranges
Mon, Jun 5, 8:37 AM
kib committed rG23af3ca2d418: kern/subr_unit.c: more uses for is_bitmap() (authored by kib).
kern/subr_unit.c: more uses for is_bitmap()
Mon, Jun 5, 8:37 AM
kib committed rGbe455be5099d: kern/subr_unit.c: some style (authored by kib).
kern/subr_unit.c: some style
Mon, Jun 5, 8:36 AM
kib committed rGdcaa24cf3057: setkey(8): document NAT-T and NAT-T MTU extensions syntax (authored by kib).
setkey(8): document NAT-T and NAT-T MTU extensions syntax
Mon, Jun 5, 8:36 AM
kib committed rG447af6361cec: setkey(8): NAT-T manual configuration support (authored by kib).
setkey(8): NAT-T manual configuration support
Mon, Jun 5, 8:36 AM
kib committed rG256d03bc580e: setkey(8): extract prefixlen calculation info helper (authored by kib).
setkey(8): extract prefixlen calculation info helper
Mon, Jun 5, 8:36 AM
kib committed rG0957619bf5f0: setkey(8): ansify parser (authored by kib).
setkey(8): ansify parser
Mon, Jun 5, 8:36 AM
kib committed rG64d0e990f766: setkey(8): remove redundand returns (authored by kib).
setkey(8): remove redundand returns
Mon, Jun 5, 8:36 AM

Sun, Jun 4

kib added a comment to D40403: vm_page: Implement lazy page initialization.

Suppose that a kernel dump happens very early, before pages are initialized. Then, e.g. kernel memory needs the backing pages to be functional for some variations of busdma to work. I know that at very least DMAR busdma requires it.

Sun, Jun 4, 6:49 PM

Sat, Jun 3

kib accepted D40410: xregs_sig: Add a ability to handle multiple register banks.
Sat, Jun 3, 9:24 PM
kib added inline comments to D40410: xregs_sig: Add a ability to handle multiple register banks.
Sat, Jun 3, 8:56 PM
kib added a comment to D40385: xregs_via_sig: Add a work around for aarch64.

Look at libexec/rtld-eld/rtld-libc/Makefile.inc

Sat, Jun 3, 7:30 PM
kib accepted D40384: xregs_via_sig: Add avx registers to test.
Sat, Jun 3, 7:28 PM
kib added inline comments to D40410: xregs_sig: Add a ability to handle multiple register banks.
Sat, Jun 3, 7:28 PM

Fri, Jun 2

kib committed rG8dad5ece4947: dd(1): neutralize SIGINT while non-async-signal safe code is executing (authored by kib).
dd(1): neutralize SIGINT while non-async-signal safe code is executing
Fri, Jun 2, 10:52 PM
kib closed D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing.
Fri, Jun 2, 10:52 PM
kib added a comment to D40403: vm_page: Implement lazy page initialization.

Consider e.g. kmem_bootstrap_free(). Isn't the code there depends on the vm_page structures being already initialized?

Fri, Jun 2, 9:58 PM
kib accepted D40402: vm_phys: Simplify vm_phys_scan_contig() a bit.
Fri, Jun 2, 9:20 PM
kib accepted D40401: vm_phys: Change the return type of vm_phys_unfree_page() to bool.
Fri, Jun 2, 9:17 PM
kib accepted D40400: vm_phys: Factor out some duplicated code in vm_phys_enqueue_contig().
Fri, Jun 2, 9:15 PM
kib accepted D40399: vm_page: Let vm_page_init_page() take a pool parameter.
Fri, Jun 2, 9:10 PM
kib accepted D40244: efi: Update efi_phys_to_kva to accept the size of the object being mapped..
Fri, Jun 2, 7:22 PM
kib added inline comments to D40384: xregs_via_sig: Add avx registers to test.
Fri, Jun 2, 7:20 PM
kib added inline comments to D40384: xregs_via_sig: Add avx registers to test.
Fri, Jun 2, 12:53 PM
kib added inline comments to D40331: netlink: dump interface capabilities with other interface data.
Fri, Jun 2, 11:52 AM
kib added inline comments to D40244: efi: Update efi_phys_to_kva to accept the size of the object being mapped..
Fri, Jun 2, 10:34 AM

Thu, Jun 1

kib added a comment to D40385: xregs_via_sig: Add a work around for aarch64.

Hm wouldn't it better to fix the issue instead?
Is it enough to build rtld with the right compiler options?

Thu, Jun 1, 10:48 PM
kib accepted D40381: avx_sig: Rename to more general name.
Thu, Jun 1, 10:45 PM
kib accepted D40382: xregs_via_sig: Finish renaming simd to xregs before adding avx.
Thu, Jun 1, 10:44 PM
kib accepted D40383: xregs_via_sig: Simplify Makefile by using MACHINE_CPUARCH in SRCS.
Thu, Jun 1, 10:44 PM
kib added inline comments to D40384: xregs_via_sig: Add avx registers to test.
Thu, Jun 1, 10:44 PM
kib updated the diff for D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing.

Fix the order in before_io()

Thu, Jun 1, 7:35 PM
kib added a comment to D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing.
In D40281#919091, @des wrote:

This is a massively over-engineered solution to a problem that doesn't need solving. I'm not sure why you're pursuing this. The problem I set out to solve has been solved and the remaining race is insignificant.

Thu, Jun 1, 7:35 PM
kib added a comment to D40244: efi: Update efi_phys_to_kva to accept the size of the object being mapped..

Only add the macro where needed.

Thu, Jun 1, 6:22 PM
kib updated the diff for D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing.

Do not block SIGINT, use flags instead. This slightly resembles Peterson lock.

Thu, Jun 1, 8:41 AM
kib added a comment to D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing.

I think I realized how this might be fixed more elegant, without compromising even the EINTR on stderr behavior. Instead of sys-blocking the signal, I can do it by exchanging two flags between the handler and fences. Updated patch follows.

Thu, Jun 1, 8:39 AM

Wed, May 31

kib added a comment to D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing.
In D40281#918468, @kib wrote:

How the effects of that are different than the current code, where the ^C handler just set a flag and returns?

The one difference of any significance would be if the program is blocked on writing a progress output to stderr (e.g. if that has been directed to a pipe) when you ^C it; a handler installed without SA_RESTART that just sets a flag could nevertheless cause an EINTR from the write, whereas with signals blocked the program will remain blocked.

I don't know if anyone cares about this.

Wed, May 31, 9:37 PM
kib added a comment to D40244: efi: Update efi_phys_to_kva to accept the size of the object being mapped..

I think it would be cleaner to have macro like PHYS_SZ_IN_DMAP(pa, sz) which would check for [pa, pa+sz) belonging to the DMAPed region.

Wed, May 31, 5:23 PM

Tue, May 30

kib added a comment to D38459: timerfd: Add native support for Linux's timerfd.
In D38459#918467, @imp wrote:

I have code that automatically translates new system calls between host/target for bsd-user (though I'm not quite ready to commit it).
ioctl is possible, but has a lot more exceptional cases so is harder to do automatically. There's no automated annotation like there is for system calls.
The 'generic interfaces' require that I go and create annotations for each of the 'op codes' in that, because that doesn't exist in our current annotation.

So having a few extra system calls means they will be annotated and my job of getting it to work in bsd-user and others wanting to do automatic translation is easier.

Tue, May 30, 10:24 PM · linuxkpi, Linux Emulation
kib added a comment to D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing.
In D40281#918424, @des wrote:

You are now blocking SIGINT whenever dd is not performing primary I/O. I don't think that's right.

How the effects of that are different than the current code, where the ^C handler just set a flag and returns? If my code is not right there, then the current unmodified code is not right either. I believe the correctness relies on the fact that dd performs a cpu-bound processing between i/o syscalls.

Tue, May 30, 10:03 PM
kib committed rG1fc174cba6e0: open(2): fix typo (authored by kib).
open(2): fix typo
Tue, May 30, 9:20 AM
kib committed rG7a292504bad8: __acl_get_fd(2), __acl_aclcheck_fd(2): enable for O_PATH filedescriptors (authored by kib).
__acl_get_fd(2), __acl_aclcheck_fd(2): enable for O_PATH filedescriptors
Tue, May 30, 6:03 AM
kib closed D40318: __acl_*_fd(2) syscalls: enable for O_PATH filedescriptors.
Tue, May 30, 6:03 AM

Mon, May 29

kib committed rG8164032a495b: reapkill: handle possible pid reuse after the pid was recorded as signalled (authored by kib).
reapkill: handle possible pid reuse after the pid was recorded as signalled
Mon, May 29, 10:12 PM
kib committed rGea95173dbb3b: unr(9): document iterators (authored by kib).
unr(9): document iterators
Mon, May 29, 10:12 PM
kib committed rG12db3c914fe0: unr(9) iterator: add naive test (authored by kib).
unr(9) iterator: add naive test
Mon, May 29, 10:12 PM
kib committed rGc4cc0cab1ea6: unr(9): add 'show unrhdr_iter' command (authored by kib).
unr(9): add 'show unrhdr_iter' command
Mon, May 29, 10:12 PM
kib committed rGa014e0a3987a: unr(9): add iterator interface (authored by kib).
unr(9): add iterator interface
Mon, May 29, 10:12 PM
kib committed rGf386b27736fe: unr(9): add 'show unrhdr' ddb command (authored by kib).
unr(9): add 'show unrhdr' ddb command
Mon, May 29, 10:11 PM
kib committed rGf8c37080853c: unr(9): document clean_unrhdr() (authored by kib).
unr(9): document clean_unrhdr()
Mon, May 29, 10:11 PM
kib committed rGd44f477038d3: subr_unit.c: explain first/last special ranges (authored by kib).
subr_unit.c: explain first/last special ranges
Mon, May 29, 10:11 PM
kib committed rG042ec55f9df7: kern/subr_unit.c: some style (authored by kib).
kern/subr_unit.c: some style
Mon, May 29, 10:11 PM
kib committed rG36b1f8a81ef9: kern/subr_unit.c: more uses for is_bitmap() (authored by kib).
kern/subr_unit.c: more uses for is_bitmap()
Mon, May 29, 10:11 PM
kib closed D40089: reapkill: handle possible pid reuse after the pid was recorded as signalled.
Mon, May 29, 10:11 PM
kib committed rGcf85818e05a9: setkey(8): document NAT-T and NAT-T MTU extensions syntax (authored by kib).
setkey(8): document NAT-T and NAT-T MTU extensions syntax
Mon, May 29, 10:10 PM
kib committed rG2fa1b8617fdf: setkey(8): NAT-T manual configuration support (authored by kib).
setkey(8): NAT-T manual configuration support
Mon, May 29, 10:10 PM
kib committed rG2c1296a3c547: setkey(8): extract prefixlen calculation info helper (authored by kib).
setkey(8): extract prefixlen calculation info helper
Mon, May 29, 10:10 PM
kib closed D40300: setkey(8): NAT-T manual configuration support.
Mon, May 29, 10:10 PM
kib updated the diff for D40318: __acl_*_fd(2) syscalls: enable for O_PATH filedescriptors.
Mon, May 29, 6:39 PM
kib added a comment to D40318: __acl_*_fd(2) syscalls: enable for O_PATH filedescriptors.
In D40318#917981, @kib wrote:

__acl_delete_file(2) is not permitted in capability mode, so there is some difference. A sandboxed program might reasonably expect that an O_PATH fd cannot be used to modify the underlying file (though CAP_ACL_* rights exist for this as well).

I do not see why would a cap-mode process be disallowed from modifying/deleting ACLs if it was granted rights by an O_PATH descriptor.

I think it is preferable to try and maintain some consistency with respect to other file metadata syscalls, like the fstat/fchmod example I pointed out.

Mon, May 29, 6:38 PM
kib added a comment to D40318: __acl_*_fd(2) syscalls: enable for O_PATH filedescriptors.

Might be fchmod/fchown should work on O_PATH too, I am not sure.

Mon, May 29, 3:28 PM
kib added a comment to D40318: __acl_*_fd(2) syscalls: enable for O_PATH filedescriptors.

The change makes sense to me for get and perhaps aclcheck operations, but it seems quite surprising to permit ACL modifications using O_PATH descriptors. For instance, fstat(pathfd) can be used to find the mode, but fchmod(pathfd) is forbidden. Does samba really require this?

Mon, May 29, 3:27 PM
kib requested review of D40318: __acl_*_fd(2) syscalls: enable for O_PATH filedescriptors.
Mon, May 29, 3:12 PM
kib accepted D40312: avx_sig: Prepare to add arm64 neon test.
Mon, May 29, 9:54 AM
kib accepted D40309: avx_sig: Adapt avx_sig test for Aarch64.
Mon, May 29, 9:54 AM · arm64
kib accepted D40306: arm64 pmap: Make VM_PAGE_TO_PV_LIST_LOCK() a constant-time operation.
Mon, May 29, 8:14 AM
kib added a comment to D40300: setkey(8): NAT-T manual configuration support.
In D40300#917875, @ae wrote:

LGTM. Do you plan to implement NAT_T_FRAG in kernel somehow?

Mon, May 29, 8:09 AM
kib committed rG5b45cd83c44e: libthr rtld locks: do not leak URWLOCK_READ_WAITERS into child (authored by kib).
libthr rtld locks: do not leak URWLOCK_READ_WAITERS into child
Mon, May 29, 3:21 AM

Sun, May 28

kib accepted D40311: avx_sig: Print statistics by interval if ^T is not supported.
Sun, May 28, 8:11 PM
kib added inline comments to D40311: avx_sig: Print statistics by interval if ^T is not supported.
Sun, May 28, 7:49 PM
kib added a comment to D40311: avx_sig: Print statistics by interval if ^T is not supported.

IMO switching to print the stat unconditionally instead of doing it on SIGINFO is preferable then.

Sun, May 28, 5:02 PM
kib accepted D40310: avx_sig: Avoid libbsd dependecie for modern Glibc.

Is this really worth the complication with version check?

Sun, May 28, 5:00 PM
kib added a comment to D40309: avx_sig: Adapt avx_sig test for Aarch64.

There are no XMM regs on aarch64.

Sun, May 28, 4:56 PM · arm64

Sat, May 27

kib updated the diff for D40300: setkey(8): NAT-T manual configuration support.

Handle bz' comments.

Sat, May 27, 9:45 PM
kib added a comment to D40300: setkey(8): NAT-T manual configuration support.
In D40300#917678, @bz wrote:

Can you please add details (a proposed commit message) as that might shed light onto why you may think this is needed/useful?

Sat, May 27, 9:45 PM
kib requested review of D40300: setkey(8): NAT-T manual configuration support.
Sat, May 27, 6:10 AM

Fri, May 26

kib added a reviewer for D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing: cracauer.
Fri, May 26, 6:14 PM
kib updated the diff for D40089: reapkill: handle possible pid reuse after the pid was recorded as signalled.

Bug fixes.

  • Check for P2_WEXITED when deciding to skip the specific pid. Since P2_REAPKILLED is not set for such process, we might deadlock.

Several fixes for unr iterator implementation.

  • Do not use % to calculate the clipped bit index in the current bitmap, simply substract the upos_first_item idx.
  • Initialize upos_first_item for the first iteration where there is no compacted run at the beginning.
Fri, May 26, 5:01 PM
kib requested review of D40281: dd(1): neutralize SIGINT while non-async-signal safe code is executing.
Fri, May 26, 12:47 PM

Thu, May 25

kib accepted D40270: posixshmcontrol.1: Document posixshmcontrol create -l.
Thu, May 25, 8:52 PM
kib added inline comments to D40270: posixshmcontrol.1: Document posixshmcontrol create -l.
Thu, May 25, 6:50 PM

Wed, May 24

kib accepted D38933: namei: Add the abilty for the ABI to specify an alternate root path.
Wed, May 24, 5:54 AM · Linux Emulation

Tue, May 23

kib accepted D40228: Print registers on an arm64 spinlock data abort.
Tue, May 23, 9:37 AM