<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sched/cls_api.c, branch linux-5.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-01-16T21:25:11Z</updated>
<entry>
<title>net_sched: refetch skb protocol for each filter</title>
<updated>2019-01-16T21:25:11Z</updated>
<author>
<name>Cong Wang</name>
</author>
<published>2019-01-12T02:55:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd0c4e70fc0ccfa705cdf55efb27519ce9337a26'/>
<id>urn:sha1:cd0c4e70fc0ccfa705cdf55efb27519ce9337a26</id>
<content type='text'>
Martin reported a set of filters don't work after changing
from reclassify to continue. Looking into the code, it
looks like skb protocol is not always fetched for each
iteration of the filters. But, as demonstrated by Martin,
TC actions could modify skb-&gt;protocol, for example act_vlan,
this means we have to refetch skb protocol in each iteration,
rather than using the one we fetch in the beginning of the loop.

This bug is _not_ introduced by commit 3b3ae880266d
("net: sched: consolidate tc_classify{,_compat}"), technically,
if act_vlan is the only action that modifies skb protocol, then
it is commit c7e2b9689ef8 ("sched: introduce vlan action") which
introduced this bug.

Reported-by: Martin Olsson &lt;martin.olsson+netdev@sentorsecurity.com&gt;
Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Cc: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: fold tcf_block_cb_call() into tc_setup_cb_call()</title>
<updated>2018-12-14T23:32:19Z</updated>
<author>
<name>Cong Wang</name>
</author>
<published>2018-12-11T19:15:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aeb3fecde811d5392ed481d8558f5751ac542e77'/>
<id>urn:sha1:aeb3fecde811d5392ed481d8558f5751ac542e77</id>
<content type='text'>
After commit 69bd48404f25 ("net/sched: Remove egdev mechanism"),
tc_setup_cb_call() is nearly identical to tcf_block_cb_call(),
so we can just fold tcf_block_cb_call() into tc_setup_cb_call()
and remove its unused parameter 'exts'.

Fixes: 69bd48404f25 ("net/sched: Remove egdev mechanism")
Cc: Oz Shlomo &lt;ozsh@mellanox.com&gt;
Cc: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Acked-by: Oz Shlomo &lt;ozsh@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/sched: Remove egdev mechanism</title>
<updated>2018-12-10T23:54:34Z</updated>
<author>
<name>Oz Shlomo</name>
</author>
<published>2018-11-06T07:58:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69bd48404f251b9c45a15799fdcfc87a7ad6ab8a'/>
<id>urn:sha1:69bd48404f251b9c45a15799fdcfc87a7ad6ab8a</id>
<content type='text'>
The egdev mechanism was replaced by the TC indirect block notifications
platform.

Signed-off-by: Oz Shlomo &lt;ozsh@mellanox.com&gt;
Reviewed-by: Eli Britstein &lt;elibr@mellanox.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Cc: John Hurley &lt;john.hurley@netronome.com&gt;
Cc: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: Saeed Mahameed &lt;saeedm@mellanox.com&gt;
</content>
</entry>
<entry>
<title>net: sched: register callbacks for indirect tc block binds</title>
<updated>2018-11-11T17:54:52Z</updated>
<author>
<name>John Hurley</name>
</author>
<published>2018-11-10T05:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f76fa36754b08d9709ae50cd0a9477a6f998b21'/>
<id>urn:sha1:7f76fa36754b08d9709ae50cd0a9477a6f998b21</id>
<content type='text'>
Currently drivers can register to receive TC block bind/unbind callbacks
by implementing the setup_tc ndo in any of their given netdevs. However,
drivers may also be interested in binds to higher level devices (e.g.
tunnel drivers) to potentially offload filters applied to them.

Introduce indirect block devs which allows drivers to register callbacks
for block binds on other devices. The callback is triggered when the
device is bound to a block, allowing the driver to register for rules
applied to that block using already available functions.

Freeing an indirect block callback will trigger an unbind event (if
necessary) to direct the driver to remove any offloaded rules and unreg
any block rule callbacks. It is the responsibility of the implementing
driver to clean any registered indirect block callbacks before exiting,
if the block it still active at such a time.

Allow registering an indirect block dev callback for a device that is
already bound to a block. In this case (if it is an ingress block),
register and also trigger the callback meaning that any already installed
rules can be replayed to the calling driver.

Signed-off-by: John Hurley &lt;john.hurley@netronome.com&gt;
Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2018-10-19T18:03:06Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2018-10-19T18:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e2d6f0342be7f73a34526077fa96f42f0e8c661'/>
<id>urn:sha1:2e2d6f0342be7f73a34526077fa96f42f0e8c661</id>
<content type='text'>
net/sched/cls_api.c has overlapping changes to a call to
nlmsg_parse(), one (from 'net') added rtm_tca_policy instead of NULL
to the 5th argument, and another (from 'net-next') added cb-&gt;extack
instead of NULL to the 6th argument.

