Page MenuHomeFreeBSD

sjg (Simon Gerraty)
User

Projects (2)

User Details

User Since
Apr 9 2015, 9:27 PM (604 w, 2 d)

Recent Activity

Fri, Nov 6

sjg committed rGb22b999afc2d: libsecureboot restore default trust anchors.
Fri, Nov 6, 12:29 AM
sjg closed D61245: libsecureboot restore default trust anchors.
Fri, Nov 6, 12:29 AM

Thu, Nov 5

sjg updated the diff for D61245: libsecureboot restore default trust anchors.

Allow site.trust.mk to set rest of sig tuple

Thu, Nov 5, 11:38 PM
sjg requested review of D61245: libsecureboot restore default trust anchors.
Thu, Nov 5, 11:27 PM

Wed, Nov 4

sjg committed rG9ca2cfeb4e4d: libsecureboot: add support for more signatures.
Wed, Nov 4, 11:09 PM
sjg closed D61007: libsecureboot: add support for more signatures.
Wed, Nov 4, 11:09 PM
sjg updated the diff for D61007: libsecureboot: add support for more signatures.

Use M_unique to suppress duplicates in VE_SIGNATURE_LIST

Wed, Nov 4, 4:08 AM

Fri, Oct 30

sjg updated the diff for D61007: libsecureboot: add support for more signatures.

Fix some wording to be more consistent

Fri, Oct 30, 4:07 AM
sjg requested review of D61007: libsecureboot: add support for more signatures.
Fri, Oct 30, 3:51 AM

Wed, Oct 14

sjg committed rG34e92fb6bd8d: hooks.sh allow running DebugO{n,ff} from hooks_run.
Wed, Oct 14, 12:00 AM

Tue, Oct 13

sjg committed rG064edc2ceb77: debug.sh avoid trouble from set -e.
Tue, Oct 13, 11:09 PM
sjg committed rG5efc40dd13a7: safe_eval.sh: safe_set_var add allow list for values.
Tue, Oct 13, 11:09 PM

Sun, Oct 11

sjg committed rG58a8f100a6fd: safe_eval.sh: safe_set_var use [:space:] if possible.
Sun, Oct 11, 9:56 PM
sjg committed rG7c75c96d176f: safe_eval.sh: safe_set_var avoid positional args.
Sun, Oct 11, 6:13 PM
sjg committed rG9f0432041b8f: safe_eval.sh fix description of safe_set_var returns..
Sun, Oct 11, 6:06 AM
sjg committed rG475e3bc18a10: safe_eval.sh: add safe_set_var.
Sun, Oct 11, 5:55 AM
sjg committed rG0fa0966b6a5a: safe_eval.sh add safe_var_set.
Sun, Oct 11, 4:59 AM

Sep 23 2026

sjg added a comment to D59882: import libxo-2.3.0.

Impressive ;-)
A few nits mostly around white-space and layout.
I skipped the bits I don't grok

Sep 23 2026, 7:07 PM

Sep 22 2026

sjg added a comment to D59424: bmake: use longer and more unique tempfile names.

FYI this has been addressed in NetBSD, will be in the next import

Sep 22 2026, 10:53 PM

Sep 21 2026

sjg added a comment to D59424: bmake: use longer and more unique tempfile names.

Q why 10 ? mktemp(1) on netbsd uses 8 in its examples, mktemp(1) on freebsd uses 6

Sep 21 2026, 3:53 AM
sjg added inline comments to D59424: bmake: use longer and more unique tempfile names.
Sep 21 2026, 3:38 AM
sjg added a comment to D59424: bmake: use longer and more unique tempfile names.

Yes, this should be addressed in upstream

Sep 21 2026, 3:27 AM

Aug 26 2026

sjg added inline comments to D59141: loader.efi: Measure boot policy and loaded contents with a TPM.
Aug 26 2026, 3:48 AM

Aug 15 2026

