OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-385-g4e9ea46

Gerrit Code Review gerrit@openafs.org
Wed, 19 Nov 2025 00:21:11 -0500


The following commit has been merged in the master branch:
commit 4e9ea46d3e551fd27956af6720b34b6f4e99ca21
Author: Ben Huntsman <ben@huntsmans.net>
Date:   Tue Jan 7 12:24:47 2025 -0800

    export: Initialize cload and cmod
    
    In our cfgafs and cfgexport programs (used for loading our kernel
    extensions), the 'cload' and 'cmod' structs are not fully initialized.
    Notably, cload.libpath is never set, and so may contain garbage.
    
    According to the AIX documentation for SYS_KLOAD sysconfig() call, this
    'libpath' field contains the search path to use for resolving imported
    symbols, overriding the path in the headers of the kernel extension
    object file if it's not NULL. When using the Open XL C 17.1+ compiler,
    we seem to get consistently get garbage in this field, causing the
    sysconfig() call to fail, showing an error:
    
        Could not load program cfgexport:
    
    This appears to actually work when using the XL C 16.1 compiler and
    older, but is clearly still not ideal.
    
    To allow the kernel extension to load and avoid the undefined behavior,
    blank the entire 'cload' struct to make sure everything in it is
    defined. While we're here, do the same for the similar 'cmod' struct,
    used for the SYS_CFGKMOD sysconfig() call.
    
    Change-Id: I8b7a4b53f8413387a0aa54ed4265161ddb869051
    Reviewed-on: https://gerrit.openafs.org/16571
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Ben Huntsman <ben@huntsmans.net>
    Tested-by: Ben Huntsman <ben@huntsmans.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/export/cfgafs.c    | 4 ++++
 src/export/cfgexport.c | 4 ++++
 2 files changed, 8 insertions(+)

-- 
OpenAFS Master Repository