Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects (9)

User Details

User Since
Mar 12 2014, 1:00 AM (563 w, 14 h)

Recent Activity

Yesterday

markj accepted D48186: amd64 EFI RT: provide fault data on call fault.
Tue, Dec 24, 4:43 PM
markj added inline comments to D48192: bhyve: Implement the libslirp notify callback.
Tue, Dec 24, 3:55 PM
markj added inline comments to D48186: amd64 EFI RT: provide fault data on call fault.
Tue, Dec 24, 3:46 PM
markj added inline comments to D48191: ntpd: Use the ntpd -u option in preference to the rc su plumbing.
Tue, Dec 24, 3:43 PM
markj requested review of D48192: bhyve: Implement the libslirp notify callback.
Tue, Dec 24, 3:40 PM

Mon, Dec 23

markj added inline comments to D48183: sound: Call vchan_destroy() on vchan_create() failure.
Mon, Dec 23, 9:24 PM
markj added inline comments to D48183: sound: Call vchan_destroy() on vchan_create() failure.
Mon, Dec 23, 9:13 PM
markj updated the test plan for D48182: busdma: Avoid overallocation of bounce pages.
Mon, Dec 23, 9:07 PM
markj added inline comments to D47521: busdma: Avoid leaking bounce pages when destroy DMA tags.
Mon, Dec 23, 9:06 PM
markj requested review of D48182: busdma: Avoid overallocation of bounce pages.
Mon, Dec 23, 9:01 PM
markj committed rG5982237f1e5a: sed: Fix handling of an empty pattern space (authored by mohd.akram_outlook.com).
sed: Fix handling of an empty pattern space
Mon, Dec 23, 7:14 PM
markj committed rG003818aca4cd: sed tests: Add a regression test for the c function (authored by markj).
sed tests: Add a regression test for the c function
Mon, Dec 23, 7:14 PM
markj committed rG5c15d499c23a: Revert "ixl: fix multicast filters handling" (authored by franco_opnsense.org).
Revert "ixl: fix multicast filters handling"
Mon, Dec 23, 4:53 PM
markj added a reverting change for rG89e73359424a: ixl: fix multicast filters handling: rG5c15d499c23a: Revert "ixl: fix multicast filters handling".
Mon, Dec 23, 4:53 PM
markj committed rG2a6c77b343f6: linuxkpi: Fix a lock leak in lkpi_sta_scan_to_auth() (authored by markj).
linuxkpi: Fix a lock leak in lkpi_sta_scan_to_auth()
Mon, Dec 23, 4:53 PM
markj committed rGae21b1f88e02: ipfw.d: Add required dependency declarations (authored by markj).
ipfw.d: Add required dependency declarations
Mon, Dec 23, 4:53 PM
markj added a reverting change for D40860: ixl: fix multicast filters handling: rG5c15d499c23a: Revert "ixl: fix multicast filters handling".
Mon, Dec 23, 4:53 PM
markj added a comment to D48163: ip: Defer checks for an unspecified dstaddr until after pfil hooks.

I thinks that is a general question, that is, does a firewall want to see all known invalid packets? For example, the above logic to check IN_LOOPBACK on the wire.

