All of lore.kernel.org
 help / color / mirror / Atom feed
From: KY Srinivasan <kys@microsoft.com>
To: Jess Frazelle <me@jessfraz.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Keith Busch <keith.busch@intel.com>,
	"open list:Hyper-V CORE AND DRIVERS"
	<devel@linuxdriverproject.org>,
	"open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: "kernel-hardening@lists.openwall.com" 
	<kernel-hardening@lists.openwall.com>
Subject: RE: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init
Date: Sun, 12 Feb 2017 04:08:24 +0000	[thread overview]
Message-ID: <DM5PR03MB2490F0970E353CACB9D201F5A0460@DM5PR03MB2490.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20170211013758.3288-3-me@jessfraz.com>



> -----Original Message-----
> From: Jess Frazelle [mailto:me@jessfraz.com]
> Sent: Friday, February 10, 2017 5:38 PM
> To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; Bjorn Helgaas <bhelgaas@google.com>; Keith
> Busch <keith.busch@intel.com>; open list:Hyper-V CORE AND DRIVERS
> <devel@linuxdriverproject.org>; open list:PCI SUBSYSTEM <linux-
> pci@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>
> Cc: kernel-hardening@lists.openwall.com; Jess Frazelle <me@jessfraz.com>
> Subject: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init
> 
> Marked msi_domain_ops structs as __ro_after_init when called only during
> init.
> This protects the data structure from accidental corruption.
> 
> Suggested-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Jess Frazelle <me@jessfraz.com>

Acked-by: K. Y. Srinivasan <kys@microsoft.com>

K. Y

