From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH net-next v5 1/4] net/sched: user-space can't set unknown tcfa_action values Date: Mon, 30 Jul 2018 14:36:05 +0200 Message-ID: <20180730123605.GE2058@nanopsycho> References: <951ad078ad4d5ee108abcd85189460aed7948634.1532934532.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Jamal Hadi Salim , Cong Wang , Daniel Borkmann , Marcelo Ricardo Leitner , Eyal Birger , "David S. Miller" To: Paolo Abeni Return-path: Received: from mail-wr1-f68.google.com ([209.85.221.68]:33317 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728865AbeG3ONg (ORCPT ); Mon, 30 Jul 2018 10:13:36 -0400 Received: by mail-wr1-f68.google.com with SMTP id g6-v6so12734603wrp.0 for ; Mon, 30 Jul 2018 05:38:48 -0700 (PDT) Content-Disposition: inline In-Reply-To: <951ad078ad4d5ee108abcd85189460aed7948634.1532934532.git.pabeni@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: Mon, Jul 30, 2018 at 02:30:42PM CEST, pabeni@redhat.com wrote: >Currently, when initializing an action, the user-space can specify >and use arbitrary values for the tcfa_action field. If the value >is unknown by the kernel, is implicitly threaded as TC_ACT_UNSPEC. > >This change explicitly checks for unknown values at action creation >time, and explicitly convert them to TC_ACT_UNSPEC. No functional >changes are introduced, but this will allow introducing tcfa_action >values not exposed to user-space in a later patch. > >Note: we can't use the above to hide TC_ACT_REDIRECT from user-space, >as the latter is already part of uAPI. > >v3 -> v4: > - use an helper to check for action validity (JiriP) > - emit an extack for invalid actions (JiriP) >v4 -> v5: > - keep messages on a single line, drop net_warn (Marcelo) Little nitpick: The changelog should be in the reverse order. > >Signed-off-by: Paolo Abeni Acked-by: Jiri Pirko