Mon, Dec 23, 3:57 PM
markj committed rG66a022a30dd9: syslogd: Add syslog basic message format tests (authored by Michal Scigocki <michal.os@hotmail.com>).
syslogd: Add syslog basic message format tests
Mon, Dec 23, 3:50 PM
markj committed rG65c61840eeb7: syslogd: Add syslog relayed message format tests (authored by Michal Scigocki <michal.os@hotmail.com>).
syslogd: Add syslog relayed message format tests
Mon, Dec 23, 3:50 PM
markj committed rGee75c991acdc: syslogd: Add syslog forwarded message format tests (authored by Michal Scigocki <michal.os@hotmail.com>).
syslogd: Add syslog forwarded message format tests
Mon, Dec 23, 3:50 PM
markj committed rG8cc248fb92bf: syslogd: Add rfc3164-strict format option (authored by Michal Scigocki <michal.os@hotmail.com>).
syslogd: Add rfc3164-strict format option
Mon, Dec 23, 3:50 PM
markj committed rGaa94868f5e9a: syslogd: Remove is_exclusive metadata from tests (authored by Michal Scigocki <michal.os@hotmail.com>).
syslogd: Remove is_exclusive metadata from tests
Mon, Dec 23, 3:50 PM
markj closed D47870: inpcb: Further restrict binding to a port owned by a different UID.
Mon, Dec 23, 3:41 PM
markj committed rGc9756953bded: inpcb: Further restrict binding to a port owned by a different UID (authored by markj).
inpcb: Further restrict binding to a port owned by a different UID
Mon, Dec 23, 3:41 PM
markj added inline comments to D47956: tmpfs: Rework file handles.
Mon, Dec 23, 3:40 PM

Sat, Dec 21

markj closed D47842: sysctl: Do not serialize requests when running as root.
Sat, Dec 21, 7:28 PM
markj committed rG7d1d9cc440f8: sysctl: Do not serialize requests when running as root (authored by markj).
sysctl: Do not serialize requests when running as root
Sat, Dec 21, 7:28 PM
markj committed rG8cf955f3f48a: jail: Handle jail removal in a dedicated thread (authored by markj).
jail: Handle jail removal in a dedicated thread
Sat, Dec 21, 7:24 PM
markj closed D47991: jail: Handle jail removal in a dedicated thread.
Sat, Dec 21, 7:24 PM
markj added a comment to D47842: sysctl: Do not serialize requests when running as root.
In D47842#1090897, @jhb wrote:

The thing that makes this a bit odd in terms of the memory limit is that userspace isn't the one requesting to wire the memory. The kernel does by calling sysctl_wire_old_buffer in an individual handler. It would be nice to be smarter about this, e.g. don't acquire the lock until sysctl_wire_old_buffer is actually called? OTOH, one might ask why we really need the lock at all? I guess the worry is that userspace can DOS the kernel by making lots of requests with large buffers for nodes that are known to use sysctl_wire_old_buffer?

Sat, Dec 21, 7:20 PM
markj added a comment to D48163: ip: Defer checks for an unspecified dstaddr until after pfil hooks.

On second thought this probably needs to be mentioned in Relnotes and not MFC-ed. Cause it might be that somebody was relying on the stack to drop those packets before firewall.

Sat, Dec 21, 6:59 PM
markj added a comment to D47807: WIP/RFC: another busdma fix for small bounce transfers.

I'm sorry for the delayed follow-up. I'm trying to understand the purpose of the roundup. It appears to have been introduced by commit daf6545e6158f; the implication seems to be that some drivers depend on the property that "the relative alignment of two consecutive bytes in the I/O stream have a difference of 1 even if they are not physically contiguous."

Sat, Dec 21, 1:46 AM

Fri, Dec 20

markj requested review of D48164: bhyve: Use a non-blocking read in slirp_recv().
Fri, Dec 20, 5:19 PM
markj added a comment to D47953: pf: Force logging if pf_create_state() fails.

Improve the situation a bit: force logging if state creation fails.
This isn't totally right as we'll end up logging the packet twice in
this case, but it's better than not logging the drop at all.

This seems more like a workaround than a fix of underlying design issues. Since I'm responsible for the mess of pf_rule_actions and match rules, I might be able to propose an alternative solution. Can you wait a few days?

Fri, Dec 20, 4:02 PM
markj requested review of D48163: ip: Defer checks for an unspecified dstaddr until after pfil hooks.
Fri, Dec 20, 3:59 PM
markj accepted D48150: nullfs: stop lying about mount flags in statfs(2).
In D48150#1098165, @kib wrote:

Suppose a filesystem has MNT_NOSUID set, and contains a setuid root executable. If I create a nullfs mount of that filesystem and run the executable though nullfs, should the suid bit be honoured? I would expect not, but it is. In particular, MNT_NOSUID is not copied to the upper mount, and the code which checks MNT_NOSUID does not use a VOP, it just checks vp->v_mount->mnt_flags.

This is the current behavior, before or after the change, and in fact it is not that weird. Imagine that instead of nullfs, the lower fs is exported and mounted by nfs. The result is same.

Fri, Dec 20, 3:28 PM
markj added a comment to D48150: nullfs: stop lying about mount flags in statfs(2).
In D48150#1098159, @kib wrote:

When lower fs acts according to its mount configuration, it is reported up as VOP errors.

I do not quite understand what you mean here.

I mean that mnt_flags from lower fs do not need to be propagated to upper fs to make the mount operate correctly. Lower fs flags are checked when bypass calls lower VOP. So there is no need to 'fake' mnt_flags for upper fs, and esp. to fake it for only reporting to user in statfs(2).

Fri, Dec 20, 3:04 PM
markj added a comment to D48150: nullfs: stop lying about mount flags in statfs(2).

When lower fs acts according to its mount configuration, it is reported up as VOP errors.

Fri, Dec 20, 1:51 PM

Thu, Dec 19

markj committed rG38663adb6144: Revert "ixl: fix multicast filters handling" (authored by franco_opnsense.org).
Revert "ixl: fix multicast filters handling"
Thu, Dec 19, 1:51 PM
markj added a reverting change for rG89e73359424a: ixl: fix multicast filters handling: rG38663adb6144: Revert "ixl: fix multicast filters handling".
Thu, Dec 19, 1:50 PM
markj added a reverting change for D40860: ixl: fix multicast filters handling: rG38663adb6144: Revert "ixl: fix multicast filters handling".
Thu, Dec 19, 1:50 PM
markj accepted D48139: exports.5: Document correct behaviour for -alldirs.

The current verbiage does need improvement.

Thu, Dec 19, 1:36 PM
markj added a comment to D47706: safexel manuals: improve apropos and HW relnotes.

If you mail me git format-patch output or submit it on github, I'll apply it.

Thu, Dec 19, 1:28 PM
markj accepted D47956: tmpfs: Rework file handles.
Thu, Dec 19, 1:24 PM

Wed, Dec 18

markj committed rG11c7eb30cc9b: pfkey: Fix some checks in kdebug_sadb() (authored by Tobias Heider <me@tobhe.me>).
pfkey: Fix some checks in kdebug_sadb()
Wed, Dec 18, 2:16 PM
markj committed rG9daf6d641922: shm: Handle swap pager allocation failures (authored by markj).
shm: Handle swap pager allocation failures
Wed, Dec 18, 1:47 PM
markj committed rG113875f91607: iflib: Set the NUMA domain in receive packet headers (authored by markj).
iflib: Set the NUMA domain in receive packet headers
Wed, Dec 18, 1:47 PM
markj committed rG0c5701ff8fdf: pfkey: Fix some checks in kdebug_sadb() (authored by Tobias Heider <me@tobhe.me>).
pfkey: Fix some checks in kdebug_sadb()
Wed, Dec 18, 1:47 PM
markj committed rG60786eb3fe7f: sockstat: Ensure that there is always a space between columns (authored by markj).
sockstat: Ensure that there is always a space between columns
Wed, Dec 18, 1:47 PM

Tue, Dec 17

markj updated the diff for D47992: jail: Avoid a use-after-free when destroying jails.

Set PR_VNET earlier, so that prison_deref() won't leak the VNET if an
error occurs during jail initialization.

Tue, Dec 17, 10:30 PM
markj accepted D48125: namei: add more detail about LOCKSHARED's behavior.

My comments are just suggestions/quibbling.

