[SRU][Bionic][PATCH 0/1] x86/EISA: Don't probe EISA bus for Xen PV guests

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 0/1] x86/EISA: Don't probe EISA bus for Xen PV guests

Joseph Salisbury-3
BugLink: https://bugs.launchpad.net/bugs/1789118

== SRU Justification ==
After an upgrade to Bionic, the bug reporter states the 32-bit kernel
does not boot under Xen PV mode.  This bug does not affect 64-bit
kernels and if fixed by mainline commit 6a92b11169a6.

== Fix ==
6a92b11169a6 ("x86/EISA: Don't probe EISA bus for Xen PV guests")

== Regression Potential ==
Low.  This commit only affects x86 kernels.  This commit has also been cc'd to upstream stable, so it has had
additional upstream review.

== Test Case ==
A test kernel was built with this patch and tested by the original bug reporter.
The bug reporter states the test kernel resolved the bug.

Boris Ostrovsky (1):
  x86/EISA: Don't probe EISA bus for Xen PV guests

 arch/x86/kernel/eisa.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 1/1] x86/EISA: Don't probe EISA bus for Xen PV guests

Joseph Salisbury-3
From: Boris Ostrovsky <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1789118

For unprivileged Xen PV guests this is normal memory and ioremap will
not be able to properly map it.

While at it, since ioremap may return NULL, add a test for pointer's
validity.

Reported-by: Andy Smith <[hidden email]>
Signed-off-by: Boris Ostrovsky <[hidden email]>
Signed-off-by: Thomas Gleixner <[hidden email]>
Cc: [hidden email]
Cc: [hidden email]
Cc: [hidden email]
Cc: [hidden email]
Link: https://lkml.kernel.org/r/20180911195538.23289-1-boris.ostrovsky@...

(cherry picked from commit 6a92b11169a65b3f8cc512c75a252cbd0d096ba0)
Signed-off-by: Joseph Salisbury <[hidden email]>
---
 arch/x86/kernel/eisa.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/eisa.c b/arch/x86/kernel/eisa.c
index f260e45..e8c8c5d 100644
--- a/arch/x86/kernel/eisa.c
+++ b/arch/x86/kernel/eisa.c
@@ -7,11 +7,17 @@
 #include <linux/eisa.h>
 #include <linux/io.h>
 
+#include <xen/xen.h>
+
 static __init int eisa_bus_probe(void)
 {
- void __iomem *p = ioremap(0x0FFFD9, 4);
+ void __iomem *p;
+
+ if (xen_pv_domain() && !xen_initial_domain())
+ return 0;
 
- if (readl(p) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24))
+ p = ioremap(0x0FFFD9, 4);
+ if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
  EISA_bus = 1;
  iounmap(p);
  return 0;
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [SRU][Bionic][Cosmic][PATCH 0/1] x86/EISA: Don't probe EISA bus for Xen PV guests

Joseph Salisbury-3
In reply to this post by Joseph Salisbury-3
Commit 6a92b11169a6 is also needed in cosmic.  The commit is in mainline
as of v4.19-rc4 and has been cc'd to stable.  However, it has not landed
in cosmic as of yet.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 1/1] x86/EISA: Don't probe EISA bus for Xen PV guests

Stefan Bader-2
In reply to this post by Joseph Salisbury-3
On 20.09.2018 12:20, Joseph Salisbury wrote:

> From: Boris Ostrovsky <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1789118
>
> For unprivileged Xen PV guests this is normal memory and ioremap will
> not be able to properly map it.
>
> While at it, since ioremap may return NULL, add a test for pointer's
> validity.
>
> Reported-by: Andy Smith <[hidden email]>
> Signed-off-by: Boris Ostrovsky <[hidden email]>
> Signed-off-by: Thomas Gleixner <[hidden email]>
> Cc: [hidden email]
> Cc: [hidden email]
> Cc: [hidden email]
> Cc: [hidden email]
> Link: https://lkml.kernel.org/r/20180911195538.23289-1-boris.ostrovsky@...
>
> (cherry picked from commit 6a92b11169a65b3f8cc512c75a252cbd0d096ba0)
> Signed-off-by: Joseph Salisbury <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  arch/x86/kernel/eisa.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/eisa.c b/arch/x86/kernel/eisa.c
> index f260e45..e8c8c5d 100644
> --- a/arch/x86/kernel/eisa.c
> +++ b/arch/x86/kernel/eisa.c
> @@ -7,11 +7,17 @@
>  #include <linux/eisa.h>
>  #include <linux/io.h>
>  
> +#include <xen/xen.h>
> +
>  static __init int eisa_bus_probe(void)
>  {
> - void __iomem *p = ioremap(0x0FFFD9, 4);
> + void __iomem *p;
> +
> + if (xen_pv_domain() && !xen_initial_domain())
> + return 0;
>  
> - if (readl(p) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24))
> + p = ioremap(0x0FFFD9, 4);
> + if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
>   EISA_bus = 1;
>   iounmap(p);
>   return 0;
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 1/1] x86/EISA: Don't probe EISA bus for Xen PV guests

