tpmdd updates for Linux v5.8
-----BEGIN PGP SIGNATURE----- iJYEABYIAD4WIQRE6pSOnaBC00OEHEIaerohdGur0gUCXsf2IyAcamFya2tvLnNh a2tpbmVuQGxpbnV4LmludGVsLmNvbQAKCRAaerohdGur0v5IAQC/6dQiHYftVnKX ktfqu4xfy9JIv8gA+84CQJmdxDkI5AEAmtkjEzzb7qtG3hOX+XFY1dpg+xRjdppg wx8WhfroNg0= =UBfK -----END PGP SIGNATURE----- Merge tag 'tpmdd-next-20200522' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpm updates from Jarkko Sakkinen. * tag 'tpmdd-next-20200522' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: eventlog: Replace zero-length array with flexible-array member tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID
This commit is contained in:
commit
b6f91ab6a2
|
@ -51,8 +51,7 @@ static void *tpm2_bios_measurements_start(struct seq_file *m, loff_t *pos)
|
|||
int i;
|
||||
|
||||
event_header = addr;
|
||||
size = sizeof(struct tcg_pcr_event) - sizeof(event_header->event)
|
||||
+ event_header->event_size;
|
||||
size = struct_size(event_header, event, event_header->event_size);
|
||||
|
||||
if (*pos == 0) {
|
||||
if (addr + size < limit) {
|
||||
|
@ -98,8 +97,8 @@ static void *tpm2_bios_measurements_next(struct seq_file *m, void *v,
|
|||
event_header = log->bios_event_log;
|
||||
|
||||
if (v == SEQ_START_TOKEN) {
|
||||
event_size = sizeof(struct tcg_pcr_event) -
|
||||
sizeof(event_header->event) + event_header->event_size;
|
||||
event_size = struct_size(event_header, event,
|
||||
event_header->event_size);
|
||||
marker = event_header;
|
||||
} else {
|
||||
event = v;
|
||||
|
@ -136,9 +135,8 @@ static int tpm2_binary_bios_measurements_show(struct seq_file *m, void *v)
|
|||
size_t size;
|
||||
|
||||
if (v == SEQ_START_TOKEN) {
|
||||
size = sizeof(struct tcg_pcr_event) -
|
||||
sizeof(event_header->event) + event_header->event_size;
|
||||
|
||||
size = struct_size(event_header, event,
|
||||
event_header->event_size);
|
||||
temp_ptr = event_header;
|
||||
|
||||
if (size > 0)
|
||||
|
|
|
@ -241,7 +241,7 @@ static int ftpm_tee_probe(struct platform_device *pdev)
|
|||
|
||||
/* Open a session with fTPM TA */
|
||||
memset(&sess_arg, 0, sizeof(sess_arg));
|
||||
memcpy(sess_arg.uuid, ftpm_ta_uuid.b, TEE_IOCTL_UUID_LEN);
|
||||
export_uuid(sess_arg.uuid, &ftpm_ta_uuid);
|
||||
sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
|
||||
sess_arg.num_params = 0;
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ struct tcg_pcr_event {
|
|||
u32 event_type;
|
||||
u8 digest[20];
|
||||
u32 event_size;
|
||||
u8 event[0];
|
||||
u8 event[];
|
||||
} __packed;
|
||||
|
||||
struct tcg_event_field {
|
||||
|
|
Loading…
Reference in New Issue