jhb (John Baldwin)
User

Projects (7)

User Details

User Since
Mar 11 2014, 8:46 PM (201 w, 4 d)

Recent Activity

Fri, Jan 19

jhb committed rP459387: Update mdb port with various fixes..
Update mdb port with various fixes.
Fri, Jan 19, 1:39 AM
jhb closed D13976: Update mdb port with various fixes..
Fri, Jan 19, 1:39 AM
jhb committed rS328158: Recognize mchk_calltrap as a trapframe generator..
Recognize mchk_calltrap as a trapframe generator.
Fri, Jan 19, 1:36 AM
jhb created D13977: KGDB fixes for amd64 and aarch64..
Fri, Jan 19, 1:27 AM
jhb created D13976: Update mdb port with various fixes..
Fri, Jan 19, 1:18 AM

Thu, Jan 18

jhb committed rS328157: Use a dedicated per-CPU stack for machine check exceptions..
Use a dedicated per-CPU stack for machine check exceptions.
Thu, Jan 18, 11:50 PM
This revision was not accepted when it landed; it landed in state Needs Review.
Thu, Jan 18, 11:50 PM
jhb updated the diff for D13962: Use a dedicated per-CPU stack for machine check exceptions..
  • Rebase.
Thu, Jan 18, 11:41 PM
jhb added a comment to D13892: Record ticks in td_swvoltick after sched_switch() returns.

I think should_yield is pretty broken regardless of this change. I think the idea is to demote to PRI_USER if the thread has been running for more than hogticks without yielding the CPU. Rather than using 'ticks' which counts walltime and not CPU time, I wonder if it would be better to have a 'td_swvoltime' (for lack of a better name) which is set to 'td_runtime' in the SW_VOL case and left alone in the SW_INVOL case. To check for a 'hog' you would do something like:

Thu, Jan 18, 11:23 PM
jhb committed rS328153: Remove two no-longer-used labels from the NMI interrupt handler..
Remove two no-longer-used labels from the NMI interrupt handler.
Thu, Jan 18, 10:14 PM
jhb accepted D13975: Add info about c99 designationed initializers..
Thu, Jan 18, 9:34 PM
jhb committed rS328135: Adjust branch target in NMI handler for the !PTI case..
Adjust branch target in NMI handler for the !PTI case.
Thu, Jan 18, 8:12 PM
jhb committed rS328134: Update various statements in vmstat(8) to match reality..
Update various statements in vmstat(8) to match reality.
Thu, Jan 18, 7:43 PM
jhb closed D13905: Update various statements in vmstat(8) to match reality..
Thu, Jan 18, 7:43 PM
jhb updated the diff for D13905: Update various statements in vmstat(8) to match reality..

More tweaks to active.

Thu, Jan 18, 5:50 PM
jhb added a comment to D13962: Use a dedicated per-CPU stack for machine check exceptions..
In D13962#293078, @avg wrote:

Another report with a slightly more relevant stack trace.
Turns out that there is another interesting bit, NbMcaToMstCpuEn (NB machine check errors to master CPU only).

Thu, Jan 18, 5:14 PM
jhb added inline comments to D13905: Update various statements in vmstat(8) to match reality..
Thu, Jan 18, 4:58 PM
jhb updated the diff for D13905: Update various statements in vmstat(8) to match reality..
  • Use 'mapped' instead of 'active'.
Thu, Jan 18, 4:56 PM
jhb updated the diff for D13962: Use a dedicated per-CPU stack for machine check exceptions..
  • Add MC# stacks to mini-kernel map for PTI.
  • Adjust 1 label so we always load curpcb.
  • Don't save FS/GS bases for MC#.
  • Remove labels not used since r190620.
Thu, Jan 18, 4:52 PM
jhb added inline comments to D13962: Use a dedicated per-CPU stack for machine check exceptions..
Thu, Jan 18, 4:42 PM
jhb committed rS328104: Adjust format string to fix build..
Adjust format string to fix build.
Thu, Jan 18, 12:24 AM
jhb committed rS328103: Tidy some whitespace..
Tidy some whitespace.
Thu, Jan 18, 12:23 AM

Wed, Jan 17

jhb created D13962: Use a dedicated per-CPU stack for machine check exceptions..
Wed, Jan 17, 11:24 PM
This revision was not accepted when it landed; it landed in state Needs Review.
Wed, Jan 17, 11:11 PM
jhb committed rS328102: Save and restore guest debug registers..
Save and restore guest debug registers.
Wed, Jan 17, 11:11 PM
jhb closed D13934: Use long for the last argument to VOP_PATHCONF rather than a register_t..

Committed in rS328099.

Wed, Jan 17, 10:54 PM
jhb committed rS328101: Require the SHF_ALLOC flag for program sections from kernel object modules..
Require the SHF_ALLOC flag for program sections from kernel object modules.
Wed, Jan 17, 10:52 PM
jhb closed D13926: Require the SHF_ALLOC flag for program sections from kernel object modules..
Wed, Jan 17, 10:52 PM
jhb added inline comments to D13928: Move per-operation data out of the csession structure..
Wed, Jan 17, 10:41 PM
jhb committed rS328099: Use long for the last argument to VOP_PATHCONF rather than a register_t..
Use long for the last argument to VOP_PATHCONF rather than a register_t.
Wed, Jan 17, 10:37 PM
jhb added a comment to D13926: Require the SHF_ALLOC flag for program sections from kernel object modules..

I attempted to update the comment a bit to not claim that there is only one correct way, but that mapping ELF objects directly is a grey area. I still prefer the approach in the patch, but hopefully the message is now more accurate?

Wed, Jan 17, 10:33 PM
jhb updated the summary of D13926: Require the SHF_ALLOC flag for program sections from kernel object modules..
Wed, Jan 17, 10:31 PM
jhb added a comment to D13926: Require the SHF_ALLOC flag for program sections from kernel object modules..
In D13926#292681, @kib wrote:
In D13926#292633, @jhb wrote:

Fighting against what ELF intends doesn't really seem useful.

ELF intent was that .o are only used as an input to the static linker. If gdb or lldb accept .o as the image, they should also accept that there is no layout of sections yet.

Wed, Jan 17, 7:59 PM
jhb updated the diff for D13905: Update various statements in vmstat(8) to match reality..
  • Further tweaking and update similarly stale comments in the vmmeter header.
Wed, Jan 17, 6:53 PM
jhb added inline comments to D13905: Update various statements in vmstat(8) to match reality..
Wed, Jan 17, 6:49 PM
jhb added inline comments to D13945: Give ELF brands a chance to veto a match based on just the interpreter..
Wed, Jan 17, 6:25 PM
jhb added a reviewer for D13926: Require the SHF_ALLOC flag for program sections from kernel object modules.: markj.
Wed, Jan 17, 6:15 PM
jhb added a comment to D13926: Require the SHF_ALLOC flag for program sections from kernel object modules..
In D13926#292526, @kib wrote:

I think that this change does not affect correctness of the loader and kernel linkers code. I mean that, in my opinion, it is fine to either load or not load the non-allocatable sections. More, it is fine to introduce arbitrary inter-section gaps between the sections, because compiler or assembler cannot know the final linking layout of the resulting executable or shared object, so they must provide enough relocations to make the linking result correct. From this PoV, presence of the non-allocatable sections between progbits is just a gap.

Wed, Jan 17, 6:15 PM
jhb created D13945: Give ELF brands a chance to veto a match based on just the interpreter..
Wed, Jan 17, 12:22 AM

Tue, Jan 16

jhb accepted D13936: Use ln -n instead of -h to allow building the kernel on Linux.

Possibly s/understood/supported/ in the commit message, but that's a minor nit.

Tue, Jan 16, 8:47 PM
jhb updated the diff for D13926: Require the SHF_ALLOC flag for program sections from kernel object modules..
  • Don't setup progtab entries for sections not loaded by the loader.
Tue, Jan 16, 8:12 PM
jhb closed D13927: Split crp_buf into a union..
Tue, Jan 16, 7:41 PM
jhb committed rS328057: Split crp_buf into a union..
Split crp_buf into a union.
Tue, Jan 16, 7:41 PM
jhb added a comment to D13927: Split crp_buf into a union..

Yes, though we already use anonymous unions in the tree now (e.g. struct mbuf uses them).

Tue, Jan 16, 7:39 PM
jhb created D13934: Use long for the last argument to VOP_PATHCONF rather than a register_t..
Tue, Jan 16, 7:01 PM
jhb added a comment to D13926: Require the SHF_ALLOC flag for program sections from kernel object modules..

I think this is fine. Do you want to handle the case in ​link_elf_link_preload too?

Tue, Jan 16, 6:45 PM
jhb committed rS328037: Rename 'recv' to 'receive' to appease shadow warnings from GCC..
Rename 'recv' to 'receive' to appease shadow warnings from GCC.
Tue, Jan 16, 1:21 AM
jhb added a comment to D13875: Switch to 16-byte stack alignment on N32 and N64..

I'm not quite sure what you would like to do for makecontext. It is already using the right value (16 for newabi), but I don't know if it's really safe to expose STACK_ALIGN to userland (perhaps I can include <machine/md_var.h> to get it in this file?) If the comment is really stale and there is no gap for newabi, then I don't think we can collapse the #ifdef's down any further in makecontext() aside from perhaps using STACK_ALIGN.

Tue, Jan 16, 1:18 AM
jhb updated the diff for D13875: Switch to 16-byte stack alignment on N32 and N64..
  • Use STACK_ALIGN in cpu_set_upcall() as well.
  • Update comments in __makecontext().
