Page MenuHomeFreeBSD

jhb (John Baldwin)
User

Projects (8)

User Details

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

Recent Activity

Fri, Jul 19

jhb committed rGe0649a35a670: libnvmf: Zero controller data template for I/O controllers (authored by jhb).
libnvmf: Zero controller data template for I/O controllers
Fri, Jul 19, 9:08 PM
jhb added a comment to D46000: devel/freebsd-gcc14: External FreeBSD toolchain based on GCC 14..

I should have noted that I've built an amd64 kernel and world with this (which did test the printf changes, I had to make changes to forward port the kprintf bits to 14 and had some bugs in my initial version).

Fri, Jul 19, 6:17 PM
jhb updated the diff for D46000: devel/freebsd-gcc14: External FreeBSD toolchain based on GCC 14..

Simplify some bits for removing armv6

Fri, Jul 19, 5:13 PM
jhb closed D46014: fwcontrol: Allocate full fw_asyreq structures passed to the kernel.
Fri, Jul 19, 5:12 PM
jhb committed rG9494dfe1b3fa: fwcontrol: Allocate full fw_asyreq structures passed to the kernel (authored by jhb).
fwcontrol: Allocate full fw_asyreq structures passed to the kernel
Fri, Jul 19, 5:12 PM
jhb committed rG2ba12978f674: ctld: Consistently use item count as the first argument to calloc (authored by jhb).
ctld: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb committed rG7cd0a4c85dbe: bsdinstall: Consistently use item count as the first argument to calloc (authored by jhb).
bsdinstall: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb committed rGa971c6045622: ministat: Consistently use item count as the first argument to calloc (authored by jhb).
ministat: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb committed rG6991cb36f52a: recoverdisk: Consistently use item count as the first argument to calloc (authored by jhb).
recoverdisk: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb committed rGe8e2ab3c5522: md5: Consistently use item count as the first argument to calloc (authored by jhb).
md5: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb committed rG8aadd10a65b1: lib80211: Consistently use item count as the first argument to calloc (authored by jhb).
lib80211: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb committed rGb73445a32f8a: elftoolchain: Consistently use item count as the first argument to calloc (authored by jhb).
elftoolchain: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb closed D46013: ctld: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb committed rGbf3b889a5be1: libgeom: Consistently use item count as the first argument to calloc (authored by jhb).
libgeom: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb closed D46012: bsdinstall: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb closed D46011: ministat: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb closed D46010: recoverdisk: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb committed rG5275d1ddb42d: libcasper: Consistently use item count as the first argument to calloc (authored by jhb).
libcasper: Consistently use item count as the first argument to calloc
Fri, Jul 19, 5:08 PM
jhb closed D46009: md5: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb closed D46008: lib80211: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb closed D46007: elftoolchain: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb committed rG680f40f38343: stdatomic: Only use clang atomics if __clang__ is defined (authored by jhb).
stdatomic: Only use clang atomics if __clang__ is defined
Fri, Jul 19, 5:08 PM
jhb closed D46006: libgeom: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb closed D46005: libcasper: Consistently use item count as the first argument to calloc.
Fri, Jul 19, 5:08 PM
jhb closed D46001: stdatomic: Only use clang atomics if __clang__ is defined.
Fri, Jul 19, 5:07 PM
jhb added a comment to D46014: fwcontrol: Allocate full fw_asyreq structures passed to the kernel.
In D46014#1049503, @jhb wrote:

Also, I think this kind of pattern is behind many of our -Warray-bounds
violations too, where we allocate a part of a structure and then rely on
code referring to only those parts. Especially in areas like cam. This
one is a little different in that we apparently also actually access
beyond the short allocation.

Well, some of those are due to using [0] arrays instead of the more modern syntax for variable length arrays.

This is a tangent obviously, but since we're talking about this kind of warning cleanup, and I've been thinking about whether it is worth time to go address it.

My understanding, at least of the docs, is that -Warray-bounds does not warn about old-style VLAs where the [0] array is at the end of the structure, at least not by default.
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-array-bounds

