<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/ipa/ipa_table.c, branch v6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-11-18T11:46:18Z</updated>
<entry>
<title>net: ipa: avoid a null pointer dereference</title>
<updated>2022-11-18T11:46:18Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-11-16T22:37:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15b4f993d12b5bb81f50a1ce0693343fb7a94fcf'/>
<id>urn:sha1:15b4f993d12b5bb81f50a1ce0693343fb7a94fcf</id>
<content type='text'>
Dan Carpenter reported that Smatch found an instance where a pointer
which had previously been assumed could be null (as indicated by a
null check) was later dereferenced without a similar check.

In practice this doesn't lead to a problem because currently the
pointers used are all non-null.  Nevertheless this patch addresses
the reported problem.

In addition, I spotted another bug that arose in the same commit.
When the command to initialize a routing table memory region was
added, the number of entries computed for the non-hashed table
was wrong (it ended up being a Boolean rather than the count
intended).  This bug is fixed here as well.

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Link: https://lore.kernel.org/kernel-janitors/Y3OOP9dXK6oEydkf@kili
Tested-by: Caleb Connolly &lt;caleb.connolly@linaro.com&gt;
Fixes: 5cb76899fb47 ("net: ipa: reduce arguments to ipa_table_init_add()")
Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipa: support more filtering endpoints</title>
<updated>2022-11-04T10:16:53Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-11-02T22:11:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f97fbd478587a4ac2d53a88e5a9aefd6632a251'/>
<id>urn:sha1:0f97fbd478587a4ac2d53a88e5a9aefd6632a251</id>
<content type='text'>
Prior to IPA v5.0, there could be no more than 32 endpoints.

A filter table begins with a bitmap indicating which endpoints have
a filter defined.  That bitmap is currently assumed to fit in a
32-bit value.

Starting with IPA v5.0, more than 32 endpoints are supported, so
it's conceivable that a TX endpoint has an ID that exceeds 32.
Increase the size of the field representing endpoints that support
filtering to 64 bits.  Rename the bitmap field "filtered".

Unlike other similar fields, we do not use an (arbitrarily long)
Linux bitmap for this purpose.  The reason is that if a filter table
ever *did* need to support more than 64 TX endpoints, its format
would change in ways we can't anticipate.

Have ipa_endpoint_init() return a negative errno rather than a mask
that indicates which endpoints support filtering, and have that
function assign the "filtered" field directly.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipa: use ipa_table_mem() in ipa_table_reset_add()</title>
<updated>2022-11-04T10:16:53Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-11-02T22:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6337b147828b4e3e893bde16dca8d4b6654d11c1'/>
<id>urn:sha1:6337b147828b4e3e893bde16dca8d4b6654d11c1</id>
<content type='text'>
Similar to the previous commit, pass flags rather than a memory
region ID to ipa_table_reset_add(), and there use ipa_table_mem() to
look up the memory region affected based on those flags.

Currently all eight of these table memory regions are assumed to
exist, because they all have canaries within them.  Stop assuming
that will always be the case, and in ipa_table_reset_add() allow
these memory regions to be non-existent.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipa: reduce arguments to ipa_table_init_add()</title>
<updated>2022-11-04T10:16:53Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-11-02T22:11:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cb76899fb47791c12eb9fce4aef8a858c41783d'/>
<id>urn:sha1:5cb76899fb47791c12eb9fce4aef8a858c41783d</id>
<content type='text'>
Recently ipa_table_mem() was added as a way to look up one of 8
possible memory regions by indicating whether it was a filter or
route table, hashed or not, and IPv6 or not.

We can simplify the interface to ipa_table_init_add() by passing two
flags to it instead of the opcode and both hashed and non-hashed
memory region IDs.  The "filter" and "ipv6" flags are sufficient to
determine the opcode to use, and with ipa_table_mem() can look up
the correct memory region as well.