Tue, Jan 16, 1:11 AM
jhb committed rS328036: Check for GCC first rather than clang in the MIPS lib32 rules..
Check for GCC first rather than clang in the MIPS lib32 rules.
Tue, Jan 16, 1:05 AM
jhb created D13928: Move per-operation data out of the csession structure..
Tue, Jan 16, 12:59 AM
jhb created D13927: Split crp_buf into a union..
Tue, Jan 16, 12:55 AM
jhb committed rS328035: Sort the list of flags in newsyslog.conf entries..
Sort the list of flags in newsyslog.conf entries.
Tue, Jan 16, 12:48 AM
jhb closed D13904: Sort the list of flags in newsyslog.conf entries..
Tue, Jan 16, 12:48 AM

Mon, Jan 15

jhb created D13926: Require the SHF_ALLOC flag for program sections from kernel object modules..
Mon, Jan 15, 11:56 PM

Sun, Jan 14

jhb created D13905: Update various statements in vmstat(8) to match reality..
Sun, Jan 14, 2:22 AM
jhb created D13904: Sort the list of flags in newsyslog.conf entries..
Sun, Jan 14, 2:15 AM

Fri, Jan 12

jhb added a comment to D7338: Disconnect objdump from the build.

Is llvm-objdump far enough along to implement the functionality needed by ports?

Fri, Jan 12, 5:17 PM

Thu, Jan 11

jhb added a comment to D13229: Save and restore guest debug registers..
In D13229#290786, @avg wrote:
In D13229#290619, @jhb wrote:

Ah, on VT-x the save/restore of DR7 was conditional (and the changes to VT-x turn it on). It sounds like for SVM DR6 and DR7 are saved and restored unconditionally and the dirty bit is just a way to let SVM know that the saved value in the VMCB was changed by the VMM?

That is my understanding of how the cache bits work.
More details are in section 15.15 of AMD64 Architecture Programmer’s Manual Volume 2: System Programming.

Thu, Jan 11, 10:53 PM
jhb created D13875: Switch to 16-byte stack alignment on N32 and N64..
Thu, Jan 11, 7:52 PM
jhb created D13874: Don't include long double routines on architectures with small long double..
Thu, Jan 11, 7:51 PM
jhb committed rS327841: Allow MIPS lib32 to build with clang..
Allow MIPS lib32 to build with clang.
Thu, Jan 11, 7:25 PM
jhb committed rS327839: Change the type of 'crp_opaque' from caddr_t to void *..
Change the type of 'crp_opaque' from caddr_t to void *.
Thu, Jan 11, 6:09 PM
jhb closed D13848: Change the type of 'crp_opaque' from caddr_t to void *..
Thu, Jan 11, 6:09 PM
jhb committed rS327838: Axe tmp_iv from the cryptodev session structure..
Axe tmp_iv from the cryptodev session structure.
Thu, Jan 11, 6:07 PM
jhb closed D13847: Axe tmp_iv..
Thu, Jan 11, 6:07 PM
jhb added a comment to D13229: Save and restore guest debug registers..
In D13229#290456, @avg wrote:
In D13229#290214, @jhb wrote:

But I'm glad that I don't seem to have broken anything for SVM. Can someone confirm that setting "DR" in the VMCB cache flags is correct (i.e. equivalent to the VT-x changes)?

As I understand, the meaning of that bit is that the guest's DR6 and DR7 have not changed between the previous #VMEXIT and the current VMRUN.
If that holds true, then the use of the bit is correct :-)

Thu, Jan 11, 5:53 PM
jhb added a comment to D13847: Axe tmp_iv..

crd_iv is only used after the copyin() if it succeeds. It shouldn't have any different data as a result of this change once a request is submitted to the driver.

Thu, Jan 11, 5:48 PM
jhb created D13848: Change the type of 'crp_opaque' from caddr_t to void *..
Thu, Jan 11, 12:29 AM
jhb created D13847: Axe tmp_iv..
Thu, Jan 11, 12:25 AM
jhb committed rS327803: Flesh out static dtrace probes for /dev/crypto ioctl errors..
Flesh out static dtrace probes for /dev/crypto ioctl errors.
Thu, Jan 11, 12:22 AM

Wed, Jan 10

jhb added a comment to D13229: Save and restore guest debug registers..

I am a bit surprised it worked fine without the patch. Perhaps if you used watchpoints both outside and inside at the same time you might get some inconsistent results? But I'm glad that I don't seem to have broken anything for SVM. Can someone confirm that setting "DR" in the VMCB cache flags is correct (i.e. equivalent to the VT-x changes)?

Wed, Jan 10, 10:28 PM
jhb accepted D13838: Implement ifunc support for x86, use it to enable SMAP on amd64..

