Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects (9)

User Details

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

Recent Activity

Yesterday

markj committed rG1ee4b5fd824a: fork: Drop an uneeded PHOLD/PRELE pair (authored by markj).
fork: Drop an uneeded PHOLD/PRELE pair
Sat, Jun 6, 1:04 PM
markj closed D57486: fork: Drop an uneeded PHOLD/PRELE pair.
Sat, Jun 6, 1:04 PM
markj accepted D57453: Avoid infinite loop in renameat(2).
Sat, Jun 6, 1:28 AM
markj added inline comments to D57482: exit1(9): do not deadlock if exit is called due to PT_SC_REMOTERQ.
Sat, Jun 6, 1:27 AM
markj requested review of D57486: fork: Drop an uneeded PHOLD/PRELE pair.
Sat, Jun 6, 1:02 AM
markj added a comment to D57485: tests/ptrace: Validate PT_SC_REMOTE with some tricky syscalls.

The exit tests hangs, as expected. I didn't try the patch yet.

Sat, Jun 6, 12:11 AM
markj requested review of D57485: tests/ptrace: Validate PT_SC_REMOTE with some tricky syscalls.
Sat, Jun 6, 12:10 AM

Fri, Jun 5

markj added inline comments to D57482: exit1(9): do not deadlock if exit is called due to PT_SC_REMOTERQ.
Fri, Jun 5, 11:36 PM
markj accepted D57453: Avoid infinite loop in renameat(2).
Fri, Jun 5, 11:19 PM
markj added inline comments to D57453: Avoid infinite loop in renameat(2).
Fri, Jun 5, 11:03 PM
markj added inline comments to D57482: exit1(9): do not deadlock if exit is called due to PT_SC_REMOTERQ.
Fri, Jun 5, 11:00 PM
markj accepted D53977: check-old-libs: Show information about packages.
Fri, Jun 5, 10:07 PM
markj committed rG520e0f576f71: udp: Fix resource leaks in an error path in udp6_send() (authored by markj).
udp: Fix resource leaks in an error path in udp6_send()
Fri, Jun 5, 9:49 PM
markj closed D57341: udp: Fix resource leaks in an error path in udp6_send().
Fri, Jun 5, 9:49 PM
markj updated the diff for D57147: tests/jaildesc: Add a couple more test scenarios.

Update a helper function name

Fri, Jun 5, 9:48 PM
markj added a reviewer for D57147: tests/jaildesc: Add a couple more test scenarios: Jails.
Fri, Jun 5, 9:18 PM
markj added inline comments to D57423: unix: implement basic SO_PASSRIGHTS functionality.
Fri, Jun 5, 5:35 PM
markj committed rG2404d8d741f2: linux: Drop unneeded PHOLDs (authored by markj).
linux: Drop unneeded PHOLDs
Fri, Jun 5, 4:55 PM
markj closed D57468: linux: Drop unneeded PHOLDs.
Fri, Jun 5, 4:55 PM
markj accepted D57427: linux: implement SO_PASSRIGHTS.
Fri, Jun 5, 4:31 PM
markj accepted D57471: arch.7: Add wchar_t signedness.
Fri, Jun 5, 4:19 PM
markj accepted D50733: libc: locale: fix some assumptions that wchar_t cannot be signed.
Fri, Jun 5, 3:57 PM
markj accepted D57457: audit: Add poll / select support.

I think this is ok, the selinfo is global so the recent lifetime problems we fixed don't apply here. If it were possible to destroy this device file you'd want to issue seldrain(), but I think that never happens.

Fri, Jun 5, 3:53 PM
markj added a comment to D54175: if_ovpn: fix memory leak in VNET.

Is there any reason this didn't land?

Fri, Jun 5, 3:31 PM
markj committed rGf4424a273386: dhclient.conf.5: Correct crossreference (authored by jpb_jimby.name).
dhclient.conf.5: Correct crossreference
Fri, Jun 5, 3:14 PM
markj closed D49489: dhclient.conf.5: Correct crossreference.
Fri, Jun 5, 3:13 PM
markj added a member for secteam: des.
Fri, Jun 5, 3:00 PM
markj added inline comments to D53977: check-old-libs: Show information about packages.
Fri, Jun 5, 2:54 PM
markj closed D31615: vmm: Add credential to /dev/vmm.io cdev.

Commit 72ea8f41e19d3 subsumes this diff.

Fri, Jun 5, 2:47 PM
markj closed D55998: bsnmpd: fix some memory leaks in mibII.

Committed in 7906084ba2fd50022f38ce2e8d0bcef212a4ff19.

