Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2567408pxf; Sun, 14 Mar 2021 04:13:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVg3j7rfHehhebwKZjOtQp0VaUi/IkfE3wOnwXdXgTU9y8C9BnRKz6pPfqN4Q6vjPq/Qq3 X-Received: by 2002:a17:906:1155:: with SMTP id i21mr17878889eja.218.1615720379868; Sun, 14 Mar 2021 04:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615720379; cv=none; d=google.com; s=arc-20160816; b=mg19b/HBHNVSKJczcin5NNGZbxkZ20p9n8BKMrJ4vbv9mux42mm1UgZFSEF1stxFvt +bcDj6yOK9F3DhGUxA7DFwhLv6/OOjCpxeO/PM4SNPpjUmaYIouuzYAuc+QNZh0mSu7t ER9INQ1Z6OXorO/4T6cprhCnY2mP/OUzRlI/0s0UnuOAtWYSefQ+78nwUjvQJTK+llsg jo2XzPtrcPonvdDk0dBLIEN8ynZU7E6ie9v1NADfZ7g7gFfumSYyQsmWhP9Nl65hjesi H7dv+zsQlNTL/OJUz1SVqttjuXTZfJs/oGXLSUiyXKJbUcAF5dQ1ycH5s4cYGJjJ1qG2 1tew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=akHA2XdZrjVj6nR+ZsUhHnDBklFIjIMbFmd6VtrDomE=; b=gM5R7hWPjH6OuF9MD6DYTfTfhZeDTKicPVh7b8eiLMmNycs1o0HviRbVy4aVIw6Ii3 +8RkFqmMcRqXHErQADrNT8wHtVfTICinRdmpWUn7Mmj7jG6eM35kk19khFwmT26aOBv3 TUn8E5uhN+YCWaFS4xRix+fZ4nzfX8Amsq8Zzyf5s8RqK+Llh4R2ju/PlWeI72yL5fdm WpNijjcHy+1M4PtD4bBFa+8v831CH5hOorVLIOi7Oj2BIvTBOPuPejBJ2AjTYdz2bhD8 M2kPirVRw3LsIs4fX6tvWBNuwLsg8a3rDlxkRHoSuSKFhe0Z2sDevqBRPthyC4CTfP+N N3SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=ERlrfbND; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si7846511ejg.130.2021.03.14.04.12.37; Sun, 14 Mar 2021 04:12:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=ERlrfbND; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235265AbhCNLLb (ORCPT + 99 others); Sun, 14 Mar 2021 07:11:31 -0400 Received: from mail-40136.protonmail.ch ([185.70.40.136]:49856 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235207AbhCNLLE (ORCPT ); Sun, 14 Mar 2021 07:11:04 -0400 Date: Sun, 14 Mar 2021 11:11:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1615720262; bh=akHA2XdZrjVj6nR+ZsUhHnDBklFIjIMbFmd6VtrDomE=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=ERlrfbNDFrhrQdjRZv27BFCTN1DQ/54Ypn+fYYu+RLLP4CdS28HGjug/o8KxWXzG/ ceGDPy0l9gY9mfXfmLcIQg4thRSISYRkwx+GqiVuSta/4zfsQLrz15idyEeuCS5M77 c8KpivT4MSstXs+r8bLYfos7mWPN4SREPpC8e4KEPbxzSd/I1Q32zJWHYeCxm1+uQB P1lZk8Tbh+LWGjlOCmcJj5M9cOUH9TKTTYBmvTURVafr+TY7CIArm4jgXq9vFuUozQ 78aav+2sD/8O587NAWuYh6WBvRaSVm/OzLmn32C1tOFt7j//3nEmm65GkfRhtifqab 4aJxe900FOXsg== To: "David S. Miller" , Jakub Kicinski From: Alexander Lobakin Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Jonathan Lemon , Alexander Lobakin , Eric Dumazet , Willem de Bruijn , Kevin Hao , Pablo Neira Ayuso , Jakub Sitnicki , Marco Elver , Dexuan Cui , Vladimir Oltean , Ariel Levkovich , Wang Qing , Davide Caratti , Guillaume Nault , Eran Ben Elisha , Mauro Carvalho Chehab , Kirill Tkhai , Bartosz Golaszewski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH v3 net-next 1/6] flow_dissector: constify bpf_flow_dissector's data pointers Message-ID: <20210314111027.7657-2-alobakin@pm.me> In-Reply-To: <20210314111027.7657-1-alobakin@pm.me> References: <20210314111027.7657-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org BPF Flow dissection programs are read-only and don't touch input buffers. Mark 'data' and 'data_end' in struct bpf_flow_dissector as const in preparation for global input constifying. Signed-off-by: Alexander Lobakin --- include/net/flow_dissector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h index cc10b10dc3a1..bf00e71816ed 100644 --- a/include/net/flow_dissector.h +++ b/include/net/flow_dissector.h @@ -368,8 +368,8 @@ static inline void *skb_flow_dissector_target(struct fl= ow_dissector *flow_dissec struct bpf_flow_dissector { =09struct bpf_flow_keys=09*flow_keys; =09const struct sk_buff=09*skb; -=09void=09=09=09*data; -=09void=09=09=09*data_end; +=09const void=09=09*data; +=09const void=09=09*data_end; }; static inline void -- 2.30.2