From: "Krzysztof Wilczyński" <kw@linux.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>, Jon Mason <jdmason@kudzu.us>,
Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>,
linux-pci@vger.kernel.org, mhi@lists.linux.dev,
ntb@lists.linux.dev
Subject: Re: [PATCH 1/5] PCI: endpoint: Make pci_epf_ops in pci_epf_driver const
Date: Tue, 19 Dec 2023 07:43:05 +0900 [thread overview]
Message-ID: <20231218224305.GA2983820@rocinante> (raw)
In-Reply-To: <20230722230848.589428-1-lars@metafoo.de>
Hello,
> The pci_epf_ops struct contains a set of callbacks that are used by the
> pci_epf_driver. The ops struct is never modified by the epf core itself.
>
> Marking the ops pointer const allows epf drivers to declare their
> pci_epf_ops struct to be const. This allows the struct to be placed in the
> read-only section. Which for example brings some security benefits as the
> callbacks can not be overwritten.
Applied to endpoint, thank you!
[01/05] PCI: endpoint: Make struct pci_epf_ops in pci_epf_driver const
https://git.kernel.org/pci/pci/c/86362293044b
[02/05] PCI: endpoint: pci-epf-mhi: Make structs pci_epf_ops and pci_epf_event_ops const
https://git.kernel.org/pci/pci/c/150d04ddf386
[03/05] PCI: endpoint: pci-epf-ntb: Make struct pci_epf_ops const
https://git.kernel.org/pci/pci/c/54f22c9758dc
[04/05] PCI: endpoint: pci-epf-vntb: Make struct pci_epf_ops const
https://git.kernel.org/pci/pci/c/c21b53deda09
[05/05] PCI: endpoint: pci-epf-test: Make struct pci_epf_ops const
https://git.kernel.org/pci/pci/c/6f517e044096
Krzysztof
prev parent reply other threads:[~2023-12-18 22:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 23:08 [PATCH 1/5] PCI: endpoint: Make pci_epf_ops in pci_epf_driver const Lars-Peter Clausen
2023-07-22 23:08 ` [PATCH 2/5] PCI: endpoint: pci-epf-mhi: Constify pci_epf_ops and pci_epf_event_ops Lars-Peter Clausen
2023-07-24 6:01 ` Manivannan Sadhasivam
2023-07-22 23:08 ` [PATCH 3/5] PCI: endpoint: pci-epf-ntb: Constify pci_epf_ops Lars-Peter Clausen
2023-07-24 6:02 ` Manivannan Sadhasivam
2023-07-22 23:08 ` [PATCH 4/5] PCI: endpoint: pci-epf-vntb: " Lars-Peter Clausen
2023-07-24 6:02 ` Manivannan Sadhasivam
2023-07-22 23:08 ` [PATCH 5/5] PCI: endpoint: pci-epf-test: " Lars-Peter Clausen
2023-07-24 6:03 ` Manivannan Sadhasivam
2023-07-24 6:00 ` [PATCH 1/5] PCI: endpoint: Make pci_epf_ops in pci_epf_driver const Manivannan Sadhasivam
2023-12-18 22:43 ` Krzysztof Wilczyński [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=20231218224305.GA2983820@rocinante \
--to=kw@linux.com \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=kishon@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=mhi@lists.linux.dev \
--cc=ntb@lists.linux.dev \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).