Page MenuHomeFreeBSD

bojan.novkovic_fer.hr (Bojan Novković)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 29 2022, 5:50 PM (97 w, 1 d)

Recent Activity

Thu, Nov 30

bojan.novkovic_fer.hr added a comment to D42405: vmm: refactor event reflection in AMD SVM.
In D42405#976891, @jhb wrote:

If you merge this first, then the breakpoint patch doesn't need 'handled = 0', right?

Thu, Nov 30, 4:06 PM
bojan.novkovic_fer.hr added inline comments to D42296: vmm: implement single-stepping for AMD CPUs.
Thu, Nov 30, 4:05 PM · bhyve
bojan.novkovic_fer.hr updated the diff for D42296: vmm: implement single-stepping for AMD CPUs.

Address @jhb 's comments.

Thu, Nov 30, 4:02 PM · bhyve

Wed, Nov 29

bojan.novkovic_fer.hr added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

One other open issue that we didn't discuss much yet is what to do on 32-bit systems. Since the kernel virtual address space is much more limited there, it perhaps (probably?) doesn't make much sense to change the existing scheme. This is especially true if we start trying to align virtual mappings of stacks as Alan suggests.

Given the recent decision to deprecate and potentially remove support for 32-bit systems with 15.0, do you think that this is still an issue we should address?

Yes - the actual removal of 32-bit kernels isn't going to happen anytime soon. 15.0 is two years out, and it's not entirely clear to me that we're ready to remove 32-bit ARM support.

But, can't we handle this simply by making vm_kstack_pindex() use the old KVA<->pindex mapping scheme if _ILP32 is defined?

Wed, Nov 29, 7:43 PM
bojan.novkovic_fer.hr updated the diff for D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Address @markj 's comments:

  • multiline comment style fixes
  • use old mapping scheme on 32-bit systems
Wed, Nov 29, 7:40 PM
bojan.novkovic_fer.hr added inline comments to D42296: vmm: implement single-stepping for AMD CPUs.
Wed, Nov 29, 4:11 PM · bhyve

Mon, Nov 27

bojan.novkovic_fer.hr added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

One other open issue that we didn't discuss much yet is what to do on 32-bit systems. Since the kernel virtual address space is much more limited there, it perhaps (probably?) doesn't make much sense to change the existing scheme. This is especially true if we start trying to align virtual mappings of stacks as Alan suggests.

Mon, Nov 27, 6:25 PM
bojan.novkovic_fer.hr updated the diff for D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Address @alc 's comments.

Mon, Nov 27, 6:16 PM

Mon, Nov 13

bojan.novkovic_fer.hr updated the diff for D42564: tty: properly check character position when handling IUTF8 backspaces.

Upload diff with full context.

Mon, Nov 13, 5:57 PM
bojan.novkovic_fer.hr updated the summary of D42564: tty: properly check character position when handling IUTF8 backspaces.
Mon, Nov 13, 5:23 PM
bojan.novkovic_fer.hr requested review of D42564: tty: properly check character position when handling IUTF8 backspaces.
Mon, Nov 13, 4:49 PM

Nov 8 2023

bojan.novkovic_fer.hr updated the summary of D42517: vm_fault: revert D19670.
Nov 8 2023, 8:22 PM
bojan.novkovic_fer.hr added a comment to D41633: riscv pmap: allocate leaf page table page for wired userspace superpages.

Would you like to do the honours of reverting the vm_fault change? :)

Nov 8 2023, 8:18 PM
bojan.novkovic_fer.hr requested review of D42517: vm_fault: revert D19670.
Nov 8 2023, 8:17 PM

Nov 7 2023

bojan.novkovic_fer.hr added a comment to D41633: riscv pmap: allocate leaf page table page for wired userspace superpages.

Sorry for the delayed reply. The above-mentioned riscv pmap commits are in main now - @bojan.novkovic_fer.hr would it be possible to rebase on top of that? Then I can commit this patch, and we can finally revert D19670.

Nov 7 2023, 6:16 PM
bojan.novkovic_fer.hr updated the diff for D41633: riscv pmap: allocate leaf page table page for wired userspace superpages.

Rebased the patch.

Nov 7 2023, 6:14 PM

Oct 30 2023

