integer overflow checking in the kernel

From: Mark Johnston <markj_at_freebsd.org>
Date: Mon, 10 Aug 2026 22:12:59 UTC
In the kernel we don't have any dedicated macros or functions for
checking for overflow in integer operations.  We have many open-coded
checks, but it can be tricky to get those right in the face of integer
promotion rules.

I propose that we simply adopt the macros from C23's stdckdint.h.  These
are just thin wrappers around __builtin_*_overflow.  I posted a patch
which implements this at https://reviews.freebsd.org/D58773 and I also
converted a couple of existing checks.

Any reviews/thoughts/objections?