Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects (8)

User Details

User Since
Mar 12 2014, 1:00 AM (531 w, 4 d)

Recent Activity

Fri, May 17

markj added inline comments to D45217: libdiff: Detect and recover from file truncation..
Fri, May 17, 5:28 PM
markj added a comment to D45203: bnxt_re/bnxt_en: man page support for bnxt_re driver.

Thanks for adding this. I just had a few minor inline comments.

Fri, May 17, 3:59 PM
markj added a comment to D45191: amd64: use INVLPGB for kernel pmap invalidations.

On amd64, translation invalidation routines don't specify whether intermediate TLB entries need to be invalidated, but on arm64 they do. Now that we have INVLPGB_FIN, I wonder if (in a separate patch certainly) it would be worth augmenting amd64's pmap_invalidate_page() etc. to specify whether intermediate entries need to be invalidated.

Fri, May 17, 3:55 PM
markj added inline comments to D45218: libdiff: Add a test for the truncation issue..
Fri, May 17, 2:31 PM
markj accepted D44631: Add function to OSD to get values without taking the lock..
Fri, May 17, 2:27 PM
markj accepted D45219: diff: Warn if the atomizer detected truncation..
Fri, May 17, 2:26 PM
markj accepted D45170: libkern: add ilog2 helpers.
Fri, May 17, 2:25 PM
markj added inline comments to D45217: libdiff: Detect and recover from file truncation..
Fri, May 17, 2:08 PM

Thu, May 16

markj added a comment to D44488: pf: if a new RDR state connect be created, modulate src port.
In D44488#1031217, @kp wrote:

but with this change we are implicitly rewriting the source port. What explicit mechanism is the man page alluding to here?

That'd be things like rdr on $ext_if proto tcp from any to any port 80 -> 127.0.0.1 port 8080, where we redirect incoming connections on port 80 to localhost port 8080.
When we're doing explicit rewrites it's always going to be the destination port, of course.

Thu, May 16, 2:53 PM

Wed, May 15

markj accepted D45210: riscv: fix L0 PTE setup (Sv48).
Wed, May 15, 3:56 PM
markj updated the diff for D44739: arm64/vmm: Add breakpoint and single-stepping support.
  • Use a bitmask to record which capabilities are enabled. This is closer to what amd64 does.
  • Disable hardware interrupts when enabling single-stepping. Otherwise we take a timer interrupt before single-stepping the target and don't make progress.
Wed, May 15, 3:21 PM
markj updated the diff for D44740: bhyve: Add arm64 support to the gdb stub.
  • Fill out more bits in ESR when pushing an exception back into the guest.
  • Fix one more place that was missing an icache flush.
Wed, May 15, 2:52 PM

Tue, May 14

markj accepted D45084: uma: deduplicate uma_small_alloc.
Tue, May 14, 4:35 PM
markj added inline comments to D45191: amd64: use INVLPGB for kernel pmap invalidations.
Tue, May 14, 4:34 PM
markj accepted D45175: SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information.
Tue, May 14, 4:22 PM
markj added a comment to D44488: pf: if a new RDR state connect be created, modulate src port.

I've spent some time looking into the underlying, and I'm not sure that this approach (quietly rewriting the src port) is correct. The pf.conf manual page says:

In addition to modifying the address, some translation rules may modify
source or destination ports for tcp(4) or udp(4) connections; implicitly
in the case of nat rules and explicitly in the case of rdr rules.  Port
numbers are never translated with a binat rule.

but with this change we are implicitly rewriting the source port. What explicit mechanism is the man page alluding to here?

Tue, May 14, 4:09 PM
markj closed D45199: net-mgmt/net-snmp: Avoid changing to the snmpd user for now.
Tue, May 14, 3:28 PM
markj committed R11:52fe0689eac7: net-mgmt/net-snmp: Avoid changing to the snmpd user for now (authored by markj).
net-mgmt/net-snmp: Avoid changing to the snmpd user for now
Tue, May 14, 3:28 PM
markj updated the diff for D45199: net-mgmt/net-snmp: Avoid changing to the snmpd user for now.

