summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_cmd.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-10-21 14:13:36 -0500
committerPaolo Abeni <pabeni@redhat.com>2022-10-25 11:15:18 +0200
commitcf13919654d5fe54974c7bba49c220833c26bce4 (patch)
treef486c56ca706aa1ccaec995279d79b047a6e9707 /drivers/net/ipa/ipa_cmd.c
parent2554322b31994d9a6c3ff6eaaaac7d78bac05d82 (diff)
downloadlwn-cf13919654d5fe54974c7bba49c220833c26bce4.tar.gz
lwn-cf13919654d5fe54974c7bba49c220833c26bce4.zip
net: ipa: validate IPA table memory earlier
Add checks in ipa_table_init() to ensure the memory regions defined for IPA filter and routing tables are valid. For routing tables, the checks ensure: - The non-hashed IPv4 and IPv6 routing tables are defined - The non-hashed IPv4 and IPv6 routing tables are the same size - The number entries in the non-hashed IPv4 routing table is enough to hold the number entries available to the modem, plus at least one usable by the AP. For filter tables, the checks ensure: - The non-hashed IPv4 and IPv6 filter tables are defined - The non-hashed IPv4 and IPv6 filter tables are the same size - The number entries in the non-hashed IPv4 filter table is enough to hold the endpoint bitmap, plus an entry for each defined endpoint that supports filtering. In addition, for both routing and filter tables: - If hashing isn't supported (IPA v4.2), hashed tables are zero size - If hashing *is* supported, all hashed tables are the same size as their non-hashed counterparts. When validating the size of routing tables, require the AP to have at least one entry (in addition to those used by the modem). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ipa/ipa_cmd.c')
0 files changed, 0 insertions, 0 deletions