Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1531083pxf; Fri, 12 Mar 2021 11:48:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzL/mnmvLXtbiqRdf8wk2Xj5MvgLi2z7es3sRg6yfkkQkNMaCzSp89drYp3aokU0nuSr+HZ X-Received: by 2002:a05:6402:1283:: with SMTP id w3mr16055927edv.340.1615578506957; Fri, 12 Mar 2021 11:48:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615578506; cv=none; d=google.com; s=arc-20160816; b=yv6L/4fOhG271YzVoIRi605Ik0b+TkRdG12fgY5lBrMd6FVM2oFq5IjRSVL720GNWX Gj63a5S1d1UuPr0fABCD8mam5+daZ9GefP2hdKu1NFRfhiq/MLLyRezh1Oy/gZT/285v MPSrmdwqrO2ARx5cTr03ycMl31jN0YYFlzFaNVROzeGXCIc/HGT85RvFCB6rqUur13iH 5ca79hRGvAcAmL5iV8mCNPQnEH2C7c2vSA+sDx7cYxrOKg+EpFo5WZMeH2FOWePy7ASF oVEcQiKkg7G2PiWSxsoRdO/ZY6jA21k51MtA6V2M7qsAUss+5YST2ZyuRbAtZwxikiYu HKkQ== 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=ftpGwrO8lUj/+nf3ZEMhVVW9gOAMLofs/x8sHMcxcZI=; b=qnMdDb5+oLdEPxlxqRpmdNe09NTnqToyb3i00wguB2DSmlloegsDU1ArpjDdOV0psy 1osROWQeMPWf5EbJxM8/OW/7JyRqdMA5XJOrzVv4xETf6PsyhMjTBXjrRtlwYBSXy1FW Y4gr3M4QrzBuX0TYgSZUq5bdjGejbYRc+VCT8HhR2hXsp/Cna69ZPttbq1F95N3N2wQH 7B7sRQItAMh/ji1Dt6sVxQzJ2g++Jj7/i3cbk+K11dx3uNRL/NK43n7BnoyI3tCrbyR3 t9f0WytwywFIQkmNBgO75fbCLN17E1LqRLUldlL9VN+xH26pQxmbA04rzWUaoRLxsinT X0kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=YLIpjyXb; 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 t16si5120477edi.293.2021.03.12.11.48.04; Fri, 12 Mar 2021 11:48:26 -0800 (PST) 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=YLIpjyXb; 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 S234395AbhCLTqg (ORCPT + 99 others); Fri, 12 Mar 2021 14:46:36 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:10881 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234368AbhCLTq1 (ORCPT ); Fri, 12 Mar 2021 14:46:27 -0500 Date: Fri, 12 Mar 2021 19:46:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1615578386; bh=ftpGwrO8lUj/+nf3ZEMhVVW9gOAMLofs/x8sHMcxcZI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=YLIpjyXbRHOJR+M8H9IrEyKtNVJTJ/BxjwfScOG+Z8sNglh2C8R/wlJjmCeldzlN+ +DsMxE+PBwQfH9rhFHUZlcFEDXQWrT5kXTRTD5SMn3SEBdyUEIGP6oz89Ah3IvDJ7d 4GRiakvF9sQJSIhszF15g5vdaa3LoWqitEwLC1RePxuJ7q8d2HxixhvingNzPj8nQS ShDOGRWcx7JgqHoYxunGftQqinuPE9puiSahF54zQLZz/FcmYsDETKc3MMl6rFI6bq x6xggMbk5vshrAx6fmf5N/B4y/WbW+RpO27B6atmvOzYynnv76CDrk5ZkPkc68Xb49 yRY4pBdkR50nA== 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 net-next 1/6] flow_dissector: constify bpf_flow_dissector's data pointers Message-ID: <20210312194538.337504-2-alobakin@pm.me> In-Reply-To: <20210312194538.337504-1-alobakin@pm.me> References: <20210312194538.337504-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