> ---
>  drivers/pci/host/pci-hyperv.c | 2 +-
>  drivers/pci/host/vmd.c        | 2 +-
>  drivers/pci/msi.c             | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
> index 3efcc7bdc5fb..f05b93689d8f 100644
> --- a/drivers/pci/host/pci-hyperv.c
> +++ b/drivers/pci/host/pci-hyperv.c
> @@ -958,7 +958,7 @@ static irq_hw_number_t
> hv_msi_domain_ops_get_hwirq(struct msi_domain_info *info,
>  	return arg->msi_hwirq;
>  }
> 
> -static struct msi_domain_ops hv_msi_ops = {
> +static struct msi_domain_ops hv_msi_ops __ro_after_init = {
>  	.get_hwirq	= hv_msi_domain_ops_get_hwirq,
>  	.msi_prepare	= pci_msi_prepare,
>  	.set_desc	= pci_msi_set_desc,
> diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c
> index 18ef1a93c10a..152c461538e4 100644
> --- a/drivers/pci/host/vmd.c
> +++ b/drivers/pci/host/vmd.c
> @@ -253,7 +253,7 @@ static void vmd_set_desc(msi_alloc_info_t *arg,
> struct msi_desc *desc)
>  	arg->desc = desc;
>  }
> 
> -static struct msi_domain_ops vmd_msi_domain_ops = {
> +static struct msi_domain_ops vmd_msi_domain_ops __ro_after_init = {
>  	.get_hwirq	= vmd_get_hwirq,
>  	.msi_init	= vmd_msi_init,
>  	.msi_free	= vmd_msi_free,
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 50c5003295ca..93141d5e2d1c 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -1413,7 +1413,7 @@ static void
> pci_msi_domain_set_desc(msi_alloc_info_t *arg,
>  #define pci_msi_domain_set_desc		NULL
>  #endif
> 
> -static struct msi_domain_ops pci_msi_domain_ops_default = {
> +static struct msi_domain_ops pci_msi_domain_ops_default __ro_after_init
> = {
>  	.set_desc	= pci_msi_domain_set_desc,
>  	.msi_check	= pci_msi_domain_check_cap,
>  	.handle_error	= pci_msi_domain_handle_error,
> --
> 2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: KY Srinivasan <kys@microsoft.com>
To: Jess Frazelle <me@jessfraz.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Keith Busch <keith.busch@intel.com>,
	"open list:Hyper-V CORE AND DRIVERS"
	<devel@linuxdriverproject.org>,
	"open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: "kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>
Subject: RE: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init
Date: Sun, 12 Feb 2017 04:08:24 +0000	[thread overview]
Message-ID: <DM5PR03MB2490F0970E353CACB9D201F5A0460@DM5PR03MB2490.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20170211013758.3288-3-me@jessfraz.com>



> -----Original Message-----
> From: Jess Frazelle [mailto:me@jessfraz.com]
> Sent: Friday, February 10, 2017 5:38 PM
> To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; Bjorn Helgaas <bhelgaas@google.com>; Keith
> Busch <keith.busch@intel.com>; open list:Hyper-V CORE AND DRIVERS
> <devel@linuxdriverproject.org>; open list:PCI SUBSYSTEM <linux-
> pci@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>
> Cc: kernel-hardening@lists.openwall.com; Jess Frazelle <me@jessfraz.com>
> Subject: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init
>=20
> Marked msi_domain_ops structs as __ro_after_init when called only during
> init.
> This protects the data structure from accidental corruption.
>=20
> Suggested-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Jess Frazelle <me@jessfraz.com>

Acked-by: K. Y. Srinivasan <kys@microsoft.com>

K. Y

> ---
>  drivers/pci/host/pci-hyperv.c | 2 +-
>  drivers/pci/host/vmd.c        | 2 +-
>  drivers/pci/msi.c             | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>=20
> diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.=
c
> index 3efcc7bdc5fb..f05b93689d8f 100644
> --- a/drivers/pci/host/pci-hyperv.c
> +++ b/drivers/pci/host/pci-hyperv.c
> @@ -958,7 +958,7 @@ static irq_hw_number_t
> hv_msi_domain_ops_get_hwirq(struct msi_domain_info *info,
>  	return arg->msi_hwirq;
>  }
>=20
> -static struct msi_domain_ops hv_msi_ops =3D {
> +static struct msi_domain_ops hv_msi_ops __ro_after_init =3D {
>  	.get_hwirq	=3D hv_msi_domain_ops_get_hwirq,
>  	.msi_prepare	=3D pci_msi_prepare,
>  	.set_desc	=3D pci_msi_set_desc,
> diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c
> index 18ef1a93c10a..152c461538e4 100644
> --- a/drivers/pci/host/vmd.c
> +++ b/drivers/pci/host/vmd.c
> @@ -253,7 +253,7 @@ static void vmd_set_desc(msi_alloc_info_t *arg,
> struct msi_desc *desc)
>  	arg->desc =3D desc;
>  }
>=20
> -static struct msi_domain_ops vmd_msi_domain_ops =3D {
> +static struct msi_domain_ops vmd_msi_domain_ops __ro_after_init =3D {
>  	.get_hwirq	=3D vmd_get_hwirq,
>  	.msi_init	=3D vmd_msi_init,
>  	.msi_free	=3D vmd_msi_free,
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 50c5003295ca..93141d5e2d1c 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -1413,7 +1413,7 @@ static void
> pci_msi_domain_set_desc(msi_alloc_info_t *arg,
>  #define pci_msi_domain_set_desc		NULL
>  #endif
>=20
> -static struct msi_domain_ops pci_msi_domain_ops_default =3D {
> +static struct msi_domain_ops pci_msi_domain_ops_default __ro_after_init
> =3D {
>  	.set_desc	=3D pci_msi_domain_set_desc,
>  	.msi_check	=3D pci_msi_domain_check_cap,
>  	.handle_error	=3D pci_msi_domain_handle_error,
> --
> 2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: KY Srinivasan <kys@microsoft.com>
To: Jess Frazelle <me@jessfraz.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Keith Busch <keith.busch@intel.com>,
	"open list:Hyper-V CORE AND DRIVERS"
	<devel@linuxdriverproject.org>,
	"open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: "kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>
Subject: [kernel-hardening] RE: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init
Date: Sun, 12 Feb 2017 04:08:24 +0000	[thread overview]
Message-ID: <DM5PR03MB2490F0970E353CACB9D201F5A0460@DM5PR03MB2490.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20170211013758.3288-3-me@jessfraz.com>



> -----Original Message-----
> From: Jess Frazelle [mailto:me@jessfraz.com]
> Sent: Friday, February 10, 2017 5:38 PM
> To: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; Bjorn Helgaas <bhelgaas@google.com>; Keith
> Busch <keith.busch@intel.com>; open list:Hyper-V CORE AND DRIVERS
> <devel@linuxdriverproject.org>; open list:PCI SUBSYSTEM <linux-
> pci@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>
> Cc: kernel-hardening@lists.openwall.com; Jess Frazelle <me@jessfraz.com>
> Subject: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init
> 
> Marked msi_domain_ops structs as __ro_after_init when called only during
> init.
> This protects the data structure from accidental corruption.
> 
> Suggested-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Jess Frazelle <me@jessfraz.com>

Acked-by: K. Y. Srinivasan <kys@microsoft.com>

K. Y

> ---
>  drivers/pci/host/pci-hyperv.c | 2 +-
>  drivers/pci/host/vmd.c        | 2 +-
>  drivers/pci/msi.c             | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
> index 3efcc7bdc5fb..f05b93689d8f 100644
> --- a/drivers/pci/host/pci-hyperv.c
> +++ b/drivers/pci/host/pci-hyperv.c
> @@ -958,7 +958,7 @@ static irq_hw_number_t
> hv_msi_domain_ops_get_hwirq(struct msi_domain_info *info,
>  	return arg->msi_hwirq;
>  }
> 
> -static struct msi_domain_ops hv_msi_ops = {
> +static struct msi_domain_ops hv_msi_ops __ro_after_init = {
>  	.get_hwirq	= hv_msi_domain_ops_get_hwirq,
>  	.msi_prepare	= pci_msi_prepare,
>  	.set_desc	= pci_msi_set_desc,
> diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c
> index 18ef1a93c10a..152c461538e4 100644
> --- a/drivers/pci/host/vmd.c
> +++ b/drivers/pci/host/vmd.c
> @@ -253,7 +253,7 @@ static void vmd_set_desc(msi_alloc_info_t *arg,
> struct msi_desc *desc)
>  	arg->desc = desc;
>  }
> 
> -static struct msi_domain_ops vmd_msi_domain_ops = {
> +static struct msi_domain_ops vmd_msi_domain_ops __ro_after_init = {
>  	.get_hwirq	= vmd_get_hwirq,
>  	.msi_init	= vmd_msi_init,
>  	.msi_free	= vmd_msi_free,
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 50c5003295ca..93141d5e2d1c 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -1413,7 +1413,7 @@ static void
> pci_msi_domain_set_desc(msi_alloc_info_t *arg,
>  #define pci_msi_domain_set_desc		NULL
>  #endif
> 
> -static struct msi_domain_ops pci_msi_domain_ops_default = {
> +static struct msi_domain_ops pci_msi_domain_ops_default __ro_after_init
> = {
>  	.set_desc	= pci_msi_domain_set_desc,
>  	.msi_check	= pci_msi_domain_check_cap,
>  	.handle_error	= pci_msi_domain_handle_error,
> --
> 2.11.0

  reply	other threads:[~2017-02-12  4:08 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11  1:37 [PATCH v2 1/5] irq: set {msi_domain,syscore}_ops as __ro_after_init Jess Frazelle
2017-02-11  1:37 ` [kernel-hardening] " Jess Frazelle
2017-02-11  1:37 ` [PATCH v2 2/5] time: mark syscore_ops " Jess Frazelle
2017-02-11  1:37   ` [kernel-hardening] " Jess Frazelle
2017-02-11  2:12   ` John Stultz
2017-02-11  2:12     ` [kernel-hardening] " John Stultz
2017-02-11  9:23     ` Thomas Gleixner
2017-02-11  9:23       ` [kernel-hardening] " Thomas Gleixner
2017-02-11  1:37 ` [PATCH v2 3/5] pci: set msi_domain_ops " Jess Frazelle
2017-02-11  1:37   ` [kernel-hardening] " Jess Frazelle
2017-02-12  4:08   ` KY Srinivasan [this message]
2017-02-12  4:08     ` [kernel-hardening] " KY Srinivasan
2017-02-12  4:08     ` KY Srinivasan
2017-02-13 18:14   ` Keith Busch
2017-02-13 18:14     ` [kernel-hardening] " Keith Busch
2017-02-15 20:33   ` Bjorn Helgaas
2017-02-15 20:33     ` [kernel-hardening] " Bjorn Helgaas
2017-02-15 20:46     ` Kees Cook
2017-02-15 20:46       ` [kernel-hardening] " Kees Cook
2017-02-15 20:46       ` Kees Cook
2017-02-15 21:16     ` Thomas Gleixner
2017-02-15 21:16       ` [kernel-hardening] " Thomas Gleixner
2017-02-16 14:35       ` Bjorn Helgaas
2017-02-16 14:35         ` [kernel-hardening] " Bjorn Helgaas
2017-02-16 14:38         ` Thomas Gleixner
2017-02-16 14:38           ` [kernel-hardening] " Thomas Gleixner
2017-03-07 19:07           ` Bjorn Helgaas
2017-03-07 19:07             ` [kernel-hardening] " Bjorn Helgaas
2017-03-14 18:50             ` Jessica Frazelle
2017-03-14 18:50               ` [kernel-hardening] " Jessica Frazelle
2017-03-14 19:24               ` Bjorn Helgaas
2017-03-14 19:24                 ` [kernel-hardening] " Bjorn Helgaas
2017-02-11  1:37 ` [PATCH v2 4/5] staging: " Jess Frazelle
2017-02-11  1:37   ` [kernel-hardening] " Jess Frazelle
2017-02-11  1:37 ` [PATCH v2 5/5] x86: " Jess Frazelle
2017-02-11  1:37   ` [kernel-hardening] " Jess Frazelle
2017-02-11  9:14 ` [PATCH v2 1/5] irq: set {msi_domain,syscore}_ops " Thomas Gleixner
2017-02-11  9:14   ` [kernel-hardening] " Thomas Gleixner
2017-02-11  9:23   ` Thomas Gleixner
2017-02-11  9:23     ` [kernel-hardening] " Thomas Gleixner
2017-02-11 10:48   ` Jess Frazelle
2017-02-11 10:48     ` [kernel-hardening] " Jess Frazelle
2017-02-11 12:00     ` Thomas Gleixner
2017-02-11 12:00       ` [kernel-hardening] " Thomas Gleixner
2017-02-11 12:17       ` Jessica Frazelle
2017-02-11 12:17         ` [kernel-hardening] " Jessica Frazelle

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=DM5PR03MB2490F0970E353CACB9D201F5A0460@DM5PR03MB2490.namprd03.prod.outlook.com \
    --to=kys@microsoft.com \
    --cc=bhelgaas@google.com \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=keith.busch@intel.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=me@jessfraz.com \
    --cc=sthemmin@microsoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.