It's possible to not have hashed tables, but we already verify the
number of entries in a filter or routing table is nonzero.  Stop
assuming a hashed table entry exists in ipa_table_init_add().

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipa: no more global filtering starting with IPA v5.0</title>
<updated>2022-10-29T05:06:46Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-10-27T12:26:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd5524930ba7c9ed914952da48a77f803f0b5011'/>
<id>urn:sha1:bd5524930ba7c9ed914952da48a77f803f0b5011</id>
<content type='text'>
IPA v5.0 eliminates the global filter table entry.  As a result,
there is no need to shift the filtered endpoint bitmap when it is
written to IPA local memory.

Update comments to explain this.  Also delete a redundant block of
comments above the function.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ipa: determine filter table size from memory region</title>
<updated>2022-10-27T11:38:13Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-10-25T19:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f787d84830152be76b76470ac865d2033285c2d9'/>
<id>urn:sha1:f787d84830152be76b76470ac865d2033285c2d9</id>
<content type='text'>
Currently we assume that any filter table contains a fixed number
of entries.  Like routing tables, the number of entries in a filter
table is limited only by the size of the IPA-local memory region
used to hold the table.

Stop assuming that a filter table has exactly 14 entries.  Instead,
determine the number of entries in a routing table by dividing its
memory region size by the size of an entry.  (Note that the first
"entry" in a filter table contains an endpoint bitmap.)

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: ipa: don't assume 8 modem routing table entries</title>
<updated>2022-10-27T11:38:13Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-10-25T19:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8defab8bdfb1d0dc4e4e3c687cfde33b596896f7'/>
<id>urn:sha1:8defab8bdfb1d0dc4e4e3c687cfde33b596896f7</id>
<content type='text'>
Currently all platforms are assumed allot 8 routing table entries
for use by the modem.  Instead, add a new configuration data entry
that defines the number of modem routing table entries, and record
that in the IPA structure.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: ipa: determine route table size from memory region</title>
<updated>2022-10-27T11:38:12Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-10-25T19:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0439e6743c5c77520e91bf52a0d16da586214753'/>
<id>urn:sha1:0439e6743c5c77520e91bf52a0d16da586214753</id>
<content type='text'>
Currently we assume that any routing table contains a fixed number
of entries.  The number of entries in a routing table can actually
vary, depending only on the size of the IPA-local memory region used
to hold the table.

Stop assuming that a routing table has exactly 15 entries.  Instead,
determine the number of entries in a routing table by dividing its
memory region size by the size of an entry.

The number of entries is computed early, when ipa_table_mem_valid()
is called by ipa_table_init().

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: ipa: record the route table size in the IPA structure</title>
<updated>2022-10-27T11:38:12Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-10-25T19:51:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc094058ce01984aa4cb8b580812b16f5429c7e7'/>
<id>urn:sha1:fc094058ce01984aa4cb8b580812b16f5429c7e7</id>
<content type='text'>
The non-hashed routing tables for IPv4 and IPv6 will be the same
size.  And if supported, the hashed routing tables will be the same
size as the non-hashed tables.

Record the size (number of entries) of all routing tables in the IPA
structure.  For now, initialize this field using IPA_ROUTE_TABLE_MAX,
and just do so when the first route table is validated.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: ipa: check table memory regions earlier</title>
<updated>2022-10-25T09:15:19Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@linaro.org</email>
</author>
<published>2022-10-21T19:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73da9cac517ce4dc3a00b87f800846dcc2469ddf'/>
<id>urn:sha1:73da9cac517ce4dc3a00b87f800846dcc2469ddf</id>
<content type='text'>
Verify that the sizes of the routing and filter table memory regions
are valid as part of memory initialization, rather than waiting for
table initialization.  The main reason to do this is that upcoming
patches use these memory region sizes to determine the number of
entries in these tables, and we'll want to know these sizes are good
sooner.

Signed-off-by: Alex Elder &lt;elder@linaro.org&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
</feed>
