tpm1.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | tpm1.c (d7a47b96ed1102551eb7325f97937e276fb91045) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2005, 2012 IBM Corporation 4 * 5 * Authors: 6 * Kent Yoder <key@linux.vnet.ibm.com> 7 * Seiji Munetoh <munetoh@jp.ibm.com> 8 * Stefan Berger <stefanb@us.ibm.com> --- 101 unchanged lines hidden (view full) --- 110{ 111 struct tcpa_event *event = v; 112 struct tpm_chip *chip = m->private; 113 struct tpm_bios_log *log = &chip->log; 114 void *limit = log->bios_event_log_end; 115 u32 converted_event_size; 116 u32 converted_event_type; 117 | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (C) 2005, 2012 IBM Corporation 4 * 5 * Authors: 6 * Kent Yoder <key@linux.vnet.ibm.com> 7 * Seiji Munetoh <munetoh@jp.ibm.com> 8 * Stefan Berger <stefanb@us.ibm.com> --- 101 unchanged lines hidden (view full) --- 110{ 111 struct tcpa_event *event = v; 112 struct tpm_chip *chip = m->private; 113 struct tpm_bios_log *log = &chip->log; 114 void *limit = log->bios_event_log_end; 115 u32 converted_event_size; 116 u32 converted_event_type; 117 |
118 (*pos)++; |
|
118 converted_event_size = do_endian_conversion(event->event_size); 119 120 v += sizeof(struct tcpa_event) + converted_event_size; 121 122 /* now check if current entry is valid */ 123 if ((v + sizeof(struct tcpa_event)) > limit) 124 return NULL; 125 126 event = v; 127 128 converted_event_size = do_endian_conversion(event->event_size); 129 converted_event_type = do_endian_conversion(event->event_type); 130 131 if (((converted_event_type == 0) && (converted_event_size == 0)) || 132 ((v + sizeof(struct tcpa_event) + converted_event_size) > limit)) 133 return NULL; 134 | 119 converted_event_size = do_endian_conversion(event->event_size); 120 121 v += sizeof(struct tcpa_event) + converted_event_size; 122 123 /* now check if current entry is valid */ 124 if ((v + sizeof(struct tcpa_event)) > limit) 125 return NULL; 126 127 event = v; 128 129 converted_event_size = do_endian_conversion(event->event_size); 130 converted_event_type = do_endian_conversion(event->event_type); 131 132 if (((converted_event_type == 0) && (converted_event_size == 0)) || 133 ((v + sizeof(struct tcpa_event) + converted_event_size) > limit)) 134 return NULL; 135 |
135 (*pos)++; | |
136 return v; 137} 138 139static void tpm1_bios_measurements_stop(struct seq_file *m, void *v) 140{ 141} 142 143static int get_event_name(char *dest, struct tcpa_event *event, --- 153 unchanged lines hidden --- | 136 return v; 137} 138 139static void tpm1_bios_measurements_stop(struct seq_file *m, void *v) 140{ 141} 142 143static int get_event_name(char *dest, struct tcpa_event *event, --- 153 unchanged lines hidden --- |