From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDC74C43381 for ; Mon, 18 Feb 2019 16:52:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7412B2177E for ; Mon, 18 Feb 2019 16:52:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="UuaEsmsK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390243AbfBRQwa (ORCPT ); Mon, 18 Feb 2019 11:52:30 -0500 Received: from mail-eopbgr70071.outbound.protection.outlook.com ([40.107.7.71]:6210 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732945AbfBRQwa (ORCPT ); Mon, 18 Feb 2019 11:52:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fN8YQNMXfNJdG00gDDhfz8jyLWlFFHoPoinMEENRMC4=; b=UuaEsmsKADWuE7etN52NseU74GYqCz73ovtz+0Y4vA0c+TJzhDdnv77HQdhJL9Sx4U4gdz10TawVDviuBBNGAMedqve2qaAauJ2a9DOtfMtBbQmXMRAROldWCP6f88kt5Fpxp290juBL5s/AkOBtv5QFvI3v6PQeoZXGDViSIo8= Received: from HE1PR0502MB3641.eurprd05.prod.outlook.com (10.167.127.11) by HE1PR0502MB3867.eurprd05.prod.outlook.com (10.167.143.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Mon, 18 Feb 2019 16:52:20 +0000 Received: from HE1PR0502MB3641.eurprd05.prod.outlook.com ([fe80::4041:bb68:2af3:eab8]) by HE1PR0502MB3641.eurprd05.prod.outlook.com ([fe80::4041:bb68:2af3:eab8%5]) with mapi id 15.20.1622.018; Mon, 18 Feb 2019 16:52:20 +0000 From: Vlad Buslov To: Davide Caratti CC: Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Paolo Abeni , "netdev@vger.kernel.org" Subject: Re: [PATCH RFC 2/5] net/sched: prepare TC actions to properly validate the control action Thread-Topic: [PATCH RFC 2/5] net/sched: prepare TC actions to properly validate the control action Thread-Index: AQHUxYMnLJd3AZDBW0Wc/l/mYIZ5bqXlyZOA Date: Mon, 18 Feb 2019 16:52:20 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0153.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9::21) To HE1PR0502MB3641.eurprd05.prod.outlook.com (2603:10a6:7:85::11) authentication-results: spf=none (sender IP is ) smtp.mailfrom=vladbu@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1fd7ec7e-978f-4006-e578-08d695c17278 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:HE1PR0502MB3867; x-ms-traffictypediagnostic: HE1PR0502MB3867: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1;HE1PR0502MB3867;23:ydLSy30OhSnWuV6wGxpAB/NAEi0xnz2VcrkkF?= =?iso-8859-1?Q?derGCJirqgKjxL8XSxN3d70km1mSLgZ8m8Qmq25eJAw4H989cAzZJCC0nS?= =?iso-8859-1?Q?uWQlgsMFdcijQmr83T/U6g1pBPgbeS0r7RLmewO/Q1SC83Rw7/UG2A50FT?= =?iso-8859-1?Q?41Z+GLpaOIxlsQkxeMg/0hnj5N8RSbG3oQqouESVCflwG9/fCEUHN8AxH+?= =?iso-8859-1?Q?4W3EV0oqGQqyPAgtie+S/6BhgbGIbyKCrrQOSQzjSbBkSwQU3/G5CVCvp1?= =?iso-8859-1?Q?LZiPV0pSAEnnQWj/AhI8sL45pVatW/fs1/SjgcoYMpQVLMCjtUTPlqHKNy?= =?iso-8859-1?Q?mfc+O4SDc3yfLVH+ghh7gWtbzTp6FcGI8USBtbrkO7x7Yy84OD82308DyL?= =?iso-8859-1?Q?TmGYEkjpN12JVr7/an00g8H0shpDR4H0XfqkoFYVL8JPL6D9ZROD5vMY9F?= =?iso-8859-1?Q?zh1GGyEgsLze/toLAX6DDen+ujFpUdktzZokqqOyANYZfpZ25s8euCNIs/?= =?iso-8859-1?Q?Rs/eBmGPkWXGnfxWbBbQGfACkc81lgNnQA03Q2ul5Tww5kUvjd8My0tn0w?= =?iso-8859-1?Q?NXw6mfGSFFOTnpwnTvdjINb4yDt9xi1HYZgkXnDpcDzh0fdWcx62Y+Zvqx?= =?iso-8859-1?Q?VGz8skzMiiFUzFw3SYWU5SMrKmQkMKiw7OGjzYld/6Cf8k/76rfEPMBkcL?= =?iso-8859-1?Q?wCRn2JQ79FNS85+RD7jOX4zftkcGfejCYBBmh6MU5ilWSA+07d6DiGMTTf?= =?iso-8859-1?Q?1rKE6FtBrP08T3rwsm4rSvjebJbNKdbQ3BsJ7HC+5Ta7tBCQEbtjpenDCz?= =?iso-8859-1?Q?ks2luYI3racVqUy0/k1rW0mGRhYTki4H9a4zweHTrN9xMXS98Twm5bCTzt?= =?iso-8859-1?Q?SZUgqCFNFTO0A27GmY7MU5Idk8lYE51+XVTevh6vRvT1vsP3t+p65lv6Uf?= =?iso-8859-1?Q?9JRYy6lcpdF2d8BiLx60zSpQ5vbVEOP9+wNt74i6oVbdJpin5hc0v+mHli?= =?iso-8859-1?Q?pzKfqL8ib8ErGktsbEN4xykDEsLopCXZLthNv5LDnut+XcNTW4VPFI2GSo?= =?iso-8859-1?Q?YaZRZpVGq7hqOQ2NuiJUABSI4MtholWYfOuwT1WmLFkTWLKJffVx21CGcn?= =?iso-8859-1?Q?l7tdCx1zpw0hiLoJ22rDRby/m/FzZKG9X2K5jcHVXhHrRNmjL/7ye0j22A?= =?iso-8859-1?Q?mkUgFhCs/8oQED1jNmv9jkPiN+zIy0ZFQnG7mcU9muFClzjdGA4LDE40zN?= =?iso-8859-1?Q?1CTHETtvhPSDosjhB6Xva/PdsV3yRZRpUe3rPJyELBZL6eoKTyOoSmc7p2?= =?iso-8859-1?Q?GcFTG9cExVqfLSVvynjPCHOo6qL8UmbaAyvsseRjmzqnodbyEwCohMcbHG?= =?iso-8859-1?Q?PQgblijcbc=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09525C61DB x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(136003)(346002)(39860400002)(366004)(376002)(189003)(199004)(2906002)(68736007)(6512007)(106356001)(36756003)(8676002)(6486002)(81156014)(81166006)(4326008)(53936002)(105586002)(7736002)(102836004)(25786009)(6246003)(478600001)(53946003)(97736004)(6436002)(52116002)(99286004)(305945005)(14454004)(8936002)(6506007)(386003)(76176011)(229853002)(66066001)(11346002)(217873002)(316002)(3846002)(30864003)(486006)(446003)(476003)(186003)(5660300002)(6916009)(54906003)(26005)(86362001)(6116002)(14444005)(256004)(71190400001)(71200400001)(2616005)(21314003);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0502MB3867;H:HE1PR0502MB3641.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 2DIqqeJ5f1qn7Mj/HkoGRy1OavbmGFCH9gOyMh05CwyOo2G8LYn7uzxsWnEcByL84hAFSwZI8JjQubOG5f5tk4PqyAZ88ZDnYlq2lQn5EoHrLK7d/2gEfnRiC2ZLX4qEbYN9L7aYcqnxJHNd36vVDCg6K+IEiFEkrW01d2u00t2VcckPiuXuMu7JL/RTzt1ljMxtMXE4GjLB4pBPHaM/OnIbWa9zDJw4UZedeYzK04VkhDgP65W5/wFRRdkWm+TX8vZ0SY6/vtW6Pq4SGN4X55QZS4fr5Jhq+B36WbJbBdY+vqFSmIOPEfcfwvcvCulxy5BBLXyjD3Ayk2PWdxUk7jPWTDKm+X4yg6ROFAUpX/Qk6OdZ2MIlkhLTjvLHwOi4R650UK1JaDLHNginAIZ/T0AtaCiHEBypm4cs38IVzYw= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fd7ec7e-978f-4006-e578-08d695c17278 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Feb 2019 16:52:19.1489 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0502MB3867 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Davide, I really like the idea of putting all action validation code in single place, instead of spreading it between act API and specific actions init code. See my comment regarding minor problem with using tcf_action_set_ctrlact() on current net-next below. On Fri 15 Feb 2019 at 23:06, Davide Caratti wrote: > - add tcf_action_check_ctrlact(), and pass a pointer to struct tcf_proto > in each actions's init() function, to allow validation of 'goto chain' > control action. > - add tcf_action_set_ctrlact(), to set the control action, release the > previous 'goto_chain' handle and replace it with the new one. > > Signed-off-by: Davide Caratti > --- > include/net/act_api.h | 9 +++++- > net/sched/act_api.c | 58 ++++++++++++++++++++++++++++++++++++-- > net/sched/act_bpf.c | 2 +- > net/sched/act_connmark.c | 1 + > net/sched/act_csum.c | 2 +- > net/sched/act_gact.c | 2 +- > net/sched/act_ife.c | 2 +- > net/sched/act_ipt.c | 11 ++++---- > net/sched/act_mirred.c | 1 + > net/sched/act_nat.c | 3 +- > net/sched/act_pedit.c | 2 +- > net/sched/act_police.c | 1 + > net/sched/act_sample.c | 2 +- > net/sched/act_simple.c | 2 +- > net/sched/act_skbedit.c | 1 + > net/sched/act_skbmod.c | 1 + > net/sched/act_tunnel_key.c | 1 + > net/sched/act_vlan.c | 2 +- > 18 files changed, 86 insertions(+), 17 deletions(-) > > diff --git a/include/net/act_api.h b/include/net/act_api.h > index dbc795ec659e..55a8d44ac0c7 100644 > --- a/include/net/act_api.h > +++ b/include/net/act_api.h > @@ -90,7 +90,7 @@ struct tc_action_ops { > int (*lookup)(struct net *net, struct tc_action **a, u32 index); > int (*init)(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **act, int ovr, > - int bind, bool rtnl_held, > + int bind, bool rtnl_held, struct tcf_proto *tp, > struct netlink_ext_ack *extack); > int (*walk)(struct net *, struct sk_buff *, > struct netlink_callback *, int, > @@ -181,6 +181,13 @@ int tcf_action_dump_old(struct sk_buff *skb, struct = tc_action *a, int, int); > int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int= ); > int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); > > +int tcf_action_check_ctrlact(int action, struct tcf_proto *tp, > + struct tcf_chain **handle, > + struct netlink_ext_ack *extack); > + > +void tcf_action_set_ctrlact(struct tc_action *p, int action, > + struct tcf_chain *goto_chain); > + > #endif /* CONFIG_NET_CLS_ACT */ > > static inline void tcf_action_stats_update(struct tc_action *a, u64 byte= s, > diff --git a/net/sched/act_api.c b/net/sched/act_api.c > index 91d79fac8cb2..088b0d846bde 100644 > --- a/net/sched/act_api.c > +++ b/net/sched/act_api.c > @@ -71,6 +71,60 @@ static void tcf_set_action_cookie(struct tc_cookie __r= cu **old_cookie, > call_rcu(&old->rcu, tcf_free_cookie_rcu); > } > > +int tcf_action_check_ctrlact(int action, struct tcf_proto *tp, > + struct tcf_chain **handle, > + struct netlink_ext_ack *extack) > +{ > + int opcode =3D TC_ACT_EXT_OPCODE(action), ret =3D -EINVAL; > + u32 chain_index; > + > + if (!opcode) > + ret =3D action > TC_ACT_VALUE_MAX ? -EINVAL : 0; > + else if (opcode <=3D TC_ACT_EXT_OPCODE_MAX || action =3D=3D TC_ACT_UNSP= EC) > + ret =3D 0; > + if (ret) { > + NL_SET_ERR_MSG(extack, "invalid control action"); > + goto end; > + } > + > + if (TC_ACT_EXT_CMP(action, TC_ACT_GOTO_CHAIN)) { > + chain_index =3D action & TC_ACT_EXT_VAL_MASK; > + if (!tp) { > + ret =3D -EINVAL; > + NL_SET_ERR_MSG(extack, > + "can't use goto_chain with NULL proto"); > + goto end; > + } > + if (!handle) { > + ret =3D -EINVAL; > + NL_SET_ERR_MSG(extack, > + "can't put goto_chain on NULL handle"); > + goto end; > + } > + *handle =3D tcf_chain_get_by_act(tp->chain->block, chain_index); > + if (!*handle) { > + ret =3D -ENOMEM; > + NL_SET_ERR_MSG(extack, > + "can't allocate goto_chain handle"); > + } > + } > +end: > + return ret; > +} > +EXPORT_SYMBOL(tcf_action_check_ctrlact); > + > +void tcf_action_set_ctrlact(struct tc_action *p, int action, > + struct tcf_chain *goto_chain) > +{ > + struct tcf_chain *old; > + > + old =3D xchg(&p->goto_chain, goto_chain); > + if (old) > + tcf_chain_put_by_act(old); This is blocking in current net-next because tcf_chain_put_by_act() obtains block->lock mutex, so you can't call it while holding tcf_lock spinlock like you do in following patches. Its not a big problem but I guess you will have to just inline this code into all init handlers instead of tcf_action_set_ctrlact() function. BTW is atomic xchg strictly necessary if you hold tcf_lock while re-assigning goto_chain pointer? > + p->tcfa_action =3D action; > +} > +EXPORT_SYMBOL(tcf_action_set_ctrlact); > + > /* XXX: For standalone actions, we don't need a RCU grace period either,= because > * actions are always connected to filters and filters are already destr= oyed in > * RCU callbacks, so after a RCU grace period actions are already discon= nected > @@ -890,10 +944,10 @@ struct tc_action *tcf_action_init_1(struct net *net= , struct tcf_proto *tp, > /* backward compatibility for policer */ > if (name =3D=3D NULL) > err =3D a_o->init(net, tb[TCA_ACT_OPTIONS], est, &a, ovr, bind, > - rtnl_held, extack); > + rtnl_held, tp, extack); > else > err =3D a_o->init(net, nla, est, &a, ovr, bind, rtnl_held, > - extack); > + tp, extack); > if (err < 0) > goto err_mod; > > diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c > index c7633843e223..88a729bdab25 100644 > --- a/net/sched/act_bpf.c > +++ b/net/sched/act_bpf.c > @@ -278,7 +278,7 @@ static void tcf_bpf_prog_fill_cfg(const struct tcf_bp= f *prog, > static int tcf_bpf_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **act, > int replace, int bind, bool rtnl_held, > - struct netlink_ext_ack *extack) > + struct tcf_proto *tp, struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, bpf_net_id); > struct nlattr *tb[TCA_ACT_BPF_MAX + 1]; > diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c > index 8475913f2070..30c4c109c80c 100644 > --- a/net/sched/act_connmark.c > +++ b/net/sched/act_connmark.c > @@ -97,6 +97,7 @@ static const struct nla_policy connmark_policy[TCA_CONN= MARK_MAX + 1] =3D { > static int tcf_connmark_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > + struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, connmark_net_id); > diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c > index 3dc25b7806d7..1ae120c9ab02 100644 > --- a/net/sched/act_csum.c > +++ b/net/sched/act_csum.c > @@ -46,7 +46,7 @@ static struct tc_action_ops act_csum_ops; > > static int tcf_csum_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, int ovr, > - int bind, bool rtnl_held, > + int bind, bool rtnl_held, struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, csum_net_id); > diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c > index b61c20ebb314..727bbca9534b 100644 > --- a/net/sched/act_gact.c > +++ b/net/sched/act_gact.c > @@ -57,7 +57,7 @@ static const struct nla_policy gact_policy[TCA_GACT_MAX= + 1] =3D { > static int tcf_gact_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > - struct netlink_ext_ack *extack) > + struct tcf_proto *tp, struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, gact_net_id); > struct nlattr *tb[TCA_GACT_MAX + 1]; > diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c > index 30b63fa23ee2..9b2eb941e093 100644 > --- a/net/sched/act_ife.c > +++ b/net/sched/act_ife.c > @@ -469,7 +469,7 @@ static int populate_metalist(struct tcf_ife_info *ife= , struct nlattr **tb, > static int tcf_ife_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > - struct netlink_ext_ack *extack) > + struct tcf_proto *tp, struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, ife_net_id); > struct nlattr *tb[TCA_IFE_MAX + 1]; > diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c > index 8af6c11d2482..4b3c844ca988 100644 > --- a/net/sched/act_ipt.c > +++ b/net/sched/act_ipt.c > @@ -97,7 +97,8 @@ static const struct nla_policy ipt_policy[TCA_IPT_MAX += 1] =3D { > > static int __tcf_ipt_init(struct net *net, unsigned int id, struct nlatt= r *nla, > struct nlattr *est, struct tc_action **a, > - const struct tc_action_ops *ops, int ovr, int bind) > + const struct tc_action_ops *ops, int ovr, int bind, > + struct tcf_proto *tp) > { > struct tc_action_net *tn =3D net_generic(net, id); > struct nlattr *tb[TCA_IPT_MAX + 1]; > @@ -206,20 +207,20 @@ static int __tcf_ipt_init(struct net *net, unsigned= int id, struct nlattr *nla, > > static int tcf_ipt_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, int ovr, > - int bind, bool rtnl_held, > + int bind, bool rtnl_held, struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > return __tcf_ipt_init(net, ipt_net_id, nla, est, a, &act_ipt_ops, ovr, > - bind); > + bind, tp); > } > > static int tcf_xt_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, int ovr, > - int bind, bool unlocked, > + int bind, bool unlocked, struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > return __tcf_ipt_init(net, xt_net_id, nla, est, a, &act_xt_ops, ovr, > - bind); > + bind, tp); > } > > static int tcf_ipt_act(struct sk_buff *skb, const struct tc_action *a, > diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c > index c8cf4d10c435..69dda57f1097 100644 > --- a/net/sched/act_mirred.c > +++ b/net/sched/act_mirred.c > @@ -94,6 +94,7 @@ static struct tc_action_ops act_mirred_ops; > static int tcf_mirred_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > + struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, mirred_net_id); > diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c > index c5c1e23add77..526c4c99bcce 100644 > --- a/net/sched/act_nat.c > +++ b/net/sched/act_nat.c > @@ -38,7 +38,8 @@ static const struct nla_policy nat_policy[TCA_NAT_MAX += 1] =3D { > > static int tcf_nat_init(struct net *net, struct nlattr *nla, struct nlat= tr *est, > struct tc_action **a, int ovr, int bind, > - bool rtnl_held, struct netlink_ext_ack *extack) > + bool rtnl_held, struct tcf_proto *tp, > + struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, nat_net_id); > struct nlattr *tb[TCA_NAT_MAX + 1]; > diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c > index 2b372a06b432..1c7a0db7b466 100644 > --- a/net/sched/act_pedit.c > +++ b/net/sched/act_pedit.c > @@ -138,7 +138,7 @@ static int tcf_pedit_key_ex_dump(struct sk_buff *skb, > static int tcf_pedit_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > - struct netlink_ext_ack *extack) > + struct tcf_proto *tp, struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, pedit_net_id); > struct nlattr *tb[TCA_PEDIT_MAX + 1]; > diff --git a/net/sched/act_police.c b/net/sched/act_police.c > index ec8ec55e0fe8..a444dd78a244 100644 > --- a/net/sched/act_police.c > +++ b/net/sched/act_police.c > @@ -83,6 +83,7 @@ static const struct nla_policy police_policy[TCA_POLICE= _MAX + 1] =3D { > static int tcf_police_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > + struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > int ret =3D 0, tcfp_result =3D TC_ACT_OK, err, size; > diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c > index 1a0c682fd734..b2154edcb535 100644 > --- a/net/sched/act_sample.c > +++ b/net/sched/act_sample.c > @@ -37,7 +37,7 @@ static const struct nla_policy sample_policy[TCA_SAMPLE= _MAX + 1] =3D { > > static int tcf_sample_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, int ovr, > - int bind, bool rtnl_held, > + int bind, bool rtnl_held, struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, sample_net_id); > diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c > index 902957beceb3..640ee5b785dc 100644 > --- a/net/sched/act_simple.c > +++ b/net/sched/act_simple.c > @@ -80,7 +80,7 @@ static const struct nla_policy simple_policy[TCA_DEF_MA= X + 1] =3D { > static int tcf_simp_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > - struct netlink_ext_ack *extack) > + struct tcf_proto *tp, struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, simp_net_id); > struct nlattr *tb[TCA_DEF_MAX + 1]; > diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c > index 64dba3708fce..9fc8cfdd35b1 100644 > --- a/net/sched/act_skbedit.c > +++ b/net/sched/act_skbedit.c > @@ -96,6 +96,7 @@ static const struct nla_policy skbedit_policy[TCA_SKBED= IT_MAX + 1] =3D { > static int tcf_skbedit_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > + struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, skbedit_net_id); > diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c > index 59710a183bd3..35572d0e4576 100644 > --- a/net/sched/act_skbmod.c > +++ b/net/sched/act_skbmod.c > @@ -82,6 +82,7 @@ static const struct nla_policy skbmod_policy[TCA_SKBMOD= _MAX + 1] =3D { > static int tcf_skbmod_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > + struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, skbmod_net_id); > diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c > index 8b43fe0130f7..c4adc53e0fb4 100644 > --- a/net/sched/act_tunnel_key.c > +++ b/net/sched/act_tunnel_key.c > @@ -209,6 +209,7 @@ static void tunnel_key_release_params(struct tcf_tunn= el_key_params *p) > static int tunnel_key_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > + struct tcf_proto *tp, > struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, tunnel_key_net_id); > diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c > index 93fdaf707313..80fd0e238a10 100644 > --- a/net/sched/act_vlan.c > +++ b/net/sched/act_vlan.c > @@ -105,7 +105,7 @@ static const struct nla_policy vlan_policy[TCA_VLAN_M= AX + 1] =3D { > static int tcf_vlan_init(struct net *net, struct nlattr *nla, > struct nlattr *est, struct tc_action **a, > int ovr, int bind, bool rtnl_held, > - struct netlink_ext_ack *extack) > + struct tcf_proto *tp, struct netlink_ext_ack *extack) > { > struct tc_action_net *tn =3D net_generic(net, vlan_net_id); > struct nlattr *tb[TCA_VLAN_MAX + 1];