[Bug 297553] stand: zfs_stat() leaves st_dev and st_ino uninitialised, breaking loader veriexec

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 15 Aug 2026 15:32:13 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297553

--- Comment #2 from Dr. Johannes Brügmann <dr.johannes.bruegmann@gmail.com> ---
Unrelated side note, found while building lib/libsecureboot/tests (which uses a
higher WARNS level than the stand build): three function-pointer casts in the
OpenPGP decoder are incompatible with the typedef.

  decode.h:46     typedef int (*decoder_t)(int, unsigned char **, int, void *);
  opgp_key.c:67   ssize_t decode_key (int, unsigned char **, size_t,
OpenPGP_key *);
  opgp_key.c:40   ssize_t decode_user(int, unsigned char **, size_t,
OpenPGP_user *);
  opgp_sig.c:109  ssize_t decode_sig (int, unsigned char **, size_t,
OpenPGP_sig *);

Call sites: opgp_key.c:176, opgp_key.c:188, opgp_sig.c:314.

Return type (int vs ssize_t) and third argument (int vs size_t) differ, i.e.
the
calls go through an incompatible function pointer type. On amd64 it works in
practice; I have no failing case to show, so this is cosmetic as far as I can
tell. Aligning the typedef would remove all three casts:

  typedef ssize_t (*decoder_t)(int, unsigned char **, size_t, void *);

-- 
You are receiving this mail because:
You are the assignee for the bug.