net/ipv4/ipmr_base.c is a case of a bug fix in 'net' being done to
code which moved (to mr_table_dump)) in 'net-next'.  Thanks to David
Ahern for the heads up.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/sched: cls_api: add missing validation of netlink attributes</title>
<updated>2018-10-16T04:48:44Z</updated>
<author>
<name>Davide Caratti</name>
</author>
<published>2018-10-10T20:00:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e331473fee3d500bb0d2582a1fe598df3326d8cd'/>
<id>urn:sha1:e331473fee3d500bb0d2582a1fe598df3326d8cd</id>
<content type='text'>
Similarly to what has been done in 8b4c3cdd9dd8 ("net: sched: Add policy
validation for tc attributes"), fix classifier code to add validation of
TCA_CHAIN and TCA_KIND netlink attributes.

tested with:
 # ./tdc.py -c filter

v2: Let sch_api and cls_api share nla_policy they have in common, thanks
    to David Ahern.
v3: Avoid EXPORT_SYMBOL(), as validation of those attributes is not done
    by TC modules, thanks to Cong Wang.
    While at it, restore the 'Delete / get qdisc' comment to its orginal
    position, just above tc_get_qdisc() function prototype.

Fixes: 5bc1701881e39 ("net: sched: introduce multichain support for filters")
Signed-off-by: Davide Caratti &lt;dcaratti@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Add extack to nlmsg_parse</title>
<updated>2018-10-08T17:39:04Z</updated>
<author>
<name>David Ahern</name>
</author>
<published>2018-10-08T03:16:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dac9c9790e542777079999900594fd069ba10489'/>
<id>urn:sha1:dac9c9790e542777079999900594fd069ba10489</id>
<content type='text'>
Make sure extack is passed to nlmsg_parse where easy to do so.
Most of these are dump handlers and leveraging the extack in
the netlink_callback.

Signed-off-by: David Ahern &lt;dsahern@gmail.com&gt;
Acked-by: Christian Brauner &lt;christian@brauner.io&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net_sched: fix a crash in tc_new_tfilter()</title>
<updated>2018-10-02T06:09:41Z</updated>
<author>
<name>Cong Wang</name>
</author>
<published>2018-09-27T20:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=460b360104d51552a57f39e54b2589c9fd7fa0b3'/>
<id>urn:sha1:460b360104d51552a57f39e54b2589c9fd7fa0b3</id>
<content type='text'>
When tcf_block_find() fails, it already rollbacks the qdisc refcnt,
so its caller doesn't need to clean up this again. Avoid calling
qdisc_put() again by resetting qdisc to NULL for callers.

Reported-by: syzbot+37b8770e6d5a8220a039@syzkaller.appspotmail.com
Fixes: e368fdb61d8e ("net: sched: use Qdisc rcu API instead of relying on rtnl lock")
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sched: use reference counting for tcf blocks on rules update</title>
<updated>2018-09-26T03:17:36Z</updated>
<author>
<name>Vlad Buslov</name>
</author>
<published>2018-09-24T16:22:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=787ce6d02d95d01eb8633865eb5b2be1f7c94883'/>
<id>urn:sha1:787ce6d02d95d01eb8633865eb5b2be1f7c94883</id>
<content type='text'>
In order to remove dependency on rtnl lock on rules update path, always
take reference to block while using it on rules update path. Change
tcf_block_get() error handling to properly release block with reference
counting, instead of just destroying it, in order to accommodate potential
concurrent users.

Signed-off-by: Vlad Buslov &lt;vladbu@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sched: implement tcf_block_refcnt_{get|put}()</title>
<updated>2018-09-26T03:17:36Z</updated>
<author>
<name>Vlad Buslov</name>
</author>
<published>2018-09-24T16:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0607e439943bd150e53eed2979f9c69aa61c37ce'/>
<id>urn:sha1:0607e439943bd150e53eed2979f9c69aa61c37ce</id>
<content type='text'>
Implement get/put function for blocks that only take/release the reference
and perform deallocation. These functions are intended to be used by
unlocked rules update path to always hold reference to block while working
with it. They use on new fine-grained locking mechanisms introduced in
previous patches in this set, instead of relying on global protection
provided by rtnl lock.

Extract code that is common with tcf_block_detach_ext() into common
function __tcf_block_put().

Extend tcf_block with rcu to allow safe deallocation when it is accessed
concurrently.

Signed-off-by: Vlad Buslov &lt;vladbu@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