bojan.novkovic_fer.hr added inline comments to D42298: bhyve: refactor gdbstub to enable single-stepping on AMD CPUs.
Oct 30 2023, 5:25 PM · bhyve
bojan.novkovic_fer.hr requested review of D42406: bhyve: fix invalid argument in a GDB stub debug printf statement.
Oct 30 2023, 5:24 PM
bojan.novkovic_fer.hr added inline comments to D42298: bhyve: refactor gdbstub to enable single-stepping on AMD CPUs.
Oct 30 2023, 5:16 PM · bhyve
bojan.novkovic_fer.hr updated the diff for D42298: bhyve: refactor gdbstub to enable single-stepping on AMD CPUs.

Address @corvink 's comments.

Oct 30 2023, 5:11 PM · bhyve
bojan.novkovic_fer.hr added inline comments to D42296: vmm: implement single-stepping for AMD CPUs.
Oct 30 2023, 5:05 PM · bhyve
bojan.novkovic_fer.hr updated the diff for D42296: vmm: implement single-stepping for AMD CPUs.

Address @corvink 's comments.

Oct 30 2023, 5:04 PM · bhyve
bojan.novkovic_fer.hr updated the diff for D42295: vmm: enable software breakpoints for AMD CPUs.

Address @corvink's comments, unrelated exception reflection change was split into its own patch (D42405), updated commit message to be more clear.

Oct 30 2023, 4:57 PM · bhyve
bojan.novkovic_fer.hr added a reviewer for D42405: vmm: refactor event reflection in AMD SVM: corvink.
Oct 30 2023, 4:57 PM
bojan.novkovic_fer.hr updated the summary of D42405: vmm: refactor event reflection in AMD SVM.
Oct 30 2023, 4:56 PM
bojan.novkovic_fer.hr requested review of D42405: vmm: refactor event reflection in AMD SVM.
Oct 30 2023, 4:56 PM

Oct 26 2023

bojan.novkovic_fer.hr added a comment to D40772: Tentative physical memory compaction.

Note this became more important since we have ASLR turned on for 64 bit processes since 13.2-RELEASE. And ASLR adds great deal of fragmentation. It leads to significant performance degradation over long run due to superpages becoming unusable due memory fragmentation.

Oct 26 2023, 7:36 PM

Oct 19 2023

bojan.novkovic_fer.hr updated the test plan for D42296: vmm: implement single-stepping for AMD CPUs.
Oct 19 2023, 4:13 PM · bhyve
bojan.novkovic_fer.hr retitled D42295: vmm: enable software breakpoints for AMD CPUs from vmm: enable software breakpoints for AMD SVM to vmm: enable software breakpoints for AMD CPUs.
Oct 19 2023, 4:05 PM · bhyve
bojan.novkovic_fer.hr requested review of D42299: vmm: implement VM_CAP_MASK_HWINTR on AMD CPUs.
Oct 19 2023, 4:05 PM · bhyve
bojan.novkovic_fer.hr requested review of D42298: bhyve: refactor gdbstub to enable single-stepping on AMD CPUs.
Oct 19 2023, 4:01 PM · bhyve
bojan.novkovic_fer.hr requested review of D42296: vmm: implement single-stepping for AMD CPUs.
Oct 19 2023, 3:56 PM · bhyve
bojan.novkovic_fer.hr requested review of D42295: vmm: enable software breakpoints for AMD CPUs.
Oct 19 2023, 3:41 PM · bhyve

Oct 12 2023

bojan.novkovic_fer.hr accepted D42164: teken: fix style in teken_wcwidth.h.

LGTM.

Oct 12 2023, 2:58 PM

Oct 11 2023

bojan.novkovic_fer.hr updated the diff for D42147: tty/teken: fix UTF8 sequence validation logic .

Fix formatting for multiline comment in teken_utf8_bytes_to_codepoint.

Oct 11 2023, 6:57 PM
bojan.novkovic_fer.hr updated the diff for D42147: tty/teken: fix UTF8 sequence validation logic .

Address @christos 's comments.

  • Add more detailed explanation of the use of __builtin_clz

Other fixes:

  • Codepoint calculation for two-byte sequences was missing one bit in the mask used for the leading character, fixed now
  • ttydisc_rubchar now falls back to non-UTF8 behaviour if teken_wcwidth returns an error
Oct 11 2023, 6:51 PM

Oct 10 2023

bojan.novkovic_fer.hr requested review of D42147: tty/teken: fix UTF8 sequence validation logic .
Oct 10 2023, 5:56 PM

Oct 7 2023

bojan.novkovic_fer.hr added a comment to D42067: tty: fix improper backspace behaviour for UTF8 characters when in canonical mode.