In general this looks ok to me. As we discussed on IRC I think it would be useful to split up into multiple commits. (e.g. ifunc, fpu/npx usage, pmap usage, fast_syscall changes that don't use SMAP (remove cld and shared function), and then SMAP itself).

Wed, Jan 10, 9:48 PM
jhb committed rS327792: Don't store shadow copies of per-process AIO limits..
Don't store shadow copies of per-process AIO limits.
Wed, Jan 10, 9:19 PM
jhb closed D13819: Don't store shadow copies of per-process AIO limits..
Wed, Jan 10, 9:19 PM
jhb added inline comments to D13819: Don't store shadow copies of per-process AIO limits..
Wed, Jan 10, 9:16 PM
jhb updated the diff for D13819: Don't store shadow copies of per-process AIO limits..
  • Drop stale comments.
Wed, Jan 10, 9:11 PM
jhb committed rS327790: Set the 'FR' bit in the status register for N32 kernels..
Set the 'FR' bit in the status register for N32 kernels.
Wed, Jan 10, 9:09 PM
jhb closed D13830: Set the 'FR' bit in the status register for N32 kernels..
Wed, Jan 10, 9:09 PM
jhb created D13830: Set the 'FR' bit in the status register for N32 kernels..
Wed, Jan 10, 7:43 PM
jhb committed rS327776: Include ffsll() on riscv kernels..
Include ffsll() on riscv kernels.
Wed, Jan 10, 5:36 PM
jhb added a reviewer for D13819: Don't store shadow copies of per-process AIO limits.: asomers.
Wed, Jan 10, 1:23 AM
jhb created D13819: Don't store shadow copies of per-process AIO limits..
Wed, Jan 10, 1:23 AM
jhb committed rS327755: Allow the fast-path for disk AIO requests to fail requests..
Allow the fast-path for disk AIO requests to fail requests.
Wed, Jan 10, 12:19 AM
jhb committed rS327753: Simplify some logic by merging an if test with a subsequent switch..
Simplify some logic by merging an if test with a subsequent switch.
Wed, Jan 10, 12:02 AM

Tue, Jan 9

jhb committed rS327752: Add a counter to track in-flight AIO requests using unmapped I/O..
Add a counter to track in-flight AIO requests using unmapped I/O.
Tue, Jan 9, 11:57 PM
jhb accepted D13545: Add direct domain allocation functions and use them in busdma.
Tue, Jan 9, 8:01 PM

Mon, Jan 8

jhb committed rS327705: Use <stand.h> instead of <inttypes.h> and <stdio.h> in boot code..
Use <stand.h> instead of <inttypes.h> and <stdio.h> in boot code.
Mon, Jan 8, 6:47 PM
jhb committed rS327704: Fix printf missing format variables warnings..
Fix printf missing format variables warnings.
Mon, Jan 8, 6:46 PM
jhb committed rS327703: Define __dmadat after #include'ing ufsread.c..
Define __dmadat after #include'ing ufsread.c.
Mon, Jan 8, 6:44 PM

Fri, Jan 5

jhb committed rS327598: Remove LINK_MAX..
Remove LINK_MAX.
Fri, Jan 5, 10:26 PM
jhb closed D13658: Remove LINK_MAX..
Fri, Jan 5, 10:26 PM
jhb accepted D13776: Handle misconfigured/noexistent pcidev for comconsole instead of BTX panic.

biospci_readconfig() doesn't look for a matching entry, it just invokes a BIOS routine that probably just translates the register arguments into the right values for writing to 0xcf8 and reading from 0xcfc.

Fri, Jan 5, 10:21 PM
jhb added a comment to D13776: Handle misconfigured/noexistent pcidev for comconsole instead of BTX panic.

Good sleuthing!

Fri, Jan 5, 7:40 PM
jhb committed rS327591: Correct comment. procfs_doprocfile implements 'file', not 'self'..
Correct comment. procfs_doprocfile implements 'file', not 'self'.
Fri, Jan 5, 6:32 PM

Thu, Jan 4

jhb committed rS327562: Always use atomic_fetchadd() when updating per-user accounting values..
Always use atomic_fetchadd() when updating per-user accounting values.
Thu, Jan 4, 10:08 PM
jhb closed D13768: Always use atomic_fetchadd() when updating per-user accounting values..
Thu, Jan 4, 10:08 PM
jhb committed rS327561: Report offset relative to the backing object for kinfo_vmentry structures..
Report offset relative to the backing object for kinfo_vmentry structures.
Thu, Jan 4, 9:59 PM
jhb closed D13767: Report offset relative to the backing object for kinfo_vmentry structures..
Thu, Jan 4, 9:59 PM
jhb created D13768: Always use atomic_fetchadd() when updating per-user accounting values..
Thu, Jan 4, 7:30 PM