Add a variable to configure snmpd to drop privs

Tue, May 14, 3:21 PM
markj requested review of D45199: net-mgmt/net-snmp: Avoid changing to the snmpd user for now.
Tue, May 14, 2:48 PM

Mon, May 13

markj added inline comments to D45175: SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information.
Mon, May 13, 2:30 PM
markj added inline comments to D44631: Add function to OSD to get values without taking the lock..
Mon, May 13, 1:33 PM
markj added a comment to D45072: mca: Allow for passing ECC error record to memory controller driver..

I don't see a reason to use atomics for the operations which happen under mca_lock. It is ok to assume that unqualified aligned pointer loads and stores are atomic; at least, we make this assumption pervasively in the kernel. It is nonetheless reasonable to use atomic_load_ptr() for the unlocked load in mca_log().

Mon, May 13, 1:31 PM
markj accepted D45175: SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information.
Mon, May 13, 1:25 PM
markj accepted D45119: tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode.
Mon, May 13, 1:20 PM
markj accepted D45084: uma: deduplicate uma_small_alloc.
Mon, May 13, 1:16 PM
markj accepted D45085: vm: simplify conditional for dumping startup pages.
Mon, May 13, 1:14 PM

Sun, May 12

markj committed rG502a1018002e: bhyve: Do not define GDB_LOG (authored by markj).
bhyve: Do not define GDB_LOG
Sun, May 12, 5:03 PM
markj accepted D45162: arm64: Set ATTR_CONTIGUOUS on the kernel code and data sections when the page size is 16K.
Sun, May 12, 3:10 PM

Sat, May 11

markj accepted D45162: arm64: Set ATTR_CONTIGUOUS on the kernel code and data sections when the page size is 16K.

On an Altra with this patch I see:

Sat, May 11, 4:26 PM
markj added a comment to D45119: tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode.
In D45119#1029923, @kib wrote:
In D45119#1029542, @kib wrote:

I do not see how this solves the problem that @pho found. There, vm_map_process_deferred() was releasing writecounts, and in one case the backing vnode was doomed, so OBJ_TMPFS_VREF was clear.

Do you mean https://people.freebsd.org/~pho/stress/log/log0518.txt? I agree that this is different. But for me, log0518 states that clearing of OBJ_TMPFS_VREF and clearing of node->tn_vnode are not atomic (and really cannot be). So the assert "object with writable mappings does not have a reference" should be removed, because indeed vp might be in process of reclaim or the pointer to vp might be already invalid.

Yes, but that isn't sufficient. Consider that tmpfs_pager_writecount_recalc() will vrele() the vnode if the writecount drops to 0, which is incorrect if the TMPFS_VREF flag is already clear.

So this part should be also easy, it is enough to check that TMPFS_VREF is set before clearing it and vrele-ing the vnode. This should be correct since we observe the flag while owning the object lock.
I do not remember for sure, but I believe your patches include that chunk?

Sat, May 11, 3:16 PM
markj added a comment to D45161: Add uuid for module to prevent incompetable coredump loaded by debugger.

Where does the UUID come from? Is it just the build-id?

Sat, May 11, 2:30 PM
markj committed rGd8ccaa995f45: bhyve: Do not define GDB_LOG (authored by markj).
bhyve: Do not define GDB_LOG
Sat, May 11, 2:17 PM
markj committed rG24268f262b41: sysctl: Make sysctl_ctx_free() a bit safer (authored by markj).
sysctl: Make sysctl_ctx_free() a bit safer
Sat, May 11, 2:17 PM
markj updated subscribers of D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Sat, May 11, 12:21 AM

Fri, May 10

markj added a comment to D45119: tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode.
In D45119#1029542, @kib wrote:

I do not see how this solves the problem that @pho found. There, vm_map_process_deferred() was releasing writecounts, and in one case the backing vnode was doomed, so OBJ_TMPFS_VREF was clear.