Tested both patches and they seem to run without problems. Is there a reason we don't want the IUTF8 flag to be set by default? At least in my opinion, backspacing UTF-8 characters is common enough that this should be a "builtin" feature, instead of having to run stty iutf8 in a startup script or do it manually. That being said, I am not exactly aware of the side effects (if any) this could have.

Oct 7 2023, 4:31 PM
bojan.novkovic_fer.hr added a comment to D42066: (s)tty: add support for IUTF8 input flag.

I've updated the manpages for stty and termios and moved IUTF8 behind __BSD_VISIBLE.

Oct 7 2023, 4:27 PM
bojan.novkovic_fer.hr updated the diff for D42066: (s)tty: add support for IUTF8 input flag.

Address @imp 's and @christos 's comments.

Oct 7 2023, 4:26 PM

Oct 6 2023

bojan.novkovic_fer.hr added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Quick update: I've tested the patch with different numbers of kstack guard pages (1-4) and encountered no issues.
Each run consisted of running the test suite and a rebuild of the whole kernel.

Oct 6 2023, 7:12 PM
bojan.novkovic_fer.hr added a comment to F68370328: kstack_pindex_formula.png.

I have, there are no duplicates for 1-4 guard pages.
I also think that duplicates are mathematically impossible in this case, since this function is bijective for each value in its domain.
Its domain, however is not contiguous.
I've whipped up a quick graph for the first few kvas {F68913014}.

Oct 6 2023, 7:08 PM

Oct 5 2023

bojan.novkovic_fer.hr added inline comments to D42066: (s)tty: add support for IUTF8 input flag.
Oct 5 2023, 7:24 PM
bojan.novkovic_fer.hr added inline comments to D42067: tty: fix improper backspace behaviour for UTF8 characters when in canonical mode.
Oct 5 2023, 7:14 PM
bojan.novkovic_fer.hr updated the diff for D42067: tty: fix improper backspace behaviour for UTF8 characters when in canonical mode.

Address @christos 's comments - properly handle zero width characters.

Oct 5 2023, 7:03 PM

Oct 3 2023

bojan.novkovic_fer.hr requested review of D42067: tty: fix improper backspace behaviour for UTF8 characters when in canonical mode.
Oct 3 2023, 5:12 PM
bojan.novkovic_fer.hr requested review of D42066: (s)tty: add support for IUTF8 input flag.
Oct 3 2023, 4:50 PM

Oct 1 2023

bojan.novkovic_fer.hr added a comment to D41635: i386 pmap: allocate leaf page table page for wired userspace superpages.

@markj I tried the new mlock superpage test case, the patch didn't cause a panic.

Oct 1 2023, 6:44 PM
bojan.novkovic_fer.hr added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

I've updated the diff to work with an arbitrary number of guard pages but I didn't have time to test this with different guard page configurations - I'll do this in the coming days and report back.
The formula has been slightly reworked to account for the direction of stack growth (+ 1 to the result of lin_pindex(kva) / kstack_size and different condition for detecting guard pages).

Oct 1 2023, 6:36 PM
bojan.novkovic_fer.hr updated the diff for D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Address @kib 's and @alc 's comments.

Oct 1 2023, 6:32 PM
bojan.novkovic_fer.hr attached a referenced file: F68370328: kstack_pindex_formula.png.
Oct 1 2023, 5:12 PM

Sep 27 2023

bojan.novkovic_fer.hr added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
In D38852#956753, @kib wrote:

So what is the main purpose of this change? To get linear, without gaps, pindexes for the kernel stack obj?

Sep 27 2023, 7:59 PM
bojan.novkovic_fer.hr added a comment to D41635: i386 pmap: allocate leaf page table page for wired userspace superpages.
In D41635#957353, @alc wrote:

I've just committed 902ed64fecbe which eliminates the need for zeroing the PTP and the possibility of an assertion failure if you pass the same arguments to pmap_insert_pt_page() as you did on amd64. pmap_insert_pt_page() now has the needed extra argument.

Sep 27 2023, 5:42 PM
bojan.novkovic_fer.hr updated the diff for D41635: i386 pmap: allocate leaf page table page for wired userspace superpages.

Address @alc 's comments.

Sep 27 2023, 5:38 PM

Sep 22 2023

bojan.novkovic_fer.hr updated the summary of D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Sep 22 2023, 3:41 PM

Sep 20 2023

bojan.novkovic_fer.hr updated the diff for D41635: i386 pmap: allocate leaf page table page for wired userspace superpages.

