• Mimi Zohar's avatar
    ima: define ima_max_digest_data struct without a flexible array variable · 8c54135e
    Mimi Zohar authored
    To support larger hash digests in the 'iint' cache, instead of defining
    the 'digest' field as the maximum digest size, the 'digest' field was
    defined as a flexible array variable.  The "ima_digest_data" struct was
    wrapped inside a local structure with the maximum digest size.  But
    before adding the record to the iint cache, memory for the exact digest
    size was dynamically allocated.
    
    The original reason for defining the 'digest' field as a flexible array
    variable is still valid for the 'iint' cache use case.  Instead of
    wrapping the 'ima_digest_data' struct in a local structure define
    'ima_max_digest_data' struct.
    Reviewed-by: default avatarStefan Berger <stefanb@linux.ibm.com>
    Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
    8c54135e
ima_main.c 30.2 KB