Fri, Jun 5, 2:40 PM
markj accepted D57356: build: provide a FORTIFY_SOURCE.<src file> override.

It's hard for me to judge whether this is the best way to handle it, but it seems to work.

Fri, Jun 5, 2:10 PM
markj requested review of D57468: linux: Drop unneeded PHOLDs.
Fri, Jun 5, 1:59 PM
markj added inline comments to D57124: sys: add pdopenpid(2).
Fri, Jun 5, 1:25 AM

Thu, Jun 4

markj added inline comments to D57163: pddupfd(2).
Thu, Jun 4, 8:12 PM
markj added inline comments to D57163: pddupfd(2).
Thu, Jun 4, 6:03 PM
markj accepted D57448: uipc_usrreq: revert addition of EMPTYPATH for bindat(2).
Thu, Jun 4, 5:41 PM
markj added a comment to D57411: xinstall: Add metalog contents reference link type.

Aside from fixing compatibility with symlink/hard link creation we'll also need to address certctl, which currently has ${METALOG_INSTALLFLAGS} passed to it in installworld.

Thu, Jun 4, 4:07 PM
markj added inline comments to D56925: riscv/pmap.c: Avoid spurious kernel page faults when inserting new PTEs.
Thu, Jun 4, 3:33 PM
markj added inline comments to D57163: pddupfd(2).
Thu, Jun 4, 3:05 PM
markj added inline comments to D57124: sys: add pdopenpid(2).
Thu, Jun 4, 2:37 PM

Wed, Jun 3

markj added a comment to D57419: capsicum: Remove an obsolete comment.
In D57419#1315595, @kib wrote:

This is a part of D57163, FWIW

Wed, Jun 3, 8:58 PM
markj requested review of D57419: capsicum: Remove an obsolete comment.
Wed, Jun 3, 8:49 PM
markj added a comment to D57411: xinstall: Add metalog contents reference link type.

Do you have a patch for share/mk which I can use to test this?

Wed, Jun 3, 4:12 PM
markj updated the diff for D57397: imgact_elf: Clear no-ASLR and -WXORX flags earlier for setugid images.

Unlock the vnode earlier.

Wed, Jun 3, 2:55 PM
markj added inline comments to D57397: imgact_elf: Clear no-ASLR and -WXORX flags earlier for setugid images.
Wed, Jun 3, 1:04 PM

Tue, Jun 2

markj requested review of D57397: imgact_elf: Clear no-ASLR and -WXORX flags earlier for setugid images.
Tue, Jun 2, 9:27 PM
markj added inline comments to D57104: tcp: improve TCP fast open with source routing.
Tue, Jun 2, 7:14 PM
markj accepted D57374: tcp: cleanup resource handling when adding SYN-cache entries.
Tue, Jun 2, 7:13 PM
markj accepted D57370: bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets.
Tue, Jun 2, 3:31 PM
markj requested review of D57394: syslogd: Handle connection errors when setting up forwarding sockets.
Tue, Jun 2, 3:24 PM
markj added a comment to D57016: routing: Add tests for metric.

It seems the main goal here was not about parallelism, so maybe it's not so important, but I just wanted to mention that the newly added test cases are still marked as exclusive as the Makefile makes it so for all of them:

# cat /usr/tests/sys/net/routing/Kyuafile
-- Automatically generated by bsd.test.mk.

syntax(2)

test_suite("FreeBSD")

atf_test_program{name="test_routing", is_exclusive=true, execenv="jail", execenv_jail_params="vnet"}
atf_test_program{name="test_routing_l3.py", is_exclusive=true, required_programs="pytest"}
atf_test_program{name="test_rtsock_l3", is_exclusive=true}
atf_test_program{name="test_rtsock_lladdr", is_exclusive=true}
atf_test_program{name="test_rtsock_multipath.py", is_exclusive=true, required_programs="pytest"}
atf_test_program{name="test_rtsock_ops", is_exclusive=true}
Tue, Jun 2, 3:24 PM
markj accepted D57380: riscv: add a GENERIC-KASAN config.
Tue, Jun 2, 2:57 PM
markj added a comment to D57372: mtree: own bhyve run dir by 'vmm' group.
In D57372#1314941, @ivy wrote:

I'm not sure offhand which files go in this directory, but in general bhyve should be unlinking preexisting files owned by the current VM.

well, perhaps that's so; my main concern here is that if i give a user access to run bhyve VMs, that doesn't imply i want them to have access to previously-restricted directories used by root. those are two separate things that should be configured separately, imo.