Fri, Jul 19, 4:27 PM
jhb added inline comments to D46019: usr.sbin/uhsoctl: correct SIOCDIFADDR calls to use ifreq.
Fri, Jul 19, 3:55 PM
jhb accepted D46017: sbin/nos-tun: correct SIOCDIFADDR calls to use ifreq.
Fri, Jul 19, 3:53 PM
jhb committed rGeb1f2709509f: x86 NOTES: Move shared options from amd/i386 NOTES to x86 NOTES (authored by jhb).
x86 NOTES: Move shared options from amd/i386 NOTES to x86 NOTES
Fri, Jul 19, 3:41 PM
jhb committed rG4ecd329b73fa: sys: Retire the ISCSI_INITIATOR_DEBUG option (authored by jhb).
sys: Retire the ISCSI_INITIATOR_DEBUG option
Fri, Jul 19, 3:41 PM
jhb committed rGd1c97c1871d2: NOTES: Move ENABLE_ALART option to MI NOTES next to intpm device (authored by jhb).
NOTES: Move ENABLE_ALART option to MI NOTES next to intpm device
Fri, Jul 19, 3:41 PM
jhb committed rG6563c2a32878: x86 NOTES: Remove some obsolete comments (authored by jhb).
x86 NOTES: Remove some obsolete comments
Fri, Jul 19, 3:41 PM
jhb committed rG883640ffd7c6: x86 NOTES: Move NKPT and PMAP_SHPGPERPROC options to VM OPTIONS section (authored by jhb).
x86 NOTES: Move NKPT and PMAP_SHPGPERPROC options to VM OPTIONS section
Fri, Jul 19, 3:41 PM
jhb committed rG65e871e7c19a: i386: Use DEV_HYPERV to enable HyperV APIC vector (authored by jhb).
i386: Use DEV_HYPERV to enable HyperV APIC vector
Fri, Jul 19, 3:41 PM
jhb committed rGc0e4d9487392: NOTES: Move the VirtIO entries to the MI NOTES file (authored by jhb).
NOTES: Move the VirtIO entries to the MI NOTES file
Fri, Jul 19, 3:41 PM
jhb committed rGe1d29e6b1246: files: Sort the VirtIO device entries (authored by jhb).
files: Sort the VirtIO device entries
Fri, Jul 19, 3:41 PM
jhb committed rG97d1a0cde140: NOTES: Move safe(4) to the MI NOTES file (authored by jhb).
NOTES: Move safe(4) to the MI NOTES file
Fri, Jul 19, 3:41 PM
jhb committed rGc68dcc078121: NOTES: Move IEEE80211_DEBUG_REFCNT to the MI NOTES file (authored by jhb).
NOTES: Move IEEE80211_DEBUG_REFCNT to the MI NOTES file
Fri, Jul 19, 3:41 PM
jhb committed rGff74083a6c35: files.x86: Pull in some more duplicate lines from files.{amd64,i386} (authored by jhb).
files.x86: Pull in some more duplicate lines from files.{amd64,i386}
Fri, Jul 19, 3:41 PM
jhb committed rG9f756367a07a: NOTES: Move NVMe entries to MI file (authored by jhb).
NOTES: Move NVMe entries to MI file
Fri, Jul 19, 3:41 PM
jhb committed rG24687a65dd7f: sys: Enable NVMe drivers on all architectures (authored by jhb).
sys: Enable NVMe drivers on all architectures
Fri, Jul 19, 3:40 PM
jhb committed rG15e2ffbbfade: NOTES: Tidy entries for SATA controllers (authored by jhb).
NOTES: Tidy entries for SATA controllers
Fri, Jul 19, 3:40 PM
jhb committed rGd6f503b7815a: NOTES: Add devices for iSCSI support (authored by jhb).
NOTES: Add devices for iSCSI support
Fri, Jul 19, 3:40 PM
jhb committed rG41302e9e78ad: iser: Add kernel build glue (authored by jhb).
iser: Add kernel build glue
Fri, Jul 19, 3:40 PM
jhb committed rG422911ca5873: NOTES: Move OFED options to MI NOTES (authored by jhb).
NOTES: Move OFED options to MI NOTES
Fri, Jul 19, 3:40 PM
jhb added a comment to D46032: ada/da: Ignore CCBs at wrong priority in *start.