Tue, Dec 17, 8:30 PM
markj planned changes to D47992: jail: Avoid a use-after-free when destroying jails.

The new PR_VNET_ROOT flag is unneeded: it's equivalent to PR_VNET, just check
that instead.

Not quite, I'm afraid. This is true once a prison has been created, but errors during the creation process can break that. pr_vnet is set when a new jail is created, but the flags are not actually set until after some parameter checking and other error opportunities. Chances are, this just requires setting the prison's PR_VNET flag at the same time the vnet is created (still saving other flags for later).

Tue, Dec 17, 6:12 PM
markj updated the diff for D47992: jail: Avoid a use-after-free when destroying jails.

Revert unintended style change.

Tue, Dec 17, 5:57 PM
markj updated the diff for D47992: jail: Avoid a use-after-free when destroying jails.

The new PR_VNET_ROOT flag is unneeded: it's equivalent to PR_VNET, just check
that instead.

Tue, Dec 17, 5:35 PM
markj committed rGfa5f4c10a8ce: atomic: Update interceptor function signatures after commit 5e9a82e898d5 (authored by markj).
atomic: Update interceptor function signatures after commit 5e9a82e898d5
Tue, Dec 17, 2:12 PM
markj committed rGda2c88dfcf4f: queue: Fix STAILQ_SWAP (authored by markj).
queue: Fix STAILQ_SWAP
Tue, Dec 17, 12:15 AM

Mon, Dec 16

markj committed rGcfbbe5d7fa9f: Makefile.inc1: Fix a typo (authored by markj).
Makefile.inc1: Fix a typo
Mon, Dec 16, 10:33 PM
markj committed rGb64c5a0ace59: ipfw.d: Add required dependency declarations (authored by markj).
ipfw.d: Add required dependency declarations
Mon, Dec 16, 10:16 PM
markj accepted D48058: riscv vmm: add SSTC check.

I have no objection to the current revision, although we can say a few things about how the code may look/change in the future.

Obviously, the feature-to-ISA-string code will continue to expand/balloon, as we will want to advertise the availability of the many unprivileged ISA extensions to the guest as well.

The problem is that we have no mechanism for reporting extension presence from the kernel to userspace, therefore you are using vm_cap_type here. I am working on something "official" for this, most likely it will be a sysarch exporting a bitmap, with bit definitions compatible to what can be found in Linux. Therefore one call can obtain the full set of supported extensions (sanitized), and we will be able to use this in bhyve to construct the ISA string for the guest.

So I don't think we will need to rely on vm_cap_type in the long run. We also don't need to be precious about the ABI, given the experimental state of RISC-V vmm and hypervisor hardware, and since I intend for this extension reporting stuff to be resolved before the release of 15.0. So this VM_CAP_SSTC can easily be removed later.

Mon, Dec 16, 6:45 PM
markj accepted D48058: riscv vmm: add SSTC check.
Mon, Dec 16, 5:04 PM
markj added inline comments to D48058: riscv vmm: add SSTC check.
Mon, Dec 16, 4:48 PM
markj added a comment to D47870: inpcb: Further restrict binding to a port owned by a different UID.

Any comments on the patch?

Mon, Dec 16, 4:26 PM
markj added a comment to D48034: sound: Cache bps in pcm/feeder_eq.c.

as suggested, it'd be more natural to cache the value in a local variable instead, assuming that the compiler doesn't recognize that the value is constant and hoist that computation out the loop (which would make this diff even less useful).

Mon, Dec 16, 2:42 PM
markj added a comment to D48093: RELNOTES: Document file handle layout changes.

Thanks. But while we're here, shouldn't it wait for D47956 as well? Going to update it in a short while to separate the change of switching the generation number to 32 bits to another revision so that the rest can be reviewed and hopefully approved/committed shortly.

Mon, Dec 16, 2:37 PM
markj added inline comments to D47956: tmpfs: Rework file handles.
Mon, Dec 16, 2:37 PM

