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

[email protected]
Newsgroups gmane.os.freebsd.bugs
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297553

--- Comment #1 from Dr. Johannes Brügmann <[email protected]> ---
Addendum to the suggested fix: zfsimpl.c is #include'd by two consumers, so the
added argument has to be passed at both call sites. I missed the second one in
the original report.

    stand/libsa/zfs/zfs.c:44         #include "zfsimpl.c"
    stand/efi/boot1/zfs_module.c:37  #include "zfsimpl.c"

boot1 does not need the object number:

--- stand/efi/boot1/zfs_module.c
-     if ((err = zfs_lookup(&zmount, filepath, &dn)) != 0) {
+     if ((err = zfs_lookup(&zmount, filepath, &dn, NULL)) != 0) {

Without this hunk the build fails with
"zfs_module.c:208:46: error: too few arguments to function call, expected 4,
have 3".

A three-argument wrapper around the new function would be the alternative, but
it
would be unused in the zfs.c translation unit and draw -Wunused-function.

With both hunks plus the zfs.c/zfsimpl.c changes from the report, stand builds
cleanly on amd64.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.