OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-548-g2da73d0

Gerrit Code Review gerrit@openafs.org
Tue, 28 Jul 2026 15:28:32 -0400


The following commit has been merged in the master branch:
commit 2da73d0f97e7aef3b31bbc2f08194cd826899232
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Mon Jul 28 23:26:26 2025 -0500

    opr: Allow opr_Assert() in KERNEL
    
    Currently, the kernel module on Solaris fails to load (but builds
    successfully), because of missing symbol opr_AssertionFailed:
    
        # modload /kernel/drv/amd64/afs
        Cannot load module: /kernel/drv/amd64/afs: Invalid argument
        # dmesg | tail
        Jul 28 10:32:41.671 hostname krtld: [ID 126188 kern.warning] /kernel/drv/amd64/afs: Shdr[19].rela.text: relocation[26078] error: R_AMD64_PC32: symbol not found: opr_AssertionFailed
        Jul 28 10:32:41.672 hostname krtld: [ID 592292 kern.warning] WARNING: unable to load module: afs: Invalid argument
    
    The symbol is referenced in opr_time64_sub() and opr_time64_fromSecs(),
    because those functions call opr_Verify(). Even though those functions
    are not used in KERNEL, the references are enough to prevent the module
    from loading.
    
    This issue was probably introduced somewhere around these commits:
    
        d92f0d82f9 rxgk: Introduce and use afs_time64 for time
        1c8bf700e3 opr: Introduce opr_time64_sub()
    
    But may have been affected by adjustments in callers, or may be affected
    by build options.
    
    To fix this, allow opr_Assert() and opr_Verify() to be called in KERNEL,
    by simply redirecting them to osi_Assert(). While we could instead avoid
    defining these functions for KERNEL at all, allowing
    opr_Assert()/opr_Verify() tends to make things easier.
    
    To do this, also move the prototype for osi_AssertFailK() from
    rx_prototypes.h to rx_kernel.h. This is because some #include paths end
    up including opr/time.h before rx/rx_prototypes.h; opr/time.h
    effectively uses osi_AssertFailK() now for KERNEL, and this causes a
    compilation error without the prototype:
    
    ".../include/opr/time.h", line 251: warning: implicit function declaration: osi_AssertFailK
    ".../src/rx/rx_prototypes.h", line 282: identifier redeclared: osi_AssertFailK
            current : function(pointer to const char, pointer to const char, int) returning void
            previous: function() returning int : ".../include/opr/time.h", line 251
    
    Since rx_kernel.h is the only thing that references osi_AssertFailK()
    directly, it makes sense for the prototype to live in there.
    
    Thanks to mvitale@sinenomine.net for reporting this issue.
    
    Change-Id: I59fc81333d7d680f2996e500b05d86ffca87a41a
    Reviewed-on: https://gerrit.openafs.org/16894
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Tested-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>

 src/opr/opr.h          | 33 +++++++++++++++++++++------------
 src/rx/rx_kernel.h     |  5 +++++
 src/rx/rx_prototypes.h |  3 ---
 3 files changed, 26 insertions(+), 15 deletions(-)

-- 
OpenAFS Master Repository