Home
last modified time | relevance | path

Searched refs:khdr (Results 1 – 2 of 2) sorted by relevance

/security/integrity/ima/
Dima_kexec.c24 struct ima_kexec_hdr khdr; in ima_dump_measurement_list() local
36 file.count = sizeof(khdr); /* reserved space */ in ima_dump_measurement_list()
38 memset(&khdr, 0, sizeof(khdr)); in ima_dump_measurement_list()
39 khdr.version = 1; in ima_dump_measurement_list()
42 khdr.count++; in ima_dump_measurement_list()
57 khdr.buffer_size = file.count; in ima_dump_measurement_list()
59 khdr.version = cpu_to_le16(khdr.version); in ima_dump_measurement_list()
60 khdr.count = cpu_to_le64(khdr.count); in ima_dump_measurement_list()
61 khdr.buffer_size = cpu_to_le64(khdr.buffer_size); in ima_dump_measurement_list()
63 memcpy(file.buf, &khdr, sizeof(khdr)); in ima_dump_measurement_list()
Dima_template.c327 struct ima_kexec_hdr *khdr = buf; in ima_restore_measurement_list() local
333 void *bufp = buf + sizeof(*khdr); in ima_restore_measurement_list()
341 if (!buf || size < sizeof(*khdr)) in ima_restore_measurement_list()
345 khdr->version = le16_to_cpu(khdr->version); in ima_restore_measurement_list()
346 khdr->count = le64_to_cpu(khdr->count); in ima_restore_measurement_list()
347 khdr->buffer_size = le64_to_cpu(khdr->buffer_size); in ima_restore_measurement_list()
350 if (khdr->version != 1) { in ima_restore_measurement_list()
355 if (khdr->count > ULONG_MAX - 1) { in ima_restore_measurement_list()
369 bufendp = buf + khdr->buffer_size; in ima_restore_measurement_list()
370 while ((bufp < bufendp) && (count++ < khdr->count)) { in ima_restore_measurement_list()
[all …]