From nobody Mon Feb 9 08:59:14 2026 Received: from msa.smtpout.orange.fr (out-69.smtpout.orange.fr [193.252.22.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4EE314A097 for ; Mon, 5 Aug 2024 06:41:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.252.22.69 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722840089; cv=none; b=RwGSiPWIYb+g3Px7TcSa6BNCnbyQ+jl5R6tXzTiCx8ZNlMGtjebJ1I2NuQKNbQdgemXoEJzg5Xlcv4S+3BOHc9SFuIzRVhpK/REt688ESvdy5llkVrLf7rTr6k+eKup8vm1KicXriwsJeSvW1U7fv1ou5SQjicqdQT0+ioCUUMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722840089; c=relaxed/simple; bh=mYdDauKLkFehc0PPjkbY+QSlVdHIA1mUlEQXWR7Yk6g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HpWSQb4lI7Bv/tNTLwPw6wIayInlGDe7LwGGByVRHiOlIs/YDvR0UAjwwzBhy1fJAtoNBMQy5YuctVckaxKUalTmCTDU16ULx0ft1JshOWUmZrbHbu4NYqXgvNsuiwlV3XwetLh+dFoRiL9L1sVPKpqCb9MxQgKYJCb4t2euq9w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=leducTY+; arc=none smtp.client-ip=193.252.22.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="leducTY+" Received: from fedora.home ([90.11.132.44]) by smtp.orange.fr with ESMTPA id arOns5eD41n2IarPJsUUkH; Mon, 05 Aug 2024 08:41:25 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1722840085; bh=fZnfV4gskIqv87dNYmFTGpAnTyJ6Dtl1w8GxFk9Ipsc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=leducTY+nH174RYYnTi12fdGoxirXsmTUaoCHwknPPZws/E+6h0HBDwuc1Mtkcqjw C7U6juRV53WE3+xrABBaxXptE2+ZzEyMiII2Gp3cn/GTVvv3sN3LDuKlDbyX4jKHA5 aGgDFHBbyTyGmGUPWY1YDoGz8vmVtoD6nNIr6p5VBCpCKJsLRR+gfl8gkg9WB6NaLe u8qUjB4ULngW2vz6aSxZTrunRjI7xEWb+xqznSPk11OQWaocEzZ0VpDPAfVPV8Rwur Q59OTLkzCtflgywuy296JcDEzY58E6o44Hy4ASu3RNnlt4Dz26olSGTxBSlXTHzofu EyL6pslWfeUXw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 05 Aug 2024 08:41:25 +0200 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: stas.yakovlev@gmail.com, kvalo@kernel.org, gregkh@linuxfoundation.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, linux-staging@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 3/3] staging: rtl8192e: Constify struct lib80211_crypto_ops Date: Mon, 5 Aug 2024 08:40:39 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Now that functions in lib80211 handle "const struct lib80211_crypto_ops", some structure can be constified as well. Constifying these structures moves some data to a read-only section, so increase overall security. Signed-off-by: Christophe JAILLET Acked-by: Greg Kroah-Hartman Reviewed-by: Simon Horman Tested-by: Philipp Hortmann --- Compile tested only. Changes in v2: - No changes v1: https://lore.kernel.org/all/81be9eb42a2339eaa7466578773945a48904d3b5.17= 15443223.git.christophe.jaillet@wanadoo.fr/ --- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 2 +- drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 2 +- drivers/staging/rtl8192e/rtllib_crypt_wep.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging= /rtl8192e/rtllib_crypt_ccmp.c index 639877069fad..138733cb00e2 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c @@ -378,7 +378,7 @@ static void rtllib_ccmp_print_stats(struct seq_file *m,= void *priv) ccmp->dot11rsna_stats_ccmp_decrypt_errors); } =20 -static struct lib80211_crypto_ops rtllib_crypt_ccmp =3D { +static const struct lib80211_crypto_ops rtllib_crypt_ccmp =3D { .name =3D "R-CCMP", .init =3D rtllib_ccmp_init, .deinit =3D rtllib_ccmp_deinit, diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging= /rtl8192e/rtllib_crypt_tkip.c index dc0917b03511..74dc8326c886 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c @@ -678,7 +678,7 @@ static void rtllib_tkip_print_stats(struct seq_file *m,= void *priv) tkip->dot11RSNAStatsTKIPLocalMICFailures); } =20 -static struct lib80211_crypto_ops rtllib_crypt_tkip =3D { +static const struct lib80211_crypto_ops rtllib_crypt_tkip =3D { .name =3D "R-TKIP", .init =3D rtllib_tkip_init, .deinit =3D rtllib_tkip_deinit, diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/= rtl8192e/rtllib_crypt_wep.c index 10092f6884ff..aa18c060d727 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c @@ -209,7 +209,7 @@ static void prism2_wep_print_stats(struct seq_file *m, = void *priv) seq_printf(m, "key[%d] alg=3DWEP len=3D%d\n", wep->key_idx, wep->key_len); } =20 -static struct lib80211_crypto_ops rtllib_crypt_wep =3D { +static const struct lib80211_crypto_ops rtllib_crypt_wep =3D { .name =3D "R-WEP", .init =3D prism2_wep_init, .deinit =3D prism2_wep_deinit, --=20 2.45.2