diff options
| author | Alex Elder <elder@linaro.org> | 2021-02-06 01:11:00 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-07 01:57:20 +0300 |
| commit | cd1150098f2cc7bd05740c105488c293f6761f5a (patch) | |
| tree | 88de441490e429251cb947fdaa30a4d4d9a75262 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 4873537430e5b6bbfc505a6a7b07a7c5e92ddffc (diff) | |
| download | linux-cd1150098f2cc7bd05740c105488c293f6761f5a.tar.xz | |
net: ipa: avoid field overflow
It's possible that the length passed to ipa_header_size_encoded()
is larger than what can be represented by the HDR_LEN field alone
(starting with IPA v4.5). If we attempted that, u32_encode_bits()
would trigger a build-time error.
Avoid this problem by masking off high-order bits of the value
encoded as the lower portion of the header length.
The same sort of problem exists in ipa_metadata_offset_encoded(),
so implement the same fix there.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