I suspect users won't report random printfs, so if you want to commit this upstream it probably needs to be a panic/KASSERT instead so users will notice.

Fri, Jul 19, 3:38 PM
jhb accepted D46038: cam/iosched: Make each periph driver provide schedule fnp.
Fri, Jul 19, 3:34 PM
jhb accepted D46036: cam/iosched: Log outlier latency events.
Fri, Jul 19, 3:32 PM
jhb added a comment to D46036: cam/iosched: Log outlier latency events.

Do you want a global knob to control if devd reports are enabled rather than just the counts?

Fri, Jul 19, 3:31 PM
jhb accepted D46035: cam/iosched: Pass in the disk when initializing.
Fri, Jul 19, 3:29 PM
jhb accepted D46034: cam/iosched: Pass the transaction down we're collecting stats for.
Fri, Jul 19, 3:26 PM
jhb accepted D46033: cam/iosched: Add a counter of I/Os that take too long.
Fri, Jul 19, 3:25 PM
jhb accepted D46029: cxgbe(4): Changes to ULD list management..
Fri, Jul 19, 3:24 PM
jhb accepted D46028: cxgbe(4): Make no assumptions about the start and size of the L2T table..
Fri, Jul 19, 3:20 PM
jhb accepted D46018: usr.sbin/ppp: correct SIOCDIFADDR{,_IN6} calls to use {,in6_}ifreq.

sbin/nos-tun/nos-tun.c and usr.sbin/uhsoctl/uhsoctl.c both have the same mistake

Fri, Jul 19, 3:18 PM
jhb added a comment to D46014: fwcontrol: Allocate full fw_asyreq structures passed to the kernel.

I guess you can also consider if you want to make the malloc spelling more conventional. Don't need the casts, and can now do sizeof(*asyreq). I'm ambivalent, but in case you hadn't considered it.

Fri, Jul 19, 3:10 PM
jhb added a comment to D46014: fwcontrol: Allocate full fw_asyreq structures passed to the kernel.

I don't know this code but I'm assuming that we don't really care about
the overhead here or performance generally for this ioctl. In other
words, we don't need a longer term fix to do a saner amount of copying,
correct? It seems that we never actually use asyreq->data in the ioctl,
so we're now allocating and passing around an extra 2k because of a
weird definition?

Fri, Jul 19, 3:09 PM
jhb added a comment to D46014: fwcontrol: Allocate full fw_asyreq structures passed to the kernel.

Why is struct fw_asyreq_t even a type?

Fri, Jul 19, 3:06 PM
jhb accepted D45991: cxgbe/t4_tom: Free up hardware resources when the final CPL is received..
Fri, Jul 19, 3:02 PM
jhb accepted D45990: cxgbe/t4_tom: Detach the toep from the tcpcb when entering TIME_WAIT..

In commit 0d7445193abc7c68703fd9b6de39f3f6cf6b55c9, tcp_twstart() stopped calling tcp_discardcb(), and tcp_discardcb() is what was calling tod_pcb_detach. I guess in theory when time wait completes and the inp is freed is when detach would get called? Another possible fix would be to change tcp_twstart() to explicitly call tcp_offload_detach()? That would fix T3 and not just T4. Alternatively, we could add a new tod_twstart hook and in then in the T4 TOM driver we could have that call t4_pcb_detach?

Fri, Jul 19, 3:01 PM

Thu, Jul 18

jhb committed rGee912ee57a21: nvmecontrol: Treat requested KeepAlive timeout as seconds (authored by jhb).
nvmecontrol: Treat requested KeepAlive timeout as seconds
Thu, Jul 18, 6:56 PM
jhb accepted D32955: Retire unused non-PCI_RES_BUS code.
Thu, Jul 18, 5:54 PM
jhb committed rG03248b3f5079: NOTES: Correct swapped descriptions of virtio_scmi and virtio_scsi (authored by jhb).
NOTES: Correct swapped descriptions of virtio_scmi and virtio_scsi
Thu, Jul 18, 5:31 PM