Do you mean https://people.freebsd.org/~pho/stress/log/log0518.txt? I agree that this is different. But for me, log0518 states that clearing of OBJ_TMPFS_VREF and clearing of node->tn_vnode are not atomic (and really cannot be). So the assert "object with writable mappings does not have a reference" should be removed, because indeed vp might be in process of reclaim or the pointer to vp might be already invalid.

Fri, May 10, 3:37 PM

Thu, May 9

markj closed D45031: net-mgmt/net-snmp: Let snmpd run as a non-root user.
Thu, May 9, 5:04 PM
markj committed R11:77487a63f99d: net-mgmt/net-snmp: Let snmpd run as a non-root user (authored by markj).
net-mgmt/net-snmp: Let snmpd run as a non-root user
Thu, May 9, 5:04 PM
markj closed D45030: net-mgmt/net-snmp: Fix the IPV6 MIB implementation.
Thu, May 9, 5:04 PM
markj committed R11:26406929ca14: net-mgmt/net-snmp: Fix the IPV6 MIB implementation (authored by markj).
net-mgmt/net-snmp: Fix the IPV6 MIB implementation
Thu, May 9, 5:04 PM
markj closed D45029: net-mgmt/net-snmp: Fix freebsd15.h.
Thu, May 9, 5:04 PM
markj committed R11:03e9f0cdfac6: net-mgmt/net-snmp: Fix freebsd15.h (authored by markj).
net-mgmt/net-snmp: Fix freebsd15.h
Thu, May 9, 5:04 PM
markj added inline comments to D32308: Add a build knob for _FORTIFY_SOURCE.
Thu, May 9, 4:16 PM
markj added a comment to D45119: tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode.

I do not see how this solves the problem that @pho found. There, vm_map_process_deferred() was releasing writecounts, and in one case the backing vnode was doomed, so OBJ_TMPFS_VREF was clear.

Thu, May 9, 4:14 PM
markj accepted D45130: tftpd: Drop unneeded includes..
Thu, May 9, 3:39 PM
markj accepted D45129: tftpd: Add missing `-S` option to synopsis..
Thu, May 9, 3:38 PM
markj accepted D45132: tftpd: Satisfy clang-analyzer..
Thu, May 9, 3:37 PM

Wed, May 8

markj committed rG5d62025d82a0: bhyve: Do not define GDB_LOG (authored by markj).
bhyve: Do not define GDB_LOG
Wed, May 8, 4:12 PM
markj committed rGe3333648b75d: vmm: Start reconciling amd64 and arm64 copies of vmm_dev.c (authored by markj).
vmm: Start reconciling amd64 and arm64 copies of vmm_dev.c
Wed, May 8, 4:12 PM
markj committed rGffbaa453c191: bsdinstall: Stop loading cryptodev for ZFS installations (authored by markj).
bsdinstall: Stop loading cryptodev for ZFS installations
Wed, May 8, 4:11 PM
markj closed D44995: vmm: Start reconciling amd64 and arm64 copies of vmm_dev.c.
Wed, May 8, 4:11 PM
markj closed D45127: bsdinstall: Stop loading cryptodev for ZFS installations.
Wed, May 8, 4:11 PM
markj updated the diff for D44740: bhyve: Add arm64 support to the gdb stub.

Handle review comments

  • Invalidate the icache after updating guest memory.
  • Widen SPSR.
  • Mask off extra flags in TTBR registers.
