<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/netlink/genetlink.c, branch linux-5.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-02-13T00:31:46Z</updated>
<entry>
<title>mptcp: avoid lock_fast usage in accept path</title>
<updated>2021-02-13T00:31:46Z</updated>
<author>
<name>Florian Westphal</name>
</author>
<published>2021-02-12T23:59:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d54cc32112d8d8b0667559c9309f1a6f764f70b'/>
<id>urn:sha1:4d54cc32112d8d8b0667559c9309f1a6f764f70b</id>
<content type='text'>
Once event support is added this may need to allocate memory while msk
lock is held with softirqs disabled.

Not using lock_fast also allows to do the allocation with GFP_KERNEL.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>genetlink: allow dumping command-specific policy</title>
<updated>2020-10-03T21:18:29Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2020-10-03T08:44:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e992a6eda9a1eeeab73a8d2792464e4a2b1ebc3b'/>
<id>urn:sha1:e992a6eda9a1eeeab73a8d2792464e4a2b1ebc3b</id>
<content type='text'>
Right now CTRL_CMD_GETPOLICY can only dump the family-wide
policy. Support dumping policy of a specific op.

v3:
 - rebase after per-op policy export and handle that
v2:
 - make cmd U32, just in case.
v1:
 - don't echo op in the output in a naive way, this should
   make it cleaner to extend the output format for dumping
   policies for all the commands at once in the future.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Link: https://lore.kernel.org/r/20201001225933.1373426-11-kuba@kernel.org
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>genetlink: properly support per-op policy dumping</title>
<updated>2020-10-03T21:18:29Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2020-10-03T08:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50a896cf2d6f34e884a00139d6e6012c9833ace3'/>
<id>urn:sha1:50a896cf2d6f34e884a00139d6e6012c9833ace3</id>
<content type='text'>
Add support for per-op policy dumping. The data is pretty much
as before, except that now the assumption that the policy with
index 0 is "the" policy no longer holds - you now need to look
at the new CTRL_ATTR_OP_POLICY attribute which is a nested attr
(indexed by op) containing attributes for do and dump policies.

When a single op is requested, the CTRL_ATTR_OP_POLICY will be
added in the same way, since do and dump policies may differ.

v2:
 - conditionally advertise per-command policies only if there
   actually is a policy being used for the do/dump and it's
   present at all

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>genetlink: factor skb preparation out of ctrl_dumppolicy()</title>
<updated>2020-10-03T21:18:29Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2020-10-03T08:44:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa85ee5f9585434b12380efcd1d0353ecc86af26'/>
<id>urn:sha1:aa85ee5f9585434b12380efcd1d0353ecc86af26</id>
<content type='text'>
We'll need this later for the per-op policy index dump.

Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlink: rework policy dump to support multiple policies</title>
<updated>2020-10-03T21:18:29Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2020-10-03T08:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04a351a62bd4be1dbcc88fae69b990362d88ffe5'/>
<id>urn:sha1:04a351a62bd4be1dbcc88fae69b990362d88ffe5</id>
<content type='text'>
Rework the policy dump code a bit to support adding multiple
policies to a single dump, in order to e.g. support per-op
policies in generic netlink.

v2:
 - move kernel-doc to implementation [Jakub]
 - squash the first patch to not flip-flop on the prototype
   [Jakub]
 - merge netlink_policy_dump_get_policy_idx() with the old
   get_policy_idx() we already had
 - rebase without Jakub's patch to have per-op dump

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>genetlink: switch control commands to per-op policies</title>
<updated>2020-10-03T02:11:12Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2020-10-02T21:50:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4bb4f5fc811e2d227703ac41c8d44a8553a7f2a'/>
<id>urn:sha1:a4bb4f5fc811e2d227703ac41c8d44a8553a7f2a</id>
<content type='text'>
In preparation for adding a new attribute to CTRL_CMD_GETPOLICY
split the policies for getpolicy and getfamily apart.

This will cause a slight user-visible change in that dumping
the policies will switch from per family to per op, but
supposedly sniffer-type applications (which are the main use
case for policy dumping thus far) should support both, anyway.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>genetlink: use parsed attrs in dumppolicy</title>
<updated>2020-10-03T02:11:12Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2020-10-02T21:49:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e1ed28fd8d36fb83efc32b5abda774dafba6c7f'/>
<id>urn:sha1:8e1ed28fd8d36fb83efc32b5abda774dafba6c7f</id>
<content type='text'>
Attributes are already parsed based on the policy specified
in the family and ready-to-use in info-&gt;attrs. No need to
call genlmsg_parse() again.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>genetlink: bring back per op policy</title>
<updated>2020-10-03T02:11:12Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2020-10-02T21:49:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48526a0f4ca2b484cab4318dc0b2c2be1d8685b7'/>
<id>urn:sha1:48526a0f4ca2b484cab4318dc0b2c2be1d8685b7</id>
<content type='text'>
Add policy to the struct genl_ops structure, this time
with maxattr, so it can be used properly.

Propagate .policy and .maxattr from the family
in genl_get_cmd() if needed, this way the rest of the
code does not have to worry if the policy is per op
or global.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>genetlink: use .start callback for dumppolicy</title>
<updated>2020-10-03T02:11:12Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2020-10-02T21:49:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78ade619c16599c8a962451aad15f56bceed316b'/>
<id>urn:sha1:78ade619c16599c8a962451aad15f56bceed316b</id>
<content type='text'>
The structure of ctrl_dumppolicy() is clearly split into
init and dumping. Move the init to a .start callback
for clarity, it's a more idiomatic netlink dump code structure.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>genetlink: add a structure for dump state</title>
<updated>2020-10-03T02:11:12Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2020-10-02T21:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adc848450ff84e961cf7966b8a475889a92a9fd3'/>
<id>urn:sha1:adc848450ff84e961cf7966b8a475889a92a9fd3</id>
<content type='text'>
Whenever netlink dump uses more than 2 cb-&gt;args[] entries
code gets hard to read. We're about to add more state to
ctrl_dumppolicy() so create a structure.

Since the structure is typed and clearly named we can remove
the local fam_id variable and use ctx-&gt;fam_id directly.

v3:
 - rebase onto explicit free fix
v1:
 - s/nl_policy_dump/netlink_policy_dump_state/
 - forward declare struct netlink_policy_dump_state,
   and move from passing unsigned long to actual pointer type
 - add build bug on
 - u16 fam_id
 - s/args/ctx/

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