if this is specific to snapshots, perhaps a new bhyve argument could be used to specify the socket directory it uses for that.

Tue, Jun 2, 2:56 PM
markj added inline comments to D57381: riscv: add KASAN support.
Tue, Jun 2, 2:52 PM
markj added inline comments to D57370: bindat(2)/connectat(2): allow implicit EMPTYPATH for unix domain sockets.
Tue, Jun 2, 2:42 PM

Mon, Jun 1

markj committed rG68004e56fdc2: net: Fix handling of unmapped user pages in if_getgroup() (authored by markj).
net: Fix handling of unmapped user pages in if_getgroup()
Mon, Jun 1, 6:30 PM
markj committed rG49d90d9ddfc1: lagg: Handle a port count of zero (authored by markj).
lagg: Handle a port count of zero
Mon, Jun 1, 6:30 PM
markj closed D57154: net: Fix handling of unmapped user pages in if_getgroup().
Mon, Jun 1, 6:30 PM
markj closed D56942: lagg: Handle a port count of zero.
Mon, Jun 1, 6:30 PM
markj added a comment to D57386: linux: Return an error for invalid inotify masks.

Same as D57387.

Mon, Jun 1, 6:25 PM
markj abandoned D57386: linux: Return an error for invalid inotify masks.
Mon, Jun 1, 6:25 PM
markj accepted D57387: linuxulator: Return EINVAL for invalid inotify flags.
Mon, Jun 1, 6:25 PM
markj requested review of D57386: linux: Return an error for invalid inotify masks.
Mon, Jun 1, 6:20 PM
markj updated the diff for D57342: ip6: Drop dead code in ip6_input_hbh().
  • increment more counters
  • add a branch annotation
Mon, Jun 1, 5:07 PM
markj added inline comments to D57342: ip6: Drop dead code in ip6_input_hbh().
Mon, Jun 1, 5:02 PM
markj added a comment to D56942: lagg: Handle a port count of zero.

I'm OK with this revision, although I think an explicit memory barrier while increasing / decreasing sc->sc_count will make the code more clear than a NULL check in the reader side (lagg_rr_start).

A memory barrier isn't sufficient. For sc_count and length(sc_ports) to be consistent with each other, you need a mutex.

The writer side is lagg_port_create() and lagg_port_destroy(). They are serialized. The reader side always checks sc_count before accessing sc_ports, so this order should be sufficient for the writer side,

diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
index 0333162da0d4..226565633b3a 100644
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -879,7 +879,7 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp)
                CK_SLIST_INSERT_AFTER(tlp, lp, lp_entries);
        else
                CK_SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries);
-       sc->sc_count++;
+       atomic_add_rel_int(&sc->sc_count, 1);
 
        lagg_setmulti(lp);
 
@@ -962,8 +962,8 @@ lagg_port_destroy(struct lagg_port *lp, int rundelport)
        }
 
        /* Finally, remove the port from the lagg */
+       atomic_add_rel_int(&sc->sc_count, -1);
        CK_SLIST_REMOVE(&sc->sc_ports, lp, lagg_port, lp_entries);