Wed, May 8, 3:58 PM
markj requested review of D45127: bsdinstall: Stop loading cryptodev for ZFS installations.
Wed, May 8, 3:11 PM
markj added inline comments to D45113: cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once.
Wed, May 8, 2:11 PM
markj accepted D45113: cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once.
Wed, May 8, 1:20 PM
markj added inline comments to D45119: tmpfs: recalculate OBJ_TMPFS_VREF on reinstantiating node' vnode.
Wed, May 8, 1:18 PM
markj committed rG7b65987885da: sdt: Add macros which expand to probe and provider structure names (authored by markj).
sdt: Add macros which expand to probe and provider structure names
Wed, May 8, 1:08 PM
markj committed rG50af25e87422: ng_pipe: Do not panic when memory allocations fail (authored by Martin Vahlensieck <git@academicsolutions.ch>).
ng_pipe: Do not panic when memory allocations fail
Wed, May 8, 1:08 PM
markj committed rGf4ab464d3492: ng_pipe: Replace deprecated random() with prng32_bounded() (authored by Martin Vahlensieck <git@academicsolutions.ch>).
ng_pipe: Replace deprecated random() with prng32_bounded()
Wed, May 8, 1:08 PM
markj committed rGa3ca254e6986: ng_pipe: Remove node when all hooks are disconnected (authored by Martin Vahlensieck <git@academicsolutions.ch>).
ng_pipe: Remove node when all hooks are disconnected
Wed, May 8, 1:08 PM
markj committed rGebc5b3b08560: ctags: Use C99 bool instead of defining our own (authored by collin.funk1_gmail.com).
ctags: Use C99 bool instead of defining our own
Wed, May 8, 1:08 PM
markj committed rGa709ac6f422b: ng_pipe: Fix whitespace (authored by Martin Vahlensieck <git@academicsolutions.ch>).
ng_pipe: Fix whitespace
Wed, May 8, 1:08 PM
markj committed rG95cb70275609: arm: Remove duplicate definitions in armreg.h (authored by markj).
arm: Remove duplicate definitions in armreg.h
Wed, May 8, 1:08 PM
markj committed rGf55be6d9993a: tmpfs tests: Remove an xfail annotation (authored by markj).
tmpfs tests: Remove an xfail annotation
Wed, May 8, 1:08 PM
markj committed rGe3b27cc3546f: copy_file_range: Call vn_rdwr() at least once (authored by markj).
copy_file_range: Call vn_rdwr() at least once
Wed, May 8, 1:08 PM
markj committed rG3f6515c20f38: bpf: Make BPF interop consistent with if_loop (authored by Seth Hoffert <seth.hoffert@gmail.com>).
bpf: Make BPF interop consistent with if_loop
Wed, May 8, 1:08 PM

Tue, May 7

markj added inline comments to D45113: cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once.
Tue, May 7, 3:39 PM
markj added a comment to D45011: RDMA/bnxt_re: Add bnxt_re RoCE driver.

Could you please add a manual page for the new drivers, or extend the existing share/man/man4/bnxt.4?

Tue, May 7, 3:14 PM
markj added inline comments to D45113: cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once.
Tue, May 7, 2:36 PM
markj added inline comments to D45113: cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once.
Tue, May 7, 2:02 PM
markj accepted D45108: dlopen(3): mention fdlopen for capsicum(4).
Tue, May 7, 1:58 AM

Mon, May 6

markj added a comment to D45030: net-mgmt/net-snmp: Fix the IPV6 MIB implementation.

The patch has been applied upstream: https://github.com/net-snmp/net-snmp/commit/ebb758e337a52c75a06b2448ebb44a6c78a8600e

Mon, May 6, 6:35 PM
markj added a comment to D35992: wg_noise: Drop atomics for kp_can_send..

I think this is superseded by commit e32e1a160e01a no?

Mon, May 6, 6:18 PM

Fri, May 3

markj added inline comments to D44995: vmm: Start reconciling amd64 and arm64 copies of vmm_dev.c.
Fri, May 3, 3:17 PM
markj accepted D45077: libdiff: Fix type issues..
Fri, May 3, 2:57 PM
markj added a comment to D45044: uma: retire UMA_MD_SMALL_ALLOC.

IMO this patch is in the wrong order in the series. It should be first: 98% of the patch is about deduplicating implementations of uma_small_alloc(), which is a non-functional change and worthy in its own right. The rest of the series, which needs more design review and discussion before getting into detailed code review, should build on top of that.

Fri, May 3, 2:57 PM
markj added a comment to D45058: linuxkpi: Fix arch_io_reserve_memtype_wc.

Include missing headers sys/queue.h from vm/_vm_phys.h for TAILQ, and sys/param.h from vm/vm_phys.h for NULL so linux/io.h doesn't have to include them.