Sun, Dec 15

markj updated the diff for D48093: RELNOTES: Document file handle layout changes.

Update UPDATING.

Sun, Dec 15, 9:42 PM
markj added a comment to D48087: kyua: Add "prepare" command.

As usual, I will quibble a bit about naming - the kyua subcommands are mostly english words, so "rr" is a bit odd. Why not "resolve" or even "resolve-requirements" (or "resolve-reqs")?

Sun, Dec 15, 7:29 PM
markj added a comment to D47879: cd9660: Make sure that struct ifid fits in generic filehandle structure.

Just fyi, whenever the "struct fid" changes,
(snip)
RELNOTES entry is needed.

Yes. Not sure if it's worth it for these filesystems. Mark didn't do that.

Sun, Dec 15, 6:30 PM
markj requested review of D48093: RELNOTES: Document file handle layout changes.
Sun, Dec 15, 6:29 PM
markj added inline comments to D39740: if_tuntap: make SIOCIFDESTROY interruptible.
Sun, Dec 15, 6:23 PM
markj added a comment to D46653: kyua: Do not count skipped as passed in test cmd.

I think being added to the FreeBSD org is documented somewhere in the Committer's Guide. CC: @markj

I don't see any docs on that. Am I missing something?

In any case, I submitted https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283127

Regarding the change itself, I have a hard time believing any serious project is parsing the result summary line and using that as input to something else. Do we know of any actual examples?

I kind of thing option 4 makes the most sense..

For the run of the FreeBSD regression suite that I just completed, option 4 gives:

Test cases: 9032 total, 211 skipped, 33 expected failures, 1 broken, 6 failed

Whereas kyua currently prints:

8814/9032 passed (1 broken, 6 failed, 211 skipped)

The issue is the ratio… random folks who use other frameworks might be confused by it. My first gut reaction was “X testcases failed…?! Oh wait… they were skipped—really??”. pytest for instance doesn’t emit the passed count as a ratio, but instead outputs the actual count in each category: https://slar.se/essential-pytest-1.html .

Skipped tests shouldn’t count against passed or failed tests. The ratio as it stands is confusing. I vote for just outputting the raw values; non-verbose output can just omit categories without any results — seems like a reasonable compromise from the -v output.

Sun, Dec 15, 6:15 PM

Sat, Dec 14

markj added inline comments to D39740: if_tuntap: make SIOCIFDESTROY interruptible.
Sat, Dec 14, 4:15 PM

Fri, Dec 13

markj added inline comments to D48058: riscv vmm: add SSTC check.
Fri, Dec 13, 8:52 PM
markj added a comment to D47868: sound: Clean up pcm/ includes.

@markj What do you think?

Fri, Dec 13, 8:47 PM
markj added a comment to D48034: sound: Cache bps in pcm/feeder_eq.c.

I'm skeptical that this change makes any measurable difference. And, as suggested, it'd be more natural to cache the value in a local variable instead, assuming that the compiler doesn't recognize that the value is constant and hoist that computation out the loop (which would make this diff even less useful).