Kleber Souza
In reply to this post by Joseph Salisbury-3
On 09/20/18 12:20, Joseph Salisbury wrote:

> From: Boris Ostrovsky <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1789118
>
> For unprivileged Xen PV guests this is normal memory and ioremap will
> not be able to properly map it.
>
> While at it, since ioremap may return NULL, add a test for pointer's
> validity.
>
> Reported-by: Andy Smith <[hidden email]>
> Signed-off-by: Boris Ostrovsky <[hidden email]>
> Signed-off-by: Thomas Gleixner <[hidden email]>
> Cc: [hidden email]
> Cc: [hidden email]
> Cc: [hidden email]
> Cc: [hidden email]
> Link: https://lkml.kernel.org/r/20180911195538.23289-1-boris.ostrovsky@...
>
> (cherry picked from commit 6a92b11169a65b3f8cc512c75a252cbd0d096ba0)
> Signed-off-by: Joseph Salisbury <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  arch/x86/kernel/eisa.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/eisa.c b/arch/x86/kernel/eisa.c
> index f260e45..e8c8c5d 100644
> --- a/arch/x86/kernel/eisa.c
> +++ b/arch/x86/kernel/eisa.c
> @@ -7,11 +7,17 @@
>  #include <linux/eisa.h>
>  #include <linux/io.h>
>  
> +#include <xen/xen.h>
> +
>  static __init int eisa_bus_probe(void)
>  {
> - void __iomem *p = ioremap(0x0FFFD9, 4);
> + void __iomem *p;
> +
> + if (xen_pv_domain() && !xen_initial_domain())
> + return 0;
>  
> - if (readl(p) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24))
> + p = ioremap(0x0FFFD9, 4);
> + if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
>   EISA_bus = 1;
>   iounmap(p);
>   return 0;
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[B]: [SRU][Bionic][PATCH 0/1] x86/EISA: Don't probe EISA bus for Xen PV guests

Stefan Bader-2
In reply to this post by Joseph Salisbury-3
On 20.09.2018 12:20, Joseph Salisbury wrote:

> BugLink: https://bugs.launchpad.net/bugs/1789118
>
> == SRU Justification ==
> After an upgrade to Bionic, the bug reporter states the 32-bit kernel
> does not boot under Xen PV mode.  This bug does not affect 64-bit
> kernels and if fixed by mainline commit 6a92b11169a6.
>
> == Fix ==
> 6a92b11169a6 ("x86/EISA: Don't probe EISA bus for Xen PV guests")
>
> == Regression Potential ==
> Low.  This commit only affects x86 kernels.  This commit has also been cc'd to upstream stable, so it has had
> additional upstream review.
>
> == Test Case ==
> A test kernel was built with this patch and tested by the original bug reporter.
> The bug reporter states the test kernel resolved the bug.
>
> Boris Ostrovsky (1):
>   x86/EISA: Don't probe EISA bus for Xen PV guests
>
>  arch/x86/kernel/eisa.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
Applied to bionic/master-next. Thanks.

Also needed in Cosmic (mentioned in follow-up) which might be easy to miss.

-Stefan


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: APPLIED[B]: [SRU][Bionic][PATCH 0/1] x86/EISA: Don't probe EISA bus for Xen PV guests

Seth Forshee
On Mon, Oct 01, 2018 at 05:32:09PM +0200, Stefan Bader wrote:

> On 20.09.2018 12:20, Joseph Salisbury wrote:
> > BugLink: https://bugs.launchpad.net/bugs/1789118
> >
> > == SRU Justification ==
> > After an upgrade to Bionic, the bug reporter states the 32-bit kernel
> > does not boot under Xen PV mode.  This bug does not affect 64-bit
> > kernels and if fixed by mainline commit 6a92b11169a6.
> >
> > == Fix ==
> > 6a92b11169a6 ("x86/EISA: Don't probe EISA bus for Xen PV guests")
> >
> > == Regression Potential ==
> > Low.  This commit only affects x86 kernels.  This commit has also been cc'd to upstream stable, so it has had
> > additional upstream review.
> >
> > == Test Case ==
> > A test kernel was built with this patch and tested by the original bug reporter.
> > The bug reporter states the test kernel resolved the bug.
> >
> > Boris Ostrovsky (1):
> >   x86/EISA: Don't probe EISA bus for Xen PV guests
> >
> >  arch/x86/kernel/eisa.c | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> >
> Applied to bionic/master-next. Thanks.
>
> Also needed in Cosmic (mentioned in follow-up) which might be easy to miss.

Cosmic already got this from upstream stable.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[C]: [SRU][Bionic][Cosmic][PATCH 0/1] x86/EISA: Don't probe EISA bus for Xen PV guests

Thadeu Lima de Souza Cascardo-3
In reply to this post by Joseph Salisbury-3
Already applied to cosmic as part of 4.18.10.

Thanks.
Cascardo.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team