Fri, May 3, 2:34 PM
markj added a comment to D45042: arm64: Make jemalloc safe for 16k / 4k interoperability.

Do we have any idea what the downsides of the change are? If we make the default 64KB, then I'd expect memory usage to increase; do we have any idea what the looks like? It'd be nice to, for example, compare memory usage on a newly booted system with and without this change.

Fri, May 3, 2:16 PM
markj accepted D45078: diff: Sort headers..
Fri, May 3, 2:02 PM
markj added inline comments to D45077: libdiff: Fix type issues..
Fri, May 3, 1:59 PM
markj accepted D45074: __cxa_thread_call_dtors(3): fix dtor pointer validity check.
Fri, May 3, 1:54 PM
markj accepted D44251: x86/xen: use UNUSABLE e820 regions for foreign mappings.

I just left some comments about style. I'm not too familiar with rman but this looks reasonable to me.

Fri, May 3, 1:49 PM
markj accepted D45050: git-arc: Add list mode support for the update command.
Fri, May 3, 1:29 PM
markj accepted D45060: xen/debug: remove usage of sbuf_{clear,finish}() on drained sbuf.
Fri, May 3, 1:22 PM
markj accepted D32308: Add a build knob for _FORTIFY_SOURCE.
Fri, May 3, 2:12 AM
markj accepted D45057: linuxkpi: Fix set_memory_*.
Fri, May 3, 2:09 AM
markj accepted D45058: linuxkpi: Fix arch_io_reserve_memtype_wc.
Fri, May 3, 2:08 AM

Thu, May 2

markj accepted D32308: Add a build knob for _FORTIFY_SOURCE.
Thu, May 2, 8:05 PM
markj committed rGd5eae57088f5: sysctl: Make sysctl_ctx_free() a bit safer (authored by markj).
sysctl: Make sysctl_ctx_free() a bit safer
Thu, May 2, 8:02 PM
markj closed D45041: sysctl: Make sysctl_ctx_free() a bit safer.
Thu, May 2, 8:02 PM
markj added a comment to D32308: Add a build knob for _FORTIFY_SOURCE.

do we have user-facing documentation? maybe just expanding WITHOUT_SSP's description?

I wonder if it makes sense to add a section on stack overflow detection to security(7) would make sense

Thu, May 2, 5:19 PM
markj committed rG19e335596658: kthread: Set *tdptr earlier in kproc_kthread_add() (authored by markj).
kthread: Set *tdptr earlier in kproc_kthread_add()
Thu, May 2, 1:27 PM
markj committed rGb6a2ce76d6b6: udf: uma_zcreate() does not fail (authored by markj).
udf: uma_zcreate() does not fail
Thu, May 2, 1:27 PM
markj committed rG7a8b49047659: busdma: uma_zcreate() does not fail (authored by markj).
busdma: uma_zcreate() does not fail
Thu, May 2, 1:27 PM
markj committed rGbff26fe7aa07: wg: uma_zcreate() does not fail (authored by markj).
wg: uma_zcreate() does not fail
Thu, May 2, 1:27 PM
markj committed rGfa1d1e824b9d: khelp: uma_zcreate() does not fail (authored by markj).
khelp: uma_zcreate() does not fail
Thu, May 2, 1:27 PM
markj committed rG4ee7b8e1ef3c: dpaa: uma_zcreate() does not fail (authored by markj).
dpaa: uma_zcreate() does not fail
Thu, May 2, 1:27 PM

Wed, May 1

markj added a comment to D45049: bhyve: Let the guest enable PCI BARs on arm64.

I believe it's also legal to go and map two BARs to overlap so long as you don't try to access the overlapping range when that's the case? QEMU just maintains a list of PCI BARs and goes for the first one in the list that matches. Allocating the big chunk of MMIO memory statically at the start and just maintaining the list layered on top in PCI code as you mess with BARs seems like it would be a simple, more general fix, and should perform just fine? (Though passthrough may well be "fun" as you mention)

Wed, May 1, 5:08 PM
markj requested review of D45049: bhyve: Let the guest enable PCI BARs on arm64.
Wed, May 1, 4:37 PM