sjg added a member for Src Committers: sjg.
Aug 15 2026, 6:19 PM

Jul 8 2026

sjg added a comment to D58063: kern: imgact: fix imgp->interpreted.

I'll remove the |= bit of this patch and related commentary in the commit message. I won't change the kern_exec.c part of the patch, but I do want to think about whether it would be useful for imgp->interpreted to reflect all of the interpreters involved in the chain -- it could be that it's useful to set IMGACT_INTERP_ELF in imgp->interpreted back where __elfN(load_interp) is first called in the elf activator. I'm not sure I see how at the moment, though:

Jul 8 2026, 3:57 AM

Jul 6 2026

sjg added a comment to D58063: kern: imgact: fix imgp->interpreted.
In D58063#1331519, @sjg wrote:

Hmm, the last bit seems to be wrong because elf's imgact will set interpreted = 0 anyways. Actually, that seems to happen *after* we set it in load_interp_file -- was there something missing from the original patch?

I don't think so. The original problem was that when exec'ing ld-elf.so the 'interpreted' field was not set so if we set veriexec's indirect flag on ld-elf.so, mac_veriexec thinks it is a direct exec and blocks it - which is sub-optimal. Simply having imgp->interpreted != 0 is sufficient to address that.

Right, but as far as I can tell it won't work right in vanilla FreeBSD. We set imgp->interpreted = 0 here:

https://cgit.freebsd.org/src/tree/sys/kern/imgact_elf.c#n1461

After you would have set it non-zero up in load_interp -- I think clearing it needs to move above the interp != NULL branch, or the |= here changes back to = and we just clear it in the else block (interp == NULL).

Jul 6 2026, 10:18 PM
sjg added a comment to D58063: kern: imgact: fix imgp->interpreted.

Hmm, the last bit seems to be wrong because elf's imgact will set interpreted = 0 anyways. Actually, that seems to happen *after* we set it in load_interp_file -- was there something missing from the original patch?

Jul 6 2026, 10:05 PM
sjg accepted D58063: kern: imgact: fix imgp->interpreted.
Jul 6 2026, 9:58 PM

Jul 5 2026

sjg committed rG5dfe1956df4b: Merge bmake-20260704.
Jul 5 2026, 6:33 PM
sjg committed rGe988c5eab523: Import bmake-20260704.
Jul 5 2026, 6:24 PM

Jun 21 2026

sjg committed rGc37839dc7b6a: meta.autodep.mk remove extra }.
Jun 21 2026, 7:20 PM
sjg closed D57727: meta.autodep.mk remove extra }.
Jun 21 2026, 7:20 PM
sjg requested review of D57727: meta.autodep.mk remove extra }.
Jun 21 2026, 7:17 PM

Jun 19 2026

sjg committed rG7386c0675c89: Update dirdpes.mk et al.
Jun 19 2026, 8:30 PM
sjg closed D57683: Update dirdpes.mk et al.
Jun 19 2026, 8:30 PM
sjg added a comment to D57683: Update dirdpes.mk et al.

Minor things in the python found by pep8, but the rest looks good.

Jun 19 2026, 8:28 PM
sjg committed rG389c124fecb0: imgact_elf.c indicate that interpreter is an interpreter.
Jun 19 2026, 8:23 PM
sjg requested review of D57683: Update dirdpes.mk et al.
Jun 19 2026, 8:05 PM

Jun 17 2026

sjg accepted D57356: build: provide a FORTIFY_SOURCE.<src file> override.
Jun 17 2026, 7:09 PM

Jun 16 2026

sjg accepted D57604: bsnmpd/snmp_hostres: fix hrFSTable remoteMountPoint leak.

ok

Jun 16 2026, 12:44 PM

May 18 2026

sjg committed rG701d7be6e4a9: Add test cases for safe_eval.sh.
May 18 2026, 5:53 PM
sjg closed D56795: Add test cases for safe_eval.sh.
May 18 2026, 5:52 PM