Wed, Jul 17

jhb added a comment to D46001: stdatomic: Only use clang atomics if __clang__ is defined.

I think as part of your cleanup of cdefs.h, we can probably drop the pre-GCC 4.7 path entirely. We already don't support versions of GCC that old in cdefs.h now I think?

Wed, Jul 17, 7:58 PM
jhb added a comment to D46013: ctld: Consistently use item count as the first argument to calloc.

Also, given the number of changes to be fixed, and that in many cases it made individual files or programs more consistent (e.g. all but a small number of calls were already correct), I think I'd prefer to just leave the calloc warning enabled going forward rather than muting it.

Wed, Jul 17, 7:57 PM
jhb added a comment to D46013: ctld: Consistently use item count as the first argument to calloc.

Yes, in general I avoided changing the ones that were an array of bytes (e.g. for strings or opaque buffers) as you can argue it either way (a single opaque buffer, or an array of bytes). In this case GCC only warned about the first one, but here I believe it is obvious that rather than being an opaque buffer, the second one is really allocating a struct isns_hdr object, so the size really should be the second argument there as well.

Wed, Jul 17, 7:55 PM
jhb added a reviewer for D46014: fwcontrol: Allocate full fw_asyreq structures passed to the kernel: brooks.
Wed, Jul 17, 7:26 PM
jhb added a comment to D46007: elftoolchain: Consistently use item count as the first argument to calloc.

Note that this was the only calloc instance in all of elftc that GCC warned about. All the others (even in this file) were already consistent with the number being first.

Wed, Jul 17, 7:26 PM
jhb added a comment to D46004: libcxxrt: Add a stub implementation of __cxa_call_terminate.

I am not at all confident that this implementation is correct, and I've opened an upstream issue at https://github.com/libcxxrt/libcxxrt/issues/35

Wed, Jul 17, 7:25 PM
jhb requested review of D46014: fwcontrol: Allocate full fw_asyreq structures passed to the kernel.
Wed, Jul 17, 7:16 PM
jhb requested review of D46013: ctld: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb requested review of D46012: bsdinstall: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb added a reviewer for D46003: Merge commit cb7a03b41fff from llvm git (by Nikolas Klauser):: dim.
Wed, Jul 17, 7:16 PM
jhb requested review of D46011: ministat: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb requested review of D46010: recoverdisk: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb requested review of D46009: md5: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb requested review of D46008: lib80211: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb requested review of D46007: elftoolchain: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb requested review of D46006: libgeom: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb requested review of D46005: libcasper: Consistently use item count as the first argument to calloc.
Wed, Jul 17, 7:16 PM
jhb requested review of D46004: libcxxrt: Add a stub implementation of __cxa_call_terminate.
Wed, Jul 17, 7:16 PM
jhb requested review of D46003: Merge commit cb7a03b41fff from llvm git (by Nikolas Klauser):.
Wed, Jul 17, 7:16 PM
jhb abandoned D46002: openssl: Add <sys/random.h> include for getrandom().

Duplicate of D45995

Wed, Jul 17, 7:15 PM
jhb requested review of D46002: openssl: Add <sys/random.h> include for getrandom().
Wed, Jul 17, 7:14 PM
jhb requested review of D46001: stdatomic: Only use clang atomics if __clang__ is defined.
Wed, Jul 17, 7:14 PM
jhb added a comment to D46000: devel/freebsd-gcc14: External FreeBSD toolchain based on GCC 14..

Changes relative to devel/freebsd-gcc13:

Wed, Jul 17, 7:12 PM
jhb requested review of D46000: devel/freebsd-gcc14: External FreeBSD toolchain based on GCC 14..
Wed, Jul 17, 7:10 PM
jhb accepted D45999: pipe: keep uio_iovcnt consistent.
Wed, Jul 17, 7:01 PM
jhb added a reviewer for D45999: pipe: keep uio_iovcnt consistent: brooks.
Wed, Jul 17, 6:58 PM
jhb added a comment to D45981: sys: Stop requiring nested parentheses for KASSERT.
In D45981#1048758, @jhb wrote:

I'd kind of wanted to kill MPASS eventually since I have used it for all sorts of assertions that have nothing to do with SMP, and other assertions in the language permit 1 argument variants (assert() and static_assert()). However, it is simpler to not have the single arg version and it does mean _KASSERT_MACRO would be temporary. We could always add a single arg variant later if we wanted.

Are you saying it would become easier to support the single arg version after fully transitioning from the old-style KASSERT (and dropping the API compat)? In that case a two-staged transition makes sense, although it would have to happen over a longer time-frame.

I agree it would be ideal to replace MPASS with a single-arg KASSERT, if it can be cleanly done. If not we still should find-and-replace MPASS to be something like KASSERT0, or KASSERT1, and it would be an improvement.

Wed, Jul 17, 6:58 PM
jhb added a comment to D45981: sys: Stop requiring nested parentheses for KASSERT.

I'd kind of wanted to kill MPASS eventually since I have used it for all sorts of assertions that have nothing to do with SMP, and other assertions in the language permit 1 argument variants (assert() and static_assert()). However, it is simpler to not have the single arg version and it does mean _KASSERT_MACRO would be temporary. We could always add a single arg variant later if we wanted.

Wed, Jul 17, 4:35 PM
jhb accepted D32954: Retire non-NEW_PCIB code and remove config option.
Wed, Jul 17, 4:26 PM
jhb updated the diff for D45995: openssl: Add <sys/random.h> include for getrandom().

Move UEFI condition

Wed, Jul 17, 2:07 PM
jhb added inline comments to D45995: openssl: Add <sys/random.h> include for getrandom().
Wed, Jul 17, 2:05 PM
jhb requested review of D45995: openssl: Add <sys/random.h> include for getrandom().
Wed, Jul 17, 2:00 PM
jhb abandoned D45992: libc: Use __weak_symbol for poll/ppoll wrappers.

Nevermind, didn't see that you'd already fixed this.

Wed, Jul 17, 12:29 PM
jhb added a comment to D45981: sys: Stop requiring nested parentheses for KASSERT.
In D45981#1048465, @jhb wrote:

Doesn't the use of _KASSERT_MACRO artificially limit the number of printf arguments, including format string, to 11 (possibly off by one)? Whilst parenthesising in that case is fine for now, I don't think we want to have that limitation long-term, especially once the parenthesised form is gone...

It does, though if we need more arguments in the future we can expand the macro to work. I just chose 10 as a SWAG for the max arguments for now. If we didn't care about the single argument version we could eventually drop _KASSERT_MACRO entirely, but if we want the single argument version to work we are stuck with it I think.

Given that not giving a message is lazy and bad practice that should not be encouraged, I'm loathe to add such hacks and restrictions just to support it. There's always MPASS if you really want it, or we can add a KASSERT1, but it's worth pointing out that MPASS at least gives you the file and line number when there's no message, unlike KASSERT which will just print the condition with no context other than what DDB can infer.

Wed, Jul 17, 12:28 PM
jhb requested review of D45992: libc: Use __weak_symbol for poll/ppoll wrappers.
Wed, Jul 17, 12:25 PM

Tue, Jul 16

jhb added a comment to D45981: sys: Stop requiring nested parentheses for KASSERT.

Doesn't the use of _KASSERT_MACRO artificially limit the number of printf arguments, including format string, to 11 (possibly off by one)? Whilst parenthesising in that case is fine for now, I don't think we want to have that limitation long-term, especially once the parenthesised form is gone...

Tue, Jul 16, 6:14 PM

Mon, Jul 15

jhb requested review of D45981: sys: Stop requiring nested parentheses for KASSERT.
Mon, Jul 15, 9:24 PM