Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1972450pxf; Sat, 13 Mar 2021 03:45:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcvcuKGoiAPYdqAIUJZXDH+7L+nWLK2TM7S5AjizQ3J2lz16oN2gp3IUT9BfPfoNzuc0QB X-Received: by 2002:a17:906:6bd1:: with SMTP id t17mr13741367ejs.319.1615635922165; Sat, 13 Mar 2021 03:45:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615635922; cv=none; d=google.com; s=arc-20160816; b=zN/4zfQu11TcgA5hOlplqVMwVvJm1HVp7NII8MUBwNnSniLDIFCmhxvfrMbJD8/qyB NbBc/QYZVZCRs+1teUO43cgD0PWjdXLQhsjAeVDJzqS55abzbPpR8KHkCiVZtqVFCXqy 7DO292fCV468BYP7JLoziJ2UCchNy0H+32mxgdPqlXp3A3tPJ+IH1XokJvOdBsRSPwZs CCm+BK+wyMBZltk9vjBcJlpzl1XivRK1b6uEzb26RbQJr1hEHFLNRaPIlJsxxq/VSD/0 qc2sLQyG9c5JVI4vGFQpN5zZMESjY0aqqYyCzeWYNdbKO92AXJWB9OZxlgWhbiVQr0OB 6oQQ== 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=0F5SFrfSqTyhlEoCEt7sP2H7BBYF9tNHVlCjZLtdejmEMFlY3w9Mt6cyQ6W0M8aOvo +931Os0uBSYY4hjqBJBLOguknZ/d1QMApRvzMhgmuZjeDMep5wumwC14D/kfFtb9n7zr A+wbXK3WmVNmJT4yxfinL3l6oVb+hhK4pnAcwbeDhO72RwBjuFy9MolCuBSZEUSZtimu rAV062H8ZdfL/lW6pNjp/Yy8AHbjDUA9g3p7KouHVWNBu8alGNqfVlp+y05iW9qULcJH Sl5S4WSibZ4ZVclINNkVMMmeY2K86DPyyZWbzmM7nUON4pbY9V1XO/+0q5dt+A35Ixp1 gs/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=eJQO1rJq; 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 j19si6585765ejs.516.2021.03.13.03.44.59; Sat, 13 Mar 2021 03:45:22 -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=eJQO1rJq; 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 S233690AbhCMLhe (ORCPT + 99 others); Sat, 13 Mar 2021 06:37:34 -0500 Received: from mail1.protonmail.ch ([185.70.40.18]:21578 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233550AbhCMLhY (ORCPT ); Sat, 13 Mar 2021 06:37:24 -0500 Date: Sat, 13 Mar 2021 11:37:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1615635442; bh=ftpGwrO8lUj/+nf3ZEMhVVW9gOAMLofs/x8sHMcxcZI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=eJQO1rJq8ThcFtAOnrXSWUS0jy8TjW1bNWMzpwsTX40b3DWBYINzUpzVs5DhIz2EI uoDh0E4vEmkCaMCHbydHF3U0TJ+J8weKrIsZ5Myu68oTX/ocoU2Nz7LnqYXCZlS2ST Z3fs5IQNLW+c8o1fvCREYJLcJ0bw5tT7rzTm0AdKhI1hgBXARx7fVF0p14NOXEzNVR bOCZ/DMAQ7ryfzbsNhAwVf9ijx/XJ3ZXmYunQFyfXwrg7FUQDgqNC8Si7rWOVIqQ9l GI/CFHxZVLM+2GPrlMPywwPfqS/U4thSFM8iJLjPmoAUTQJmNNCWsxhNpHOltdJuvJ JAs3a+EYDv7jA== 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 v2 net-next 1/6] flow_dissector: constify bpf_flow_dissector's data pointers Message-ID: <20210313113645.5949-2-alobakin@pm.me> In-Reply-To: <20210313113645.5949-1-alobakin@pm.me> References: <20210313113645.5949-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