Address @alc 's comments.

Sep 20 2023, 6:38 PM
bojan.novkovic_fer.hr added inline comments to D37899: ddb: Add basic CTF support [2/2].
Sep 20 2023, 6:36 PM
bojan.novkovic_fer.hr updated the diff for D37899: ddb: Add basic CTF support [2/2].

Address @markj 's comments.

Sep 20 2023, 6:34 PM

Sep 17 2023

bojan.novkovic_fer.hr added inline comments to D41635: i386 pmap: allocate leaf page table page for wired userspace superpages.
Sep 17 2023, 10:03 PM
bojan.novkovic_fer.hr updated the diff for D41635: i386 pmap: allocate leaf page table page for wired userspace superpages.

Address @markj 's comments.

Sep 17 2023, 10:02 PM

Sep 16 2023

bojan.novkovic_fer.hr added reviewers for D41635: i386 pmap: allocate leaf page table page for wired userspace superpages: kib, alc.
Sep 16 2023, 4:45 PM
bojan.novkovic_fer.hr added reviewers for D41634: arm64 pmap: allocate leaf page table page for wired userspace superpages: kib, alc.
Sep 16 2023, 4:45 PM
bojan.novkovic_fer.hr added reviewers for D41633: riscv pmap: allocate leaf page table page for wired userspace superpages: kib, alc.
Sep 16 2023, 4:44 PM

Aug 29 2023

bojan.novkovic_fer.hr requested review of D41635: i386 pmap: allocate leaf page table page for wired userspace superpages.
Aug 29 2023, 2:27 PM
bojan.novkovic_fer.hr requested review of D41634: arm64 pmap: allocate leaf page table page for wired userspace superpages.
Aug 29 2023, 2:24 PM
bojan.novkovic_fer.hr requested review of D41633: riscv pmap: allocate leaf page table page for wired userspace superpages.
Aug 29 2023, 2:21 PM

Aug 15 2023

bojan.novkovic_fer.hr updated the diff for D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.

Address @alc 's comments.

Aug 15 2023, 2:58 PM

Aug 8 2023

bojan.novkovic_fer.hr updated the diff for D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.

Address @alc 's comments:

  • Defer PTE initialization until demotion
  • Rearrange code to simplify error handling
Aug 8 2023, 5:44 PM

Jul 26 2023

bojan.novkovic_fer.hr updated the diff for D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.

Address @kib 's comments - remove pde pv entry upon leaf ptpage insertion or allocation failure, defer setting PGA_WRITEABLE for constituent pages.

Jul 26 2023, 3:52 PM

Jul 24 2023

bojan.novkovic_fer.hr added inline comments to D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.
Jul 24 2023, 6:18 PM

Jul 21 2023

bojan.novkovic_fer.hr added inline comments to D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.
Jul 21 2023, 7:00 PM
bojan.novkovic_fer.hr updated the diff for D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.

Address @kib 's comment, free pagetable page when insertion fails.

Jul 21 2023, 6:58 PM
bojan.novkovic_fer.hr added inline comments to D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.
Jul 21 2023, 5:35 PM
bojan.novkovic_fer.hr updated the diff for D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.

Address @kib 's comments.

Jul 21 2023, 5:35 PM
bojan.novkovic_fer.hr attached a referenced file: F64738585: wirekmod.tar.gz.
Jul 21 2023, 3:22 PM
bojan.novkovic_fer.hr attached a referenced file: F64748674: ktrace.out.
Jul 21 2023, 3:22 PM
bojan.novkovic_fer.hr added a comment to D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.

The C repros generated by syzkaller no longer trigger this panic

hmm, that is surprising. Could you share the program and output from ktrace -tcf ./repro?

Jul 21 2023, 3:22 PM
bojan.novkovic_fer.hr updated the diff for D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.

Address @markj 's comments/

Jul 21 2023, 3:16 PM
bojan.novkovic_fer.hr requested review of D41132: amd64 pmap: allocate leaf page table page for wired userspace 2M pages.
Jul 21 2023, 11:36 AM

Jun 27 2023

bojan.novkovic_fer.hr requested review of D40772: Tentative physical memory compaction.
Jun 27 2023, 2:42 PM

Jun 21 2023

bojan.novkovic_fer.hr updated the diff for D40575: Implement the Free Memory Fragmentation Index (FMFI) metric.

Handle possible divide-by-zero exception when info.free_blocks is 0.

Jun 21 2023, 2:41 PM

Jun 16 2023

