From nobody Thu May 2 09:51:19 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:9f92:0:0:0:0:0 with SMTP id a18csp1909790jam; Wed, 9 Feb 2022 02:29:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJydBb7uHSg6JqTBHSuQH6CVPp/mRPZoKQauaLd0v0SPnhvtaqjiiIn8Gu+/r3QS9XZAd2UB X-Received: by 2002:a05:6214:c8f:: with SMTP id r15mr943923qvr.109.1644402582730; Wed, 09 Feb 2022 02:29:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644402582; cv=none; d=google.com; s=arc-20160816; b=zGQDNnIsDq77jAdKHRgytTRR99lHvHkl+0jwN+RHxkAeFOpBlHQQZZuIxD0Vu1l5Lw HVMO78E4Xurg83rIznMWWVaWDp3DgtdUayHwheGU3uoBV87m+LlnllEkty2EObnJlJ+g kcdcLg5N9VczUBpubdpylPySm3znFTJBpAOF5cIBu6cZR2dZ4VGUHkttDfp8upij7kKS DDYOWrBwGHuHuxfIhKwmBW7l42XaBABOgqsbT8ieaF65TAjSBu4MlgNk3s+2KlyDIOti FxXnRwPTUEuDAC5VHevwasO4EaQvAIeIv79ruuD334bTJ6GpnJGN5EVB8PX3HKVk+hV1 3ewg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=nl7ehjLB2QbFiomxOFvw7XFrxQWJURMWNHZJ9sKOw9w=; b=LiOpOLFWEP/J4jKLNGsxGcvt6PMJBKFuqPwG/4htfHOjEXUVj/C3WORnvSrsuhAUB4 scAY0eg8udwvk4k40Bm6VAKT7Jf8P/qPB4GtYglGLzVfaAmlq1U1sBJbo1DV5o0/obCH 4U4Vyubfht2S7MFtgUu1RjqpQzi+T6w2vuw6hdzB5JdUAwd79iYDqZRD2GiyeqeZ+e2C GGGFAaSFtqsfBikcSk8pRjfoy3yhPoaSqHUATfoFsGspblAkJuFuDxXtDt3nA8PaRGAH EuZRq8Zegx9rZ/MAunGgpApwG+h49CrWzJ1DV8aFaI5HWI8+UMBOsimr6xz1582yElZS RTPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mptcp+bounces-3568-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) smtp.mailfrom="mptcp+bounces-3568-wpasupplicant.patchew=gmail.com@lists.linux.dev" Return-Path: Received: from ewr.edge.kernel.org (ewr.edge.kernel.org. [147.75.197.195]) by mx.google.com with ESMTPS id b23si15936qvf.381.2022.02.09.02.29.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Feb 2022 02:29:42 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-3568-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) client-ip=147.75.197.195; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mptcp+bounces-3568-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) smtp.mailfrom="mptcp+bounces-3568-wpasupplicant.patchew=gmail.com@lists.linux.dev" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ewr.edge.kernel.org (Postfix) with ESMTPS id 884991C0A80 for ; Wed, 9 Feb 2022 10:29:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF62029CA; Wed, 9 Feb 2022 10:29:40 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [193.142.43.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73B3E2F39 for ; Wed, 9 Feb 2022 10:29:39 +0000 (UTC) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1nHkED-0002TN-Ps; Wed, 09 Feb 2022 11:29:37 +0100 From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH mptcp-next] mptcp: mark ops structures as ro_after_init Date: Wed, 9 Feb 2022 11:29:33 +0100 Message-Id: <20220209102933.20873-1-fw@strlen.de> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" These structures are initialised from the init hooks, so we can't make them 'const'. But no writes occur afterwards, so we can use ro_after_init. Also, remove bogus EXPORT_SYMBOL, the only access comes from ip stack, not from kernel modules. Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau --- net/mptcp/subflow.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index d4b4d285ffc1..289df4fd0a73 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -482,8 +482,7 @@ static void subflow_finish_connect(struct sock *sk, con= st struct sk_buff *skb) } =20 struct request_sock_ops mptcp_subflow_request_sock_ops; -EXPORT_SYMBOL_GPL(mptcp_subflow_request_sock_ops); -static struct tcp_request_sock_ops subflow_request_sock_ipv4_ops; +static struct tcp_request_sock_ops subflow_request_sock_ipv4_ops __ro_afte= r_init; =20 static int subflow_v4_conn_request(struct sock *sk, struct sk_buff *skb) { @@ -504,9 +503,9 @@ static int subflow_v4_conn_request(struct sock *sk, str= uct sk_buff *skb) } =20 #if IS_ENABLED(CONFIG_MPTCP_IPV6) -static struct tcp_request_sock_ops subflow_request_sock_ipv6_ops; -static struct inet_connection_sock_af_ops subflow_v6_specific; -static struct inet_connection_sock_af_ops subflow_v6m_specific; +static struct tcp_request_sock_ops subflow_request_sock_ipv6_ops __ro_afte= r_init; +static struct inet_connection_sock_af_ops subflow_v6_specific __ro_after_i= nit; +static struct inet_connection_sock_af_ops subflow_v6m_specific __ro_after_= init; static struct proto tcpv6_prot_override; =20 static int subflow_v6_conn_request(struct sock *sk, struct sk_buff *skb) --=20 2.34.1