May 13 2026

sjg committed rG1729d2f741a1: Merge bmake-20260508.
May 13 2026, 4:32 AM
sjg committed rGef402bba8426: Import bmake-20260508.
May 13 2026, 4:23 AM

May 8 2026

sjg added a comment to D54542: release: Build the release media from packages.

make(1) documents - as

-       in compatibility mode causes any non-zero exit status of
        the command line to be ignored.

and is followed by a fuller explanation of behaviour in non-compatibility mode in a paragraph. @sjg to me this implies that - does not ignore non-zero exit status in non-compatibility mode, and ought to be clarified. What about something like - causes any non-zero exit status of the command line to be ignored. The behaviour is slightly different when make is run in compatibility vs jobs mode; see below?

May 8 2026, 3:23 PM

May 7 2026

sjg committed rG586838724e40: Remove PROC_CHECK_PRIV macro from sys_process.c.
May 7 2026, 3:50 AM
sjg closed D56864: Remove PROC_CHECK_PRIV macro from sys_process.c.
May 7 2026, 3:49 AM
sjg updated the diff for D56864: Remove PROC_CHECK_PRIV macro from sys_process.c.

Check for error != 0

May 7 2026, 3:15 AM
sjg requested review of D56864: Remove PROC_CHECK_PRIV macro from sys_process.c.
May 7 2026, 1:27 AM

May 5 2026

sjg committed rG8334d46162e4: Fix typo in curthread.
May 5 2026, 8:15 PM
sjg updated the diff for D56795: Add test cases for safe_eval.sh.

delete lines containing backtics or $()

May 5 2026, 6:15 PM
sjg committed rGadad6862228d: mac_veriexec_priv_check block proc_write_*regs*.
May 5 2026, 5:30 PM
sjg updated the diff for D56795: Add test cases for safe_eval.sh.

Fix comment to match the expected result.

May 5 2026, 6:01 AM
sjg updated the diff for D56795: Add test cases for safe_eval.sh.

Add quotes around result if we see _ followed by space.

May 5 2026, 5:59 AM
sjg updated the diff for D56795: Add test cases for safe_eval.sh.

Add $() example

May 5 2026, 4:32 AM

May 4 2026

sjg requested review of D56795: Add test cases for safe_eval.sh.
May 4 2026, 6:33 PM

Apr 28 2026

sjg accepted D56676: packages: Make create-sets.sh more robust.

fair enough

Apr 28 2026, 7:30 PM
sjg added inline comments to D56676: packages: Make create-sets.sh more robust.
Apr 28 2026, 7:20 PM

Apr 22 2026

sjg committed rG566cc005812b: safe_set treat ':' and '#' differently.
Apr 22 2026, 4:38 PM
sjg committed rG69cc351c4c91: safe_set ignore leading white-space.
Apr 22 2026, 4:16 PM

Apr 15 2026

sjg accepted D56087: packages: Convert world to a subdir build.
Apr 15 2026, 11:38 PM
sjg added inline comments to D56087: packages: Convert world to a subdir build.
Apr 15 2026, 11:10 PM

Apr 13 2026

sjg committed rGe272f4a61e78: Fix default for .MAKE.SAVE_DOLLARS.
Apr 13 2026, 5:39 PM

Apr 10 2026

sjg committed rG35bbdfad2862: Pass severity to vectx_open() rather than vectx_close().
Apr 10 2026, 5:47 PM
sjg closed D56297: Pass severity to vectx_open() rather than vectx_close().
Apr 10 2026, 5:47 PM
sjg committed rGde9fe28ab847: Allow passing xtras to safe_set.
Apr 10 2026, 4:12 PM

Apr 7 2026

sjg updated the diff for D56297: Pass severity to vectx_open() rather than vectx_close().

Fix arg for LOADER_VERIEXEC_TESTING printf