bojan.novkovic_fer.hr requested review of D40575: Implement the Free Memory Fragmentation Index (FMFI) metric.
Jun 16 2023, 7:36 AM

Jun 14 2023

bojan.novkovic_fer.hr updated the summary of D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Jun 14 2023, 3:59 PM
bojan.novkovic_fer.hr updated the summary of D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Jun 14 2023, 3:43 PM
bojan.novkovic_fer.hr updated the summary of D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Jun 14 2023, 3:42 PM
bojan.novkovic_fer.hr updated the diff for D37899: ddb: Add basic CTF support [2/2].

I've changed the way the db_ctf subsystem registers kernel CTF data - it will now use preload_search_by_type during ddb initialization check if the loader loaded the file containing raw kernel CTF data. I've also added an extra code to copy kernel CTF data info from ddb into linker_kernel_file upon KLD initialization.

Jun 14 2023, 3:40 PM
bojan.novkovic_fer.hr updated the diff for D37898: ddb: Add basic CTF support [1/2].

I've changed to use the loader for registering kernel CTF data instead of the previous double-linking approach. The idea is that the user can opt-in to loading raw kernel CTF data using loader.conf as follows:

ddb_kctf_load="YES"
ddb_kctf_name="/boot/kernel/kctf.raw"
ddb_kctf_type="ddb_kctf"

The data gets picked up by ddb during early boot.
The changes to the build files make sure that the merged CTF data is uncompressed and dumped into the kctf.raw file. I am not sure if these changes follow proper procedure for installing non-module files, but I would be glad to rework them if necessary.

Jun 14 2023, 3:22 PM

May 8 2023

bojan.novkovic_fer.hr added a comment to D39949: bhyve: Fix vCPU single-stepping on VMX .
In D39949#910921, @jhb wrote:

It would be good to update the commit log now to reflect the new status? This does seem like a fairly nice fix and much nicer than the other approaches I had considered.

May 8 2023, 7:10 PM
bojan.novkovic_fer.hr updated the diff for D39949: bhyve: Fix vCPU single-stepping on VMX .

Remove stray whitespace, change commit message to reflect new changes.

May 8 2023, 7:07 PM

May 5 2023

bojan.novkovic_fer.hr added a comment to D35826: [GSoC 2022] bhyve debug server enhancements.

This is a quite large patch. Could it be split into multiple ones to simplify reviewing and merging?

May 5 2023, 7:13 PM · bhyve
bojan.novkovic_fer.hr added a comment to D39949: bhyve: Fix vCPU single-stepping on VMX .
May 5 2023, 7:04 PM
bojan.novkovic_fer.hr updated the diff for D39949: bhyve: Fix vCPU single-stepping on VMX .

Address @corvink 's comments.

May 5 2023, 6:53 PM

May 3 2023

bojan.novkovic_fer.hr requested review of D39949: bhyve: Fix vCPU single-stepping on VMX .
May 3 2023, 3:24 PM

Mar 16 2023

bojan.novkovic_fer.hr added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

One way to handle this is to have a KVA arena per NUMA domain. This is how kmem_malloc() and friends in vm_kern.c are implemented. They use vm_domainset_iter_ to select a domain from the domainset, then use that domain to 1) select the arena for a KVA allocation, 2) select the source domain for physical pages. I think this approach could work for kstacks as well. I'd just create an array of MAXMEMDOM vmem arena pointers, then at boot time allocate an arena per NUMA domain. Each arena would import from the main kernel arena, just like the kstack arena does now. What do you think?

Mar 16 2023, 7:32 PM
bojan.novkovic_fer.hr updated the diff for D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Address @markj 's comments - per-domain kstack arenas + KVA import size adjustment

Mar 16 2023, 7:20 PM

Mar 11 2023

bojan.novkovic_fer.hr added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Does that work, or am I missing something?

The problem with this is that it still leaves holes in the pindex space, just fewer, larger, holes.

Mar 11 2023, 8:58 PM
bojan.novkovic_fer.hr updated the diff for D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Address @markj 's comments, additional kstack object for non-standard kstack sizes.

Mar 11 2023, 8:34 PM

Mar 3 2023

bojan.novkovic_fer.hr added inline comments to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Mar 3 2023, 9:02 PM
bojan.novkovic_fer.hr updated the diff for D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Move changes to vm_glue.c.

Mar 3 2023, 9:00 PM
bojan.novkovic_fer.hr added inline comments to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Mar 3 2023, 2:34 PM