Fri, Dec 13, 8:39 PM
markj committed rG926905796749: linuxkpi: Fix a lock leak in lkpi_sta_scan_to_auth() (authored by markj).
linuxkpi: Fix a lock leak in lkpi_sta_scan_to_auth()
Fri, Dec 13, 8:31 PM
markj closed D47949: linuxkpi: Fix a lock leak in lkpi_sta_scan_to_auth().
Fri, Dec 13, 8:31 PM
markj accepted D48008: sound: Remove SNDBUF_LOCKASSERT().
Fri, Dec 13, 8:26 PM
markj accepted D48061: x86 atomics: Remove unused WANT_FUNCTIONS.
Fri, Dec 13, 8:23 PM
markj accepted D44200: tun(4)/tap(4): allow devices to be configured as transient.
Fri, Dec 13, 6:49 PM
markj accepted D39740: if_tuntap: make SIOCIFDESTROY interruptible.
Fri, Dec 13, 4:14 PM
markj accepted D48073: vmm: Initialize error in vmmdev_rw.
Fri, Dec 13, 2:50 PM
markj committed rGcd597b4bb194: cd9660: Make sure that struct ifid fits in generic filehandle structure (authored by markj).
cd9660: Make sure that struct ifid fits in generic filehandle structure
Fri, Dec 13, 1:45 AM
markj committed rGfe0506ce89b1: cd9660: Remove some unneeded definitions (authored by markj).
cd9660: Remove some unneeded definitions
Fri, Dec 13, 1:45 AM
markj committed rG54974e731f27: cd9660: Make sure that struct ifid fits in generic filehandle structure (authored by markj).
cd9660: Make sure that struct ifid fits in generic filehandle structure
Fri, Dec 13, 1:45 AM
markj committed rGfea53bf43f85: savecore: Add a livedump regression test (authored by markj).
savecore: Add a livedump regression test
Fri, Dec 13, 1:45 AM
markj committed rG8e3c0a69fed2: livedump: Silence KASAN and KMSAN when livedumping (authored by markj).
livedump: Silence KASAN and KMSAN when livedumping
Fri, Dec 13, 1:45 AM
markj committed rG2bd47ff64577: dtrace: Add some more annotations for KMSAN (authored by markj).
dtrace: Add some more annotations for KMSAN
Fri, Dec 13, 1:45 AM

Thu, Dec 12

markj committed rG4f02a7d739b3: inpcb: Remove bogus SO_REUSEPORT(_LB) checks in in_pcbbind() (authored by markj).
inpcb: Remove bogus SO_REUSEPORT(_LB) checks in in_pcbbind()
Thu, Dec 12, 2:28 PM
markj committed rGa600aabe9b04: inpcb: Close some SO_REUSEPORT_LB races (authored by markj).
inpcb: Close some SO_REUSEPORT_LB races
Thu, Dec 12, 2:28 PM
markj closed D47832: inpcb: Remove bogus SO_REUSEPORT(_LB) checks in in_pcbbind().
Thu, Dec 12, 2:28 PM
markj closed D48020: inpcb: Close some SO_REUSEPORT_LB races.
Thu, Dec 12, 2:28 PM

Tue, Dec 10

markj requested review of D48020: inpcb: Close some SO_REUSEPORT_LB races.
Tue, Dec 10, 7:10 PM
markj committed rGc226f193515c: riscv: Permit spurious faults in kernel mode (authored by markj).
riscv: Permit spurious faults in kernel mode
Tue, Dec 10, 3:10 PM
markj closed D47688: riscv: Permit spurious faults in kernel mode.
Tue, Dec 10, 3:10 PM
markj added inline comments to D47992: jail: Avoid a use-after-free when destroying jails.
Tue, Dec 10, 3:02 PM
markj updated the diff for D47992: jail: Avoid a use-after-free when destroying jails.

Avoid modifying prison_deref_kill().

Tue, Dec 10, 3:02 PM
markj accepted D48017: release: vmimage: setup the default BE properly.
Tue, Dec 10, 2:59 PM

Mon, Dec 9

markj added a comment to D47935: pmap_growkernel(): do not panic immediately, return error.

Also, in your stack, why are we using kmem_malloc() to allocate a slab for inpcbs? That should be going through uma_small_alloc(), which doesn't need KVA. Was the kernel compiled with KASAN enabled?

No, KASAN is not in the kernel. The inpcb keg has uk_ppera = 4, hence its uk_allocf is page_alloc() which is basically kmem_malloc_domainset(). Our inpcb is 0x880 bytes, so I guess keg_layout() calculated 4 page slabs as most efficient.

Mon, Dec 9, 4:59 PM