Apr 7 2026, 11:23 PM
sjg added inline comments to D56087: packages: Convert world to a subdir build.
Apr 7 2026, 10:27 PM
sjg requested review of D56297: Pass severity to vectx_open() rather than vectx_close().
Apr 7 2026, 9:33 PM
sjg committed rGa371b008d13f: Add boot_setenv.
Apr 7 2026, 4:30 PM
sjg closed D56287: Add boot_setenv.
Apr 7 2026, 4:30 PM
sjg added a comment to D56287: Add boot_setenv.
In D56287#1287814, @sjg wrote:
In D56287#1287811, @imp wrote:

I like this, and also @kevans 's suggestion.

So rename it to secure_setenv ?

Apr 7 2026, 3:20 AM
sjg added a comment to D56287: Add boot_setenv.
In D56287#1287811, @imp wrote:

I like this, and also @kevans 's suggestion.

Apr 7 2026, 3:15 AM
sjg added a comment to D56287: Add boot_setenv.

I think the concept is fine, my main nit is: do we want to call this secure_setenv for symmetry with the secure_getenv name we use in libc, for use in security-sensitive getenv() calls?

Apr 7 2026, 1:31 AM
sjg requested review of D56287: Add boot_setenv.
Apr 7 2026, 12:01 AM

Apr 6 2026

sjg committed rGb2751d956e5b: We also get _HOST_OSREL from host-target.mk.
Apr 6 2026, 6:50 PM
sjg committed rG34a3834eadd0: Merge bmake-20260313.
Apr 6 2026, 6:35 PM
sjg committed rGfe271bdb43cf: Import bmake-20260313.
Apr 6 2026, 6:26 PM

Mar 27 2026

sjg added inline comments to D56087: packages: Convert world to a subdir build.
Mar 27 2026, 8:05 PM

Mar 26 2026

sjg added a comment to D56087: packages: Convert world to a subdir build.
In D56087#1283209, @ivy wrote:

about dirdeps: i'm hoping this will allow us to eventually support a dirdeps build for packages, but that's a long-term plan and not something i'm working on right now. but if there's anything we can change here to make that easier in the future (especially if it changes the developer-facing interface) i can definitely look at doing that now.

Mar 26 2026, 11:01 PM
sjg added a comment to D56087: packages: Convert world to a subdir build.
In D56087#1283196, @ivy wrote:
In D56087#1283195, @sjg wrote:

what is the difference b/w packages/ and release/packages/ ?

originally we only had release/packages, but i've moved the new bits to packages/ because packages aren't really a release thing, they're part of the src build. the remaining files in release/packages will go away when i redo the kernel/dtb and src packages.

Mar 26 2026, 9:58 PM
sjg added a comment to D56087: packages: Convert world to a subdir build.

what is the difference b/w packages/ and release/packages/ ?

Mar 26 2026, 9:17 PM
sjg accepted D56087: packages: Convert world to a subdir build.

I like the overall change. I've at most skimmed the makefile bits, but this seems like a move in the right direction.

Tagging @sjg in case he has any thoughts on this. IIRC he has previously said that driving package creation from individual directories was required to support dirdeps packages so hopefully this is a move in the right direction.

Mar 26 2026, 9:01 PM

Mar 8 2026

sjg accepted D55711: bsd.progs.mk: Fix incremental META_MODE for prog sources.

makes sense

Mar 8 2026, 2:19 AM

Feb 21 2026

sjg accepted D55416: debug.sh: Fix a typo.
Feb 21 2026, 7:05 PM · Contributor Reviews (src), rc

Jan 29 2026

sjg added a comment to D30990: src.sys.obj.mk: Export OBJTOP like OBJROOT.

FWIW this simple .export OBJTOP works ok for buildworld but not for targets like universe where multiple arches try to use the same OBJTOP which quickly ends in tears.
The more elaborate patch in https://reviews.freebsd.org/D54819 blows up in buildworld due to being incompatible with assumptions made by all the *compat* bits, but once that compat stuff is fixed, probably has a hope of working for universe too.

