• Roberto Sassu's avatar
    ima: use ima_parse_buf() to parse measurements headers · 47fdee60
    Roberto Sassu authored
    The binary_hdr_v1 and binary_data_v1 structures defined in
    ima_restore_measurement_list() have been replaced with an array of four
    ima_field_data structures where pcr, digest, template name and
    template data lengths and pointers are stored.
    
    The length of pcr and digest in the ima_field_data array and the bits
    in the bitmap are set before ima_parse_buf() is called. The ENFORCE_FIELDS
    bit is set for all entries except the last one (there is still data to
    parse), and ENFORCE_BUFEND is set only for the last entry.
    Signed-off-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
    Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
    47fdee60
ima_template.c 11.6 KB