-       sc->sc_count--;
 
        /* Update the primary interface */
        if (lp == sc->sc_primary) {

The reader side use atomic_load_acq_int() to get sc_count, then iterate sc_ports.

Mon, Jun 1, 4:36 PM
markj added a comment to D57372: mtree: own bhyve run dir by 'vmm' group.

in this case

You might further specify which case this is?

In case of running bhyve as a non-root user.

Mon, Jun 1, 3:55 PM
markj added a comment to D56942: lagg: Handle a port count of zero.

I'm OK with this revision, although I think an explicit memory barrier while increasing / decreasing sc->sc_count will make the code more clear than a NULL check in the reader side (lagg_rr_start).

Mon, Jun 1, 3:33 PM
markj added a comment to D57372: mtree: own bhyve run dir by 'vmm' group.

in this case

Mon, Jun 1, 12:56 PM
markj accepted D57376: MAC/do: Fix double-free on parse error after "executable paths" feature.

Is it possible to add a regression test?

Mon, Jun 1, 12:45 PM
markj accepted D57368: amd64: there is no reason to copy ucode around in ucode_load_bsp().
Mon, Jun 1, 12:40 PM

Sat, May 30

markj committed rGf048a1a1decb: tests/ipsec: Run in parallel (authored by markj).
tests/ipsec: Run in parallel
Sat, May 30, 1:17 AM

Fri, May 29

markj committed rG7f8d45bb5f66: linux: Fix some problems with header pollution (authored by markj).
linux: Fix some problems with header pollution
Fri, May 29, 10:10 PM
markj committed rG795416bc233d: tcp: Remove a no-op eventhandler (authored by markj).
tcp: Remove a no-op eventhandler
Fri, May 29, 10:10 PM
markj committed rG048458a434a1: amd64/vmparam: Fix KASAN shadow map size in comment (authored by zishun.yi.dev_gmail.com).
amd64/vmparam: Fix KASAN shadow map size in comment
Fri, May 29, 10:10 PM
markj committed rGcb62bc13b2a5: kinst/arm64: Handle an additional PC-relative instruction (authored by markj).
kinst/arm64: Handle an additional PC-relative instruction
Fri, May 29, 10:09 PM
markj committed rG25bb939c7871: kinst/arm64: Fix return values from kinst_invop() (authored by markj).
kinst/arm64: Fix return values from kinst_invop()
Fri, May 29, 10:09 PM
markj committed rGe97ce8cae292: tests/if_carp: Run all tests with execenv=jail (authored by markj).
tests/if_carp: Run all tests with execenv=jail
Fri, May 29, 10:09 PM
markj committed rGc5ad71c31160: eventhandler: Fix the NODEBUG build (authored by markj).
eventhandler: Fix the NODEBUG build
Fri, May 29, 9:40 PM
markj committed rG81e894d5f3b4: epoch: Don't idle CPUs when there's pending epoch work (authored by markj).
epoch: Don't idle CPUs when there's pending epoch work
Fri, May 29, 8:58 PM
markj committed rG4a875b186e8d: eventhandler: Fix a race when pruning eventhandlers (authored by markj).
eventhandler: Fix a race when pruning eventhandlers
Fri, May 29, 8:58 PM
markj accepted D57328: imgact_elf: add sysctl kern.elfXX.phnums for the number of program headers.
Fri, May 29, 7:37 PM
markj requested review of D57342: ip6: Drop dead code in ip6_input_hbh().
Fri, May 29, 7:33 PM
markj added a comment to D57154: net: Fix handling of unmapped user pages in if_getgroup().

Ping? I've converted the locking here as requested.

Fri, May 29, 7:24 PM
markj added a comment to D56942: lagg: Handle a port count of zero.

Ping? I'd like to commit this if there are no objections. The bug it fixes is real, and this patch or something like it is required no matter how other if_lagg lifecycle issues are handled.

Fri, May 29, 7:23 PM
markj requested review of D57341: udp: Fix resource leaks in an error path in udp6_send().
Fri, May 29, 7:18 PM
markj added inline comments to D56166: Add filename glob matching to mac_bsdextended.
Fri, May 29, 5:45 PM

Thu, May 28

markj accepted D57291: inpcb: make net.inet.ip.portrange port number limiting sysctls unsigned.
Thu, May 28, 8:26 PM
markj added inline comments to D57305: vfs: work around the race between vget() and vnlru.
Thu, May 28, 7:42 PM
markj added inline comments to D57304: dhclient.conf.5: Add supersede interface-mtu to example.
Thu, May 28, 6:24 PM
markj accepted D57266: rtnetlink: Fix weight overflow in RTA_MULTIPATH.
Thu, May 28, 3:27 PM
markj accepted D57294: imgact_elf: read program headers if not contained in the first page.
Thu, May 28, 3:25 PM
markj added inline comments to D57294: imgact_elf: read program headers if not contained in the first page.
Thu, May 28, 3:15 PM
markj added inline comments to D57294: imgact_elf: read program headers if not contained in the first page.
Thu, May 28, 3:04 PM
markj added a comment to D57274: bsdinstall: Use libarchive secure flags for extract.

I mean, sure, I guess, but what's the threat model here? I sure hope you trust the tarballs you're unpacking to install a system not to be malicious, otherwise what's the point?

I could come up with a contrived exploit scenario, but yes if someone controls the tarballs being unpacked during install it's likely much easier to just provide a trojaned binary.

This came to secteam and I thought "sure, why not."

Thu, May 28, 1:07 PM
markj added inline comments to D57294: imgact_elf: read program headers if not contained in the first page.
Thu, May 28, 12:47 PM
markj accepted D57274: bsdinstall: Use libarchive secure flags for extract.
Thu, May 28, 12:25 PM
markj accepted D57298: certctl: Style nits.
Thu, May 28, 12:16 PM
markj accepted D49566: sys: add safe_read(9).
Thu, May 28, 12:14 PM
markj accepted D57297: tests: Fix reliability issues in POSIX ACL tests.
Thu, May 28, 12:07 PM