diff options
author | Alex Elder <elder@linaro.org> | 2021-05-11 22:42:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-12 02:22:37 +0300 |
commit | 440c3247cba3d9433ac435d371dd7927d68772a7 (patch) | |
tree | a4ce398aca85ac745d5cd6ede7e319accb981de3 /kernel/bpf/Kconfig | |
parent | bcbda3fc616272686208f9c4d5f6dccb65360bd8 (diff) |
net: ipa: memory region array is variable size
IPA configuration data includes an array of memory region
descriptors. That was a fixed-size array at one time, but
at some point we started defining it such that it was only
as big as required for a given platform. The actual number
of entries in the array is recorded in the configuration data
along with the array.
A loop in ipa_mem_config() still assumes the array has entries
for all defined memory region IDs. As a result, this loop can
go past the end of the actual array and attempt to write
"canary" values based on nonsensical data.
Fix this, by stashing the number of entries in the array, and
using that rather than IPA_MEM_COUNT in the initialization loop
found in ipa_mem_config().
The only remaining use of IPA_MEM_COUNT is in a validation check
to ensure configuration data doesn't have too many entries.
That's fine for now.
Fixes: 3128aae8c439a ("net: ipa: redefine struct ipa_mem_data")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/Kconfig')
0 files changed, 0 insertions, 0 deletions