OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-307-gbe23606

Gerrit Code Review gerrit@openafs.org
Sun, 18 Feb 2024 22:46:41 -0500


The following commit has been merged in the master branch:
commit be236069e9d26339ed5f9939965bca0dd3f8bf4e
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Tue Jan 30 20:44:48 2024 -0600

    roken: Declare ct_memcmp in hcrypto kernel roken.h
    
    Currently, we build roken's ct.c for our kernel module to provide
    ct_memcmp(). We declare a prototype for ct_memcmp() in krb5_locl.h,
    and all of our kernel callers of ct_memcmp() include krb5_locl.h, so
    all callers get a prototype and avoid "implicit declaration" compiler
    warnings.
    
    However, roken's ct.c itself does not include krb5_locl.h, so it
    doesn't get a prototype for ct_memcmp(). This is dangerous, since if
    the prototype ever slightly differs from the implementation for any
    reason, it could cause a variety of issues.
    
    This also causes warnings when building against a Linux 6.8 kernel
    (which sets the -Wmissing-declarations and -Wmissing-prototypes
    compiler flags as default). Linux 6.8 commit:
     'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
    
    When building against a kernel with CONFIG_WERROR=y, the build fails.
    
    We cannot change ct.c, since it is an external source file. To fix
    this, instead move the prototype of ct_memcmp() to our stub
    kernel-only roken.h header, which is included by ct.c. Make
    krb5_locl.h also include roken.h when building kernel code, so all of
    the ct_memcmp() callers also get the prototype.
    
    While we're here, add some informative comments and an include guard
    to our previously-blank roken.h stub.
    
    Written in collaboration with cwills@sinenomine.net.
    
    Change-Id: I7feff707837c9bd111c4a46991bab3bea26ba656
    Reviewed-on: https://gerrit.openafs.org/15620
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

 src/crypto/hcrypto/kernel/roken.h | 17 +++++++++++++++++
 src/crypto/rfc3961/krb5_locl.h    |  6 +-----
 2 files changed, 18 insertions(+), 5 deletions(-)

-- 
OpenAFS Master Repository