Jan 29 2026, 12:26 AM

Jan 22 2026

sjg added a comment to D54819: src.sys.obj.mk export OBJTOP.

Do we need to worry about $s in OBJROOT?

Jan 22 2026, 4:00 PM
sjg updated the diff for D54819: src.sys.obj.mk export OBJTOP.

Remove all but the last := for OBJTOP

Jan 22 2026, 1:09 AM
sjg added a comment to D30990: src.sys.obj.mk: Export OBJTOP like OBJROOT.

Please see https://reviews.freebsd.org/D54819

Jan 22 2026, 1:04 AM
sjg requested review of D54819: src.sys.obj.mk export OBJTOP.
Jan 22 2026, 1:03 AM

Jan 21 2026

sjg added a comment to D30990: src.sys.obj.mk: Export OBJTOP like OBJROOT.

The patch below, builds buildworld ok, avoids these warnings (due to OBJTOP being empty when evaluatinng MAKEOBJDIR which is set to ${.CURDIR:S,${SRCTOP},${OBJTOP},}

diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk
index e4fe3fa9a2aa..67af0b833faa 100644
--- a/share/mk/src.sys.obj.mk
+++ b/share/mk/src.sys.obj.mk
@@ -88,18 +88,22 @@ SB_OBJROOT:= ${OBJROOT}
 # in the source tree.
 .if ${MK_UNIFIED_OBJDIR} == "yes" && ${SRCTOP} != ${OBJROOT:tA}
 .if defined(TARGET) && defined(TARGET_ARCH)
-OBJTOP:=       ${OBJROOT}${TARGET}.${TARGET_ARCH}
+OBJTOP:=       ${OBJROOT}$${TARGET}.$${TARGET_ARCH}
 .elif defined(TARGET) && ${.CURDIR} == ${SRCTOP}
 # Not enough information, just use basic OBJDIR.  This can happen with some
 # 'make universe' targets or if TARGET is not being used as expected.
 OBJTOP:=       ${OBJROOT:H}
 .else
-OBJTOP:=       ${OBJROOT}${MACHINE}.${MACHINE_ARCH}
+OBJTOP:=       ${OBJROOT}$${MACHINE}.$${MACHINE_ARCH}
 .endif
 .else
 # TARGET.TARGET_ARCH handled in OBJROOT already.
 OBJTOP:=       ${OBJROOT:H}
 .endif # ${MK_UNIFIED_OBJDIR} == "yes"
+# export but do not track
+.export-env OBJTOP
+# resolve if needed
+OBJTOP:= ${OBJTOP}
 .endif # empty(OBJTOP)
Jan 21 2026, 7:39 AM

Jan 15 2026

sjg committed rG32dd4b31dd9d: bsd.man.mk fix and simplify staging.
Jan 15 2026, 6:35 PM

Jan 11 2026

sjg committed rG9fed072b4422: bsd.man.mk simplify staging.
Jan 11 2026, 3:00 AM
sjg committed rG9cd89fc5aa3c: bsd.man.mk fix staging.
Jan 11 2026, 2:45 AM

Jan 10 2026

sjg committed rGc95f96dea30a: Update to bmake-20251111.
Jan 10 2026, 9:35 PM
sjg committed rG06366a2188a1: Merge bmake-20250804.
Jan 10 2026, 9:35 PM
sjg committed rGa9319c35e816: Merge bmake-20250308.
Jan 10 2026, 9:35 PM
sjg committed rGeb560911563f: Merge bmake-20250618.
Jan 10 2026, 9:35 PM
sjg committed rG44ad87f77a84: Merge bmake-20250707.
Jan 10 2026, 9:35 PM
sjg committed rG8a4277b9667c: Merge bmake-20250414.
Jan 10 2026, 9:35 PM