diff options
author | 2023-06-22 12:57:17 -0700 | |
---|---|---|
committer | 2023-07-10 15:13:49 +0200 | |
commit | 5b2a4a4394ce96fb01a282dd58e263d02218db03 (patch) | |
tree | d185bac166dc87653edd25409188a6b8f63ec91b /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | platform/x86: wmi: Replace open coded guid_parse_and_compare() (diff) | |
download | wireguard-linux-5b2a4a4394ce96fb01a282dd58e263d02218db03.tar.xz wireguard-linux-5b2a4a4394ce96fb01a282dd58e263d02218db03.zip |
platform/x86/intel/tpmi: Prevent overflow for cap_offset
cap_offset is a u16 field, so multiplying with TPMI_CAP_OFFSET_UNIT
(which is equal to 1024) to covert to bytes will cause overflow. This
will be a problem once more TPMI features are added.
This field is not used except for calculating pfs->vsec_offset. So, leave
cap_offset field unchanged and multiply with TPMI_CAP_OFFSET_UNIT while
calculating pfs->vsec_offset.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20230622195717.3125088-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions