linux/drivers/net/ipa
Alex Elder 440c3247cb 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: 3128aae8c4 ("net: ipa: redefine struct ipa_mem_data")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-11 16:22:37 -07:00
..
gsi_private.h net: ipa: DMA addresses are nicely aligned 2021-03-28 18:12:03 -07:00
gsi_reg.h net: ipa: fix inter-EE IRQ register definitions 2021-05-06 16:32:10 -07:00
gsi_trans.c net: ipa: relax pool entry size requirement 2021-04-09 20:57:24 -07:00
gsi_trans.h net: ipa: fix all kernel-doc warnings 2021-03-28 18:12:03 -07:00
gsi.c net: ipa: fix inter-EE IRQ register definitions 2021-05-06 16:32:10 -07:00
gsi.h net: ipa: increase channels and events 2021-03-24 16:52:47 -07:00
ipa_clock.c net: ipa: use dev_err_probe() in ipa_clock.c 2021-02-12 16:54:17 -08:00
ipa_clock.h net: ipa: define clock and interconnect data 2020-11-20 18:44:59 -08:00
ipa_cmd.c net: ipa: kill IPA_TABLE_ENTRY_SIZE 2021-03-28 18:12:03 -07:00
ipa_cmd.h net: ipa: fix all kernel-doc warnings 2021-03-28 18:12:03 -07:00
ipa_data-v3.5.1.c net: ipa: update sequence type for modem TX endpoint 2021-04-09 20:57:25 -07:00
ipa_data-v4.2.c net: ipa: use version based configuration for SC7180 2021-03-28 18:12:03 -07:00
ipa_data-v4.5.c net: ipa: add IPA v4.5 configuration data 2021-04-11 16:49:08 -07:00
ipa_data-v4.9.c net: ipa: add IPA v4.9 configuration data 2021-04-13 15:02:25 -07:00
ipa_data-v4.11.c net: ipa: add IPA v4.11 configuration data 2021-04-11 16:49:08 -07:00
ipa_data.h net: ipa: add IPA v4.9 configuration data 2021-04-13 15:02:25 -07:00
ipa_endpoint.c net: ipa: disable checksum offload for IPA v4.5+ 2021-04-11 16:49:08 -07:00
ipa_endpoint.h net: ipa: three small fixes 2021-04-09 20:57:26 -07:00
ipa_gsi.c net: ipa: include declarations in "ipa_gsi.c" 2020-07-07 12:43:18 -07:00
ipa_gsi.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_interrupt.c net: ipa: support IPA interrupt addresses for IPA v4.7 2021-03-25 17:22:30 -07:00
ipa_interrupt.h net: ipa: fix all kernel-doc warnings 2021-03-28 18:12:03 -07:00
ipa_main.c net: ipa: optionally define firmware name via DT 2021-04-16 15:38:32 -07:00
ipa_mem.c net: ipa: memory region array is variable size 2021-05-11 16:22:37 -07:00
ipa_mem.h net: ipa: add IPA v4.5 configuration data 2021-04-11 16:49:08 -07:00
ipa_modem.c net: ipa: ipa_stop() does not return an error 2021-04-09 20:57:25 -07:00
ipa_modem.h soc: qcom: ipa: modem and microcontroller 2020-03-08 22:07:10 -07:00
ipa_qmi_msg.c net: ipa: extend the INDICATION_REGISTER request 2021-03-16 11:17:59 -07:00
ipa_qmi_msg.h net: ipa: extend the INDICATION_REGISTER request 2021-03-16 11:17:59 -07:00
ipa_qmi.c net: ipa: kill IPA_TABLE_ENTRY_SIZE 2021-03-28 18:12:03 -07:00
ipa_qmi.h net: ipa: fix all kernel-doc warnings 2021-03-28 18:12:03 -07:00
ipa_reg.c
ipa_reg.h net: ipa: store BCR register values in config data 2021-03-28 18:12:03 -07:00
ipa_resource.c net: ipa: get rid of empty IPA functions 2021-04-09 20:57:25 -07:00
ipa_resource.h net: ipa: get rid of empty IPA functions 2021-04-09 20:57:25 -07:00
ipa_smp2p.c drivers: ipa: fix typos for ipa_smp2p structure doc 2020-05-14 13:06:55 -07:00
ipa_smp2p.h net: ipa: fix all kernel-doc warnings 2021-03-28 18:12:03 -07:00
ipa_table.c net: ipa: get rid of empty IPA functions 2021-04-09 20:57:25 -07:00
ipa_table.h net: ipa: get rid of empty IPA functions 2021-04-09 20:57:25 -07:00
ipa_uc.c net: ipa: support IPA interrupt addresses for IPA v4.7 2021-03-25 17:22:30 -07:00
ipa_uc.h soc: qcom: ipa: modem and microcontroller 2020-03-08 22:07:10 -07:00
ipa_version.h net: ipa: update version definitions 2021-03-24 16:52:47 -07:00
ipa.h net: ipa: memory region array is variable size 2021-05-11 16:22:37 -07:00
Kconfig net: ipa: switch to version based configuration 2021-03-28 18:12:03 -07:00
Makefile net: ipa: add IPA v4.9 configuration data 2021-04-13 15:02:25 -07:00