[SRU][Xenial][PATCH 0/4] Xenial: Sync to upstream v4.9 (LP: #1820872)

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

[SRU][Xenial][PATCH 0/4] Xenial: Sync to upstream v4.9 (LP: #1820872)

Juerg Haefliger
BugLink: https://bugs.launchpad.net/bugs/1820872

== SRU Justification ==

Reduce the delta between Xenial 4.4 and upstream stable 4.9 in the Spectre-related areas.

== Regression Potential ==

Low. These are cosmetic cleanups (non-functional changes) and backports of low-risk commits that have been in upstream stable for quite a while already.

== Fix ==

Backport the relevant commits.

== Test Case ==

TBD.

Signed-off-by: Juerg Haefliger <[hidden email]>


Greg Kroah-Hartman (1):
  Revert "module: Add retpoline tag to VERMAGIC"

Juerg Haefliger (3):
  UBUNTU: SAUCE: cpu/hotplug: Fix Documentation/kernel-parameters.txt
  UBUNTU: SAUCE: Fix typo in Documentation/kernel-parameters.txt
  UBUNTU: SAUCE: x86: Move hunks and sync to upstream stable 4.9

 Documentation/kernel-parameters.txt  | 4 ++--
 arch/x86/include/asm/nospec-branch.h | 7 ++++---
 arch/x86/kernel/cpu/amd.c            | 4 +---
 arch/x86/kernel/cpu/bugs.c           | 3 +--
 include/linux/vermagic.h             | 8 +-------
 5 files changed, 9 insertions(+), 17 deletions(-)

--
2.19.1


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

[SRU][Xenial][PATCH 1/4] UBUNTU: SAUCE: cpu/hotplug: Fix Documentation/kernel-parameters.txt

Juerg Haefliger
BugLink: https://bugs.launchpad.net/bugs/1820872

Add 'nosmt' which was omitted in the original backport.

Fixes: df8ddbcb30b2 ("cpu/hotplug: Provide knobs to control SMT")
Signed-off-by: Juerg Haefliger <[hidden email]>
---
 Documentation/kernel-parameters.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e4ed78be15f8..14bd3bcf0707 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2544,7 +2544,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
  nohugeiomap [KNL,x86] Disable kernel huge I/O mappings.
 
- [KNL,x86] Disable symmetric multithreading (SMT).
+ nosmt [KNL,x86] Disable symmetric multithreading (SMT).
  nosmt=force: Force disable SMT, cannot be undone
      via the sysfs control file.
 
--
2.19.1


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

[SRU][Xenial][PATCH 2/4] UBUNTU: SAUCE: Fix typo in Documentation/kernel-parameters.txt

Juerg Haefliger
In reply to this post by Juerg Haefliger
BugLink: https://bugs.launchpad.net/bugs/1820872

Fixes: bb807b8430bc ("UBUNTU: SAUCE: x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation")
Signed-off-by: Juerg Haefliger <[hidden email]>
---
 Documentation/kernel-parameters.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 14bd3bcf0707..1ad86a8d68b8 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -3727,7 +3727,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
  spec_store_bypass_disable=
  [HW] Control Speculative Store Bypass (SSB) Disable mitigation
- (Seculative Store Bypass vulnerability)
+ (Speculative Store Bypass vulnerability)
 
  Certain CPUs are vulnerable to an exploit against a
  a common industry wide performance optimization known
--
2.19.1


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

[SRU][Xenial][PATCH 3/4] UBUNTU: SAUCE: x86: Move hunks and sync to upstream stable 4.9

Juerg Haefliger
In reply to this post by Juerg Haefliger
BugLink: https://bugs.launchpad.net/bugs/1820872

Trivial changes to reduce the delta between Xenial 4.4 and upstream
stable 4.9 so that future cherry-picking results in fewer conflicts.

Signed-off-by: Juerg Haefliger <[hidden email]>
---
 arch/x86/include/asm/nospec-branch.h | 7 ++++---
 arch/x86/kernel/cpu/amd.c            | 4 +---
 arch/x86/kernel/cpu/bugs.c           | 3 +--
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index a6120d43caa7..46eb80b1b57b 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -202,9 +202,6 @@ enum spectre_v2_mitigation {
  SPECTRE_V2_IBRS_ENHANCED,
 };
 
-/* The Intel SPEC CTRL MSR base value cache */
-extern u64 x86_spec_ctrl_base;
-
 /* The Speculative Store Bypass disable variants */
 enum ssb_mitigation {
  SPEC_STORE_BYPASS_NONE,
@@ -256,6 +253,9 @@ static inline void indirect_branch_prediction_barrier(void)
       X86_FEATURE_USE_IBPB);
 }
 
+/* The Intel SPEC CTRL MSR base value cache */
+extern u64 x86_spec_ctrl_base;
+
 /*
  * With retpoline, we must use IBRS to restrict branch prediction
  * before calling into firmware.
@@ -265,6 +265,7 @@ static inline void indirect_branch_prediction_barrier(void)
 #define firmware_restrict_branch_speculation_start() \
 do { \
  u64 val = x86_spec_ctrl_base | SPEC_CTRL_IBRS; \
+ \
  preempt_disable(); \
  alternative_msr_write(MSR_IA32_SPEC_CTRL, val, \
       X86_FEATURE_USE_IBRS_FW); \
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 081732f8a598..b3f68f9500cc 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -296,10 +296,8 @@ static int nearby_node(int apicid)
 
 static void amd_get_topology_early(struct cpuinfo_x86 *c)
 {
-#ifdef CONFIG_SMP
- if (boot_cpu_has(X86_FEATURE_TOPOEXT))
+ if (cpu_has(c, X86_FEATURE_TOPOEXT))
  smp_num_siblings = ((cpuid_ebx(0x8000001e) >> 8) & 0x3) + 1;
-#endif
 }
 
 /*
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 63d5b84e680b..4759c11b2380 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -396,7 +396,7 @@ retpoline_auto:
  if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
  retpoline_amd:
  if (!boot_cpu_has(X86_FEATURE_LFENCE_RDTSC)) {
- pr_err("Spectre mitigation: LFENCE not serializing. Switching to generic retpoline\n");
+ pr_err("Spectre mitigation: LFENCE not serializing, switching to generic retpoline\n");
  goto retpoline_generic;
  }
  mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_AMD :
@@ -860,7 +860,6 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr
 
  case X86_BUG_SPECTRE_V1:
  return sprintf(buf, "Mitigation: __user pointer sanitization\n");
- break;
 
  case X86_BUG_SPECTRE_V2:
  return sprintf(buf, "%s%s%s%s%s\n", spectre_v2_strings[spectre_v2_enabled],
--
2.19.1


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

[SRU][Xenial][PATCH 4/4] Revert "module: Add retpoline tag to VERMAGIC"

Juerg Haefliger
In reply to this post by Juerg Haefliger
From: Greg Kroah-Hartman <[hidden email]>

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

This reverts commit 6cfb521ac0d5b97470883ff9b7facae264b7ab12.

Turns out distros do not want to make retpoline as part of their "ABI",
so this patch should not have been merged.  Sorry Andi, this was my
fault, I suggested it when your original patch was the "correct" way of
doing this instead.

Reported-by: Jiri Kosina <[hidden email]>
Fixes: 6cfb521ac0d5 ("module: Add retpoline tag to VERMAGIC")
Acked-by: Andi Kleen <[hidden email]>
Cc: Thomas Gleixner <[hidden email]>
Cc: David Woodhouse <[hidden email]>
Cc: [hidden email]
Cc: [hidden email]
Cc: [hidden email]
Cc: stable <[hidden email]>
Signed-off-by: Greg Kroah-Hartman <[hidden email]>
Signed-off-by: Linus Torvalds <[hidden email]>

(backported from commit 5132ede0fe8092b043dae09a7cc32b8ae7272baa)
[juergh: Adjusted context.]
Signed-off-by: Juerg Haefliger <[hidden email]>
---
 include/linux/vermagic.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
index a3d04934aa96..6f8fbcf10dfb 100644
--- a/include/linux/vermagic.h
+++ b/include/linux/vermagic.h
@@ -24,16 +24,10 @@
 #ifndef MODULE_ARCH_VERMAGIC
 #define MODULE_ARCH_VERMAGIC ""
 #endif
-#ifdef RETPOLINE
-#define MODULE_VERMAGIC_RETPOLINE "retpoline "
-#else
-#define MODULE_VERMAGIC_RETPOLINE ""
-#endif
 
 #define VERMAGIC_STRING \
  UTS_RELEASE " " \
  MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
  MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
- MODULE_ARCH_VERMAGIC \
- MODULE_VERMAGIC_RETPOLINE
+ MODULE_ARCH_VERMAGIC
 
--
2.19.1


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

ACK: [SRU][Xenial][PATCH 0/4] Xenial: Sync to upstream v4.9 (LP: #1820872)

Kleber Souza
In reply to this post by Juerg Haefliger
On 4/1/19 3:29 PM, Juerg Haefliger wrote:

> BugLink: https://bugs.launchpad.net/bugs/1820872
>
> == SRU Justification ==
>
> Reduce the delta between Xenial 4.4 and upstream stable 4.9 in the Spectre-related areas.
>
> == Regression Potential ==
>
> Low. These are cosmetic cleanups (non-functional changes) and backports of low-risk commits that have been in upstream stable for quite a while already.
>
> == Fix ==
>
> Backport the relevant commits.
>
> == Test Case ==
>
> TBD.
>
> Signed-off-by: Juerg Haefliger <[hidden email]>
>
>
> Greg Kroah-Hartman (1):
>   Revert "module: Add retpoline tag to VERMAGIC"
>
> Juerg Haefliger (3):
>   UBUNTU: SAUCE: cpu/hotplug: Fix Documentation/kernel-parameters.txt
>   UBUNTU: SAUCE: Fix typo in Documentation/kernel-parameters.txt
>   UBUNTU: SAUCE: x86: Move hunks and sync to upstream stable 4.9
>
>  Documentation/kernel-parameters.txt  | 4 ++--
>  arch/x86/include/asm/nospec-branch.h | 7 ++++---
>  arch/x86/kernel/cpu/amd.c            | 4 +---
>  arch/x86/kernel/cpu/bugs.c           | 3 +--
>  include/linux/vermagic.h             | 8 +-------
>  5 files changed, 9 insertions(+), 17 deletions(-)
>

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

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

ACK: [SRU][Xenial][PATCH 0/4] Xenial: Sync to upstream v4.9 (LP: #1820872)

Stefan Bader-2
In reply to this post by Juerg Haefliger
On 01.04.19 15:29, Juerg Haefliger wrote:

> BugLink: https://bugs.launchpad.net/bugs/1820872
>
> == SRU Justification ==
>
> Reduce the delta between Xenial 4.4 and upstream stable 4.9 in the Spectre-related areas.
>
> == Regression Potential ==
>
> Low. These are cosmetic cleanups (non-functional changes) and backports of low-risk commits that have been in upstream stable for quite a while already.
>
> == Fix ==
>
> Backport the relevant commits.
>
> == Test Case ==
>
> TBD.
>
> Signed-off-by: Juerg Haefliger <[hidden email]>
>
>
> Greg Kroah-Hartman (1):
>   Revert "module: Add retpoline tag to VERMAGIC"
>
> Juerg Haefliger (3):
>   UBUNTU: SAUCE: cpu/hotplug: Fix Documentation/kernel-parameters.txt
>   UBUNTU: SAUCE: Fix typo in Documentation/kernel-parameters.txt
>   UBUNTU: SAUCE: x86: Move hunks and sync to upstream stable 4.9
>
>  Documentation/kernel-parameters.txt  | 4 ++--
>  arch/x86/include/asm/nospec-branch.h | 7 ++++---
>  arch/x86/kernel/cpu/amd.c            | 4 +---
>  arch/x86/kernel/cpu/bugs.c           | 3 +--
>  include/linux/vermagic.h             | 8 +-------
>  5 files changed, 9 insertions(+), 17 deletions(-)
>
Acked-by: Stefan Bader <[hidden email]>


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

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

APPLIED: [SRU][Xenial][PATCH 0/4] Xenial: Sync to upstream v4.9 (LP: #1820872)

Kleber Souza
In reply to this post by Juerg Haefliger
On 4/1/19 3:29 PM, Juerg Haefliger wrote:

> BugLink: https://bugs.launchpad.net/bugs/1820872
>
> == SRU Justification ==
>
> Reduce the delta between Xenial 4.4 and upstream stable 4.9 in the Spectre-related areas.
>
> == Regression Potential ==
>
> Low. These are cosmetic cleanups (non-functional changes) and backports of low-risk commits that have been in upstream stable for quite a while already.
>
> == Fix ==
>
> Backport the relevant commits.
>
> == Test Case ==
>
> TBD.
>
> Signed-off-by: Juerg Haefliger <[hidden email]>
>
>
> Greg Kroah-Hartman (1):
>   Revert "module: Add retpoline tag to VERMAGIC"
>
> Juerg Haefliger (3):
>   UBUNTU: SAUCE: cpu/hotplug: Fix Documentation/kernel-parameters.txt
>   UBUNTU: SAUCE: Fix typo in Documentation/kernel-parameters.txt
>   UBUNTU: SAUCE: x86: Move hunks and sync to upstream stable 4.9
>
>  Documentation/kernel-parameters.txt  | 4 ++--
>  arch/x86/include/asm/nospec-branch.h | 7 ++++---
>  arch/x86/kernel/cpu/amd.c            | 4 +---
>  arch/x86/kernel/cpu/bugs.c           | 3 +--
>  include/linux/vermagic.h             | 8 +-------
>  5 files changed, 9 insertions(+), 17 deletions(-)
>

Applied to xenial/master-next branch.

Thanks,
Kleber

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