From: "Winiarska, Iwona" <iwona.winiarska@intel.com>
To: "tmaimon77@gmail.com" <tmaimon77@gmail.com>,
"tali.perry1@gmail.com" <tali.perry1@gmail.com>,
"venture@google.com" <venture@google.com>,
"avifishman70@gmail.com" <avifishman70@gmail.com>,
"christophe.jaillet@wanadoo.fr" <christophe.jaillet@wanadoo.fr>,
"yuenn@google.com" <yuenn@google.com>,
"Fair, Benjamin" <benjaminfair@google.com>
Cc: "kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH] peci: npcm: Constify struct peci_controller_ops
Date: Mon, 9 Sep 2024 08:39:24 +0000 [thread overview]
Message-ID: <5f7e348bb17b19ced22eaa20d5396e66eb724a8f.camel@intel.com> (raw)
In-Reply-To: <3c7d455745c2265c19ed02f026dfc9610271d3c2.1725692376.git.christophe.jaillet@wanadoo.fr>
On Sat, 2024-09-07 at 09:00 +0200, Christophe JAILLET wrote:
> 'struct peci_controller_ops' is not modified in this driver.
>
> Constifying this structure moves some data to a read-only section, so
> increase overall security, especially when the structure holds some
> function pointers.
>
> On a x86_64, with allmodconfig:
> Before:
> ======
> text data bss dec
> hex filename
> 8003 784 48 8835
> 2283 drivers/peci/controller/peci-npcm.o
>
> After:
> =====
> text data bss dec
> hex filename
> 8003 776 48 8827
> 227b drivers/peci/controller/peci-npcm.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Thanks
-Iwona
> ---
> Compile tested only
> ---
> drivers/peci/controller/peci-npcm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/peci/controller/peci-npcm.c
> b/drivers/peci/controller/peci-npcm.c
> index ec613d35c796..fa91be58f6f3 100644
> --- a/drivers/peci/controller/peci-npcm.c
> +++ b/drivers/peci/controller/peci-npcm.c
> @@ -224,7 +224,7 @@ static const struct regmap_config npcm_peci_regmap_config
> = {
> .fast_io = true,
> };
>
> -static struct peci_controller_ops npcm_ops = {
> +static const struct peci_controller_ops npcm_ops = {
> .xfer = npcm_peci_xfer,
> };
>
prev parent reply other threads:[~2024-09-09 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 7:00 Christophe JAILLET
2024-09-09 8:39 ` Winiarska, Iwona [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f7e348bb17b19ced22eaa20d5396e66eb724a8f.camel@intel.com \
--to=iwona.winiarska@intel.com \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=venture@google.com \
--cc=yuenn@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®