linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [git pull] x86 fix
@ 2008-04-26 19:47 Ingo Molnar
  2008-04-26 20:15 ` Harvey Harrison
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2008-04-26 19:47 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Venki Pallipadi


Linus, please pull this x86 fix from:

   git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes2.git for-linus

Thanks,

	Ingo

------------------>
Venki Pallipadi (1):
      x86, PAT: disable /dev/mem mmap RAM with PAT

 arch/x86/mm/pat.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 9851265..e7ca7fc 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -16,6 +16,7 @@
 #include <asm/msr.h>
 #include <asm/tlbflush.h>
 #include <asm/processor.h>
+#include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/pat.h>
 #include <asm/e820.h>
@@ -477,6 +478,33 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
 	return vma_prot;
 }
 
+#ifdef CONFIG_NONPROMISC_DEVMEM
+/* This check is done in drivers/char/mem.c in case of NONPROMISC_DEVMEM*/
+static inline int range_is_allowed(unsigned long pfn, unsigned long size)
+{
+	return 1;
+}
+#else
+static inline int range_is_allowed(unsigned long pfn, unsigned long size)
+{
+	u64 from = ((u64)pfn) << PAGE_SHIFT;
+	u64 to = from + size;
+	u64 cursor = from;
+
+	while (cursor < to) {
+		if (!devmem_is_allowed(pfn)) {
+			printk(KERN_INFO
+		"Program %s tried to access /dev/mem between %Lx->%Lx.\n",
+				current->comm, from, to);
+			return 0;
+		}
+		cursor += PAGE_SIZE;
+		pfn++;
+	}
+	return 1;
+}
+#endif /* CONFIG_NONPROMISC_DEVMEM */
+
 int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
 				unsigned long size, pgprot_t *vma_prot)
 {
@@ -485,6 +513,9 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
 	unsigned long ret_flags;
 	int retval;
 
+	if (!range_is_allowed(pfn, size))
+		return 0;
+
 	if (file->f_flags & O_SYNC) {
 		flags = _PAGE_CACHE_UC;
 	}

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [git pull] x86 fix
  2008-04-26 19:47 Ingo Molnar
@ 2008-04-26 20:15 ` Harvey Harrison
  0 siblings, 0 replies; 79+ messages in thread
From: Harvey Harrison @ 2008-04-26 20:15 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linus Torvalds, linux-kernel, Venki Pallipadi

On Sat, 2008-04-26 at 21:47 +0200, Ingo Molnar wrote:
> Linus, please pull this x86 fix from:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes2.git for-linus
> 
> Thanks,
> 
> 	Ingo
> 
> ------------------>
> Venki Pallipadi (1):
>       x86, PAT: disable /dev/mem mmap RAM with PAT
> 
>  arch/x86/mm/pat.c |   31 +++++++++++++++++++++++++++++++
>  1 files changed, 31 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
> index 9851265..e7ca7fc 100644
> --- a/arch/x86/mm/pat.c
> +++ b/arch/x86/mm/pat.c
> @@ -16,6 +16,7 @@
>  #include <asm/msr.h>
>  #include <asm/tlbflush.h>
>  #include <asm/processor.h>
> +#include <asm/page.h>
>  #include <asm/pgtable.h>
>  #include <asm/pat.h>
>  #include <asm/e820.h>
> @@ -477,6 +478,33 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
>  	return vma_prot;
>  }
>  
> +#ifdef CONFIG_NONPROMISC_DEVMEM
> +/* This check is done in drivers/char/mem.c in case of NONPROMISC_DEVMEM*/
> +static inline int range_is_allowed(unsigned long pfn, unsigned long size)
> +{
> +	return 1;
> +}
> +#else
> +static inline int range_is_allowed(unsigned long pfn, unsigned long size)

inline?  Seems a bit big to me.

> +{
> +	u64 from = ((u64)pfn) << PAGE_SHIFT;
> +	u64 to = from + size;
> +	u64 cursor = from;
> +
> +	while (cursor < to) {
> +		if (!devmem_is_allowed(pfn)) {
> +			printk(KERN_INFO
> +		"Program %s tried to access /dev/mem between %Lx->%Lx.\n",
> +				current->comm, from, to);
> +			return 0;
> +		}
> +		cursor += PAGE_SIZE;
> +		pfn++;
> +	}
> +	return 1;
> +}
> +#endif /* CONFIG_NONPROMISC_DEVMEM */
> +

Cheers,

Harvey


^ permalink raw reply	[flat|nested] 79+ messages in thread

* [git pull] x86 fix
@ 2008-07-01 19:57 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2008-07-01 19:57 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Andrew Morton, Thomas Gleixner, H. Peter Anvin

Linus,

Please pull the latest x86 fixes git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

This should be the last x86 one for v2.6.26 AFAICS.

Thanks,

	Ingo

------------------>
Thomas Gleixner (1):
      x86: fix NODES_SHIFT Kconfig range

 arch/x86/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 52e18e6..8a07f41 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -961,8 +961,8 @@ config NUMA_EMU
 	  number of nodes. This is only useful for debugging.
 
 config NODES_SHIFT
-	int "Max num nodes shift(1-15)"
-	range 1 15  if X86_64
+	int "Max num nodes shift(1-9)"
+	range 1 9  if X86_64
 	default "6" if X86_64
 	default "4" if X86_NUMAQ
 	default "3"

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [git pull] x86 fix
@ 2008-10-04 14:55 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2008-10-04 14:55 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Andrew Morton, Thomas Gleixner, H. Peter Anvin

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
H. Peter Anvin (1):
      x86 setup: correct segfault in generation of 32-bit reloc kernel


 arch/x86/boot/compressed/relocs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c
index a1310c5..857e492 100644
--- a/arch/x86/boot/compressed/relocs.c
+++ b/arch/x86/boot/compressed/relocs.c
@@ -492,7 +492,7 @@ static void walk_relocs(void (*visit)(Elf32_Rel *rel, Elf32_Sym *sym))
 			continue;
 		}
 		sh_symtab = sec_symtab->symtab;
-		sym_strtab = sec->link->strtab;
+		sym_strtab = sec_symtab->link->strtab;
 		for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Rel); j++) {
 			Elf32_Rel *rel;
 			Elf32_Sym *sym;

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [git pull] x86 fix
@ 2008-11-07 16:30 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2008-11-07 16:30 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Andrew Morton, Thomas Gleixner, H. Peter Anvin

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
Jeremy Fitzhardinge (1):
      x86, xen: fix use of pgd_page now that it really does return a page


 arch/x86/xen/mmu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index aba77b2..49697d8 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -874,7 +874,7 @@ static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd)
 #else /* CONFIG_X86_32 */
 #ifdef CONFIG_X86_PAE
 	/* Need to make sure unshared kernel PMD is pinnable */
-	xen_pin_page(mm, virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])),
+	xen_pin_page(mm, pgd_page(pgd[pgd_index(TASK_SIZE)]),
 		     PT_PMD);
 #endif
 	xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd)));
@@ -991,7 +991,7 @@ static void __xen_pgd_unpin(struct mm_struct *mm, pgd_t *pgd)
 
 #ifdef CONFIG_X86_PAE
 	/* Need to make sure unshared kernel PMD is unpinned */
-	xen_unpin_page(mm, virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])),
+	xen_unpin_page(mm, pgd_page(pgd[pgd_index(TASK_SIZE)]),
 		       PT_PMD);
 #endif
 

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [git pull] x86 fix
@ 2009-01-13  1:17 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2009-01-13  1:17 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Andrew Morton, Thomas Gleixner, H. Peter Anvin

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
Ingo Molnar (1):
      Revert "i386: add TRACE_IRQS_OFF for the nmi"


 arch/x86/kernel/entry_32.S |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index d6f0490..4646902 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1203,7 +1203,6 @@ nmi_stack_correct:
 	pushl %eax
 	CFI_ADJUST_CFA_OFFSET 4
 	SAVE_ALL
-	TRACE_IRQS_OFF
 	xorl %edx,%edx		# zero error code
 	movl %esp,%eax		# pt_regs pointer
 	call do_nmi
@@ -1244,7 +1243,6 @@ nmi_espfix_stack:
 	pushl %eax
 	CFI_ADJUST_CFA_OFFSET 4
 	SAVE_ALL
-	TRACE_IRQS_OFF
 	FIXUP_ESPFIX_STACK		# %eax == %esp
 	xorl %edx,%edx			# zero error code
 	call do_nmi

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [git pull] x86 fix
  2009-02-28 13:02 i915 needs pgprot_writecombine() and is_io_mapping_posible() Theodore Ts'o
@ 2009-02-28 13:34 ` Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2009-02-28 13:34 UTC (permalink / raw)
  To: Theodore Ts'o, Linus Torvalds; +Cc: Dave Airlie, Linux Kernel Mailing List


* Theodore Ts'o <tytso@mit.edu> wrote:

> A recent (probably within the last week) commit seems to have caused
> the i915 driver to need to use two unexported symbols:
> 
> ERROR: "pgprot_writecombine" [drivers/gpu/drm/i915/i915.ko] undefined!
> ERROR: "is_io_mapping_possible" [drivers/gpu/drm/i915/i915.ko] undefined!
> 
> Is the right fix just to export them?  

Yeah. This module build bug got masked by two other PAT patches 
which needed different exports:

 13093cb: gpu/drm, x86, PAT: PAT support for io_mapping_*, export symbols for modules

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
Ingo Molnar (1):
      x86: i915 needs pgprot_writecombine() and is_io_mapping_possible()


 arch/x86/mm/iomap_32.c |   15 ++++-----------
 arch/x86/mm/pat.c      |    2 ++
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
index 6c2b1af..04102d4 100644
--- a/arch/x86/mm/iomap_32.c
+++ b/arch/x86/mm/iomap_32.c
@@ -20,23 +20,16 @@
 #include <asm/pat.h>
 #include <linux/module.h>
 
-#ifdef CONFIG_X86_PAE
-int
-is_io_mapping_possible(resource_size_t base, unsigned long size)
-{
-	return 1;
-}
-#else
-int
-is_io_mapping_possible(resource_size_t base, unsigned long size)
+int is_io_mapping_possible(resource_size_t base, unsigned long size)
 {
+#ifndef CONFIG_X86_PAE
 	/* There is no way to map greater than 1 << 32 address without PAE */
 	if (base + size > 0x100000000ULL)
 		return 0;
-
+#endif
 	return 1;
 }
-#endif
+EXPORT_SYMBOL_GPL(is_io_mapping_possible);
 
 /* Map 'pfn' using fixed map 'type' and protections 'prot'
  */
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index aebbf67..e0ab173 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -11,6 +11,7 @@
 #include <linux/bootmem.h>
 #include <linux/debugfs.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/gfp.h>
 #include <linux/mm.h>
 #include <linux/fs.h>
@@ -868,6 +869,7 @@ pgprot_t pgprot_writecombine(pgprot_t prot)
 	else
 		return pgprot_noncached(prot);
 }
+EXPORT_SYMBOL_GPL(pgprot_writecombine);
 
 #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT)
 

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [git pull] x86 fix
@ 2009-03-10 18:25 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2009-03-10 18:25 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Andrew Morton, H. Peter Anvin, Thomas Gleixner

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
Stuart Bennett (1):
      x86 mmiotrace: fix remove_kmmio_fault_pages()


 arch/x86/mm/kmmio.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index 9f20503..6a518dd 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -451,23 +451,24 @@ static void rcu_free_kmmio_fault_pages(struct rcu_head *head)
 
 static void remove_kmmio_fault_pages(struct rcu_head *head)
 {
-	struct kmmio_delayed_release *dr = container_of(
-						head,
-						struct kmmio_delayed_release,
-						rcu);
+	struct kmmio_delayed_release *dr =
+		container_of(head, struct kmmio_delayed_release, rcu);
 	struct kmmio_fault_page *p = dr->release_list;
 	struct kmmio_fault_page **prevp = &dr->release_list;
 	unsigned long flags;
+
 	spin_lock_irqsave(&kmmio_lock, flags);
 	while (p) {
-		if (!p->count)
+		if (!p->count) {
 			list_del_rcu(&p->list);
-		else
+			prevp = &p->release_next;
+		} else {
 			*prevp = p->release_next;
-		prevp = &p->release_next;
+		}
 		p = p->release_next;
 	}
 	spin_unlock_irqrestore(&kmmio_lock, flags);
+
 	/* This is the real RCU destroy call. */
 	call_rcu(&dr->rcu, rcu_free_kmmio_fault_pages);
 }

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2009-06-29  8:36 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2009-06-29  8:36 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

This reverts a commit that caused a regression.

 Thanks,

	Ingo

------------------>
H. Peter Anvin (1):
      Revert "x86: cap iomem_resource to addressable physical memory"


 arch/x86/kernel/cpu/common.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 6b26d4d..f1961c0 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -848,9 +848,6 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
 	numa_add_cpu(smp_processor_id());
 #endif
-
-	/* Cap the iomem address space to what is addressable on all CPUs */
-	iomem_resource.end &= (1ULL << c->x86_phys_bits) - 1;
 }
 
 #ifdef CONFIG_X86_64

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2009-08-10 18:08 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2009-08-10 18:08 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
Linus Torvalds (1):
      x86: Fix serialization in pit_expect_msb()


 arch/x86/kernel/tsc.c |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 6e1a368..71f4368 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -275,15 +275,20 @@ static unsigned long pit_calibrate_tsc(u32 latch, unsigned long ms, int loopmin)
  * use the TSC value at the transitions to calculate a pretty
  * good value for the TSC frequencty.
  */
+static inline int pit_verify_msb(unsigned char val)
+{
+	/* Ignore LSB */
+	inb(0x42);
+	return inb(0x42) == val;
+}
+
 static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap)
 {
 	int count;
 	u64 tsc = 0;
 
 	for (count = 0; count < 50000; count++) {
-		/* Ignore LSB */
-		inb(0x42);
-		if (inb(0x42) != val)
+		if (!pit_verify_msb(val))
 			break;
 		tsc = get_cycles();
 	}
@@ -336,8 +341,7 @@ static unsigned long quick_pit_calibrate(void)
 	 * to do that is to just read back the 16-bit counter
 	 * once from the PIT.
 	 */
-	inb(0x42);
-	inb(0x42);
+	pit_verify_msb(0);
 
 	if (pit_expect_msb(0xff, &tsc, &d1)) {
 		for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) {
@@ -348,8 +352,19 @@ static unsigned long quick_pit_calibrate(void)
 			 * Iterate until the error is less than 500 ppm
 			 */
 			delta -= tsc;
-			if (d1+d2 < delta >> 11)
-				goto success;
+			if (d1+d2 >= delta >> 11)
+				continue;
+
+			/*
+			 * Check the PIT one more time to verify that
+			 * all TSC reads were stable wrt the PIT.
+			 *
+			 * This also guarantees serialization of the
+			 * last cycle read ('d2') in pit_expect_msb.
+			 */
+			if (!pit_verify_msb(0xfe - i))
+				break;
+			goto success;
 		}
 	}
 	printk("Fast TSC calibration failed\n");

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2009-09-27  8:02 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2009-09-27  8:02 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus


out-of-topic modifications in x86-fixes-for-linus:
--------------------------------------------------
mm/Kconfig                         # d949f36: x86: Fix hwpoison code related bu

 Thanks,

	Ingo

------------------>
Linus Torvalds (1):
      x86: Fix hwpoison code related build failure on 32-bit NUMAQ


 arch/x86/Kconfig |   11 +++++++++++
 mm/Kconfig       |    4 +++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 9369879..8da9374 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -432,6 +432,17 @@ config X86_NUMAQ
 	  of Flat Logical.  You will need a new lynxer.elf file to flash your
 	  firmware with - send email to <Martin.Bligh@us.ibm.com>.
 
+config X86_SUPPORTS_MEMORY_FAILURE
+	bool
+	# MCE code calls memory_failure():
+	depends on X86_MCE
+	# On 32-bit this adds too big of NODES_SHIFT and we run out of page flags:
+	depends on !X86_NUMAQ
+	# On 32-bit SPARSEMEM adds too big of SECTIONS_WIDTH:
+	depends on X86_64 || !SPARSEMEM
+	select ARCH_SUPPORTS_MEMORY_FAILURE
+	default y
+
 config X86_VISWS
 	bool "SGI 320/540 (Visual Workstation)"
 	depends on X86_32 && PCI && X86_MPPARSE && PCI_GODIRECT
diff --git a/mm/Kconfig b/mm/Kconfig
index 2477607..edd300a 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -244,10 +244,12 @@ config DEFAULT_MMAP_MIN_ADDR
 	  This value can be changed after boot using the
 	  /proc/sys/vm/mmap_min_addr tunable.
 
+config ARCH_SUPPORTS_MEMORY_FAILURE
+	bool
 
 config MEMORY_FAILURE
 	depends on MMU
-	depends on X86_MCE
+	depends on ARCH_SUPPORTS_MEMORY_FAILURE
 	bool "Enable recovery from hardware memory errors"
 	help
 	  Enables code to recover from some memory failures on systems

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2010-10-30 18:26 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2010-10-30 18:26 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
Yinghai Lu (1):
      x86: Check irq_remapped instead of remapping_enabled in destroy_irq()


 arch/x86/kernel/apic/io_apic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 0929191..7cc0a72 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3109,7 +3109,7 @@ void destroy_irq(unsigned int irq)
 
 	irq_set_status_flags(irq, IRQ_NOREQUEST|IRQ_NOPROBE);
 
-	if (intr_remapping_enabled)
+	if (irq_remapped(cfg))
 		free_irte(irq);
 	raw_spin_lock_irqsave(&vector_lock, flags);
 	__clear_irq_vector(irq, cfg);

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2010-12-08  7:51 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2010-12-08  7:51 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
Jeremy Fitzhardinge (1):
      x86/pvclock: Zero last_value on resume


 arch/x86/include/asm/pvclock.h |    1 +
 arch/x86/kernel/pvclock.c      |    5 +++++
 arch/x86/xen/time.c            |    2 ++
 3 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h
index 7f7e577..31d84ac 100644
--- a/arch/x86/include/asm/pvclock.h
+++ b/arch/x86/include/asm/pvclock.h
@@ -11,6 +11,7 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src);
 void pvclock_read_wallclock(struct pvclock_wall_clock *wall,
 			    struct pvclock_vcpu_time_info *vcpu,
 			    struct timespec *ts);
+void pvclock_resume(void);
 
 /*
  * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction,
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
index 008b91e..42eb330 100644
--- a/arch/x86/kernel/pvclock.c
+++ b/arch/x86/kernel/pvclock.c
@@ -83,6 +83,11 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src)
 
 static atomic64_t last_value = ATOMIC64_INIT(0);
 
+void pvclock_resume(void)
+{
+	atomic64_set(&last_value, 0);
+}
+
 cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
 {
 	struct pvclock_shadow_time shadow;
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index b2bb5aa..5da5e53 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -426,6 +426,8 @@ void xen_timer_resume(void)
 {
 	int cpu;
 
+	pvclock_resume();
+
 	if (xen_clockevent != &xen_vcpuop_clockevent)
 		return;
 

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2010-12-23 13:00 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2010-12-23 13:00 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, H. Peter Anvin, Thomas Gleixner, Andrew Morton

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
H. Peter Anvin (1):
      x86, kexec: Limit the crashkernel address appropriately


 arch/x86/kernel/setup.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 21c6746..c9089a1 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -501,7 +501,18 @@ static inline unsigned long long get_total_mem(void)
 	return total << PAGE_SHIFT;
 }
 
-#define DEFAULT_BZIMAGE_ADDR_MAX 0x37FFFFFF
+/*
+ * Keep the crash kernel below this limit.  On 32 bits earlier kernels
+ * would limit the kernel to the low 512 MiB due to mapping restrictions.
+ * On 64 bits, kexec-tools currently limits us to 896 MiB; increase this
+ * limit once kexec-tools are fixed.
+ */
+#ifdef CONFIG_X86_32
+# define CRASH_KERNEL_ADDR_MAX	(512 << 20)
+#else
+# define CRASH_KERNEL_ADDR_MAX	(896 << 20)
+#endif
+
 static void __init reserve_crashkernel(void)
 {
 	unsigned long long total_mem;
@@ -520,10 +531,10 @@ static void __init reserve_crashkernel(void)
 		const unsigned long long alignment = 16<<20;	/* 16M */
 
 		/*
-		 *  kexec want bzImage is below DEFAULT_BZIMAGE_ADDR_MAX
+		 *  kexec want bzImage is below CRASH_KERNEL_ADDR_MAX
 		 */
 		crash_base = memblock_find_in_range(alignment,
-			       DEFAULT_BZIMAGE_ADDR_MAX, crash_size, alignment);
+			       CRASH_KERNEL_ADDR_MAX, crash_size, alignment);
 
 		if (crash_base == MEMBLOCK_ERROR) {
 			pr_info("crashkernel reservation failed - No suitable area found.\n");

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2010-12-28 22:27 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2010-12-28 22:27 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, H. Peter Anvin, Thomas Gleixner, Andrew Morton

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
Jesper Juhl (1):
      x86/microcode: Fix double vfree() and remove redundant pointer checks before vfree()


 arch/x86/kernel/microcode_intel.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
index dcb65cc..1a1b606 100644
--- a/arch/x86/kernel/microcode_intel.c
+++ b/arch/x86/kernel/microcode_intel.c
@@ -364,8 +364,7 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
 
 		/* For performance reasons, reuse mc area when possible */
 		if (!mc || mc_size > curr_mc_size) {
-			if (mc)
-				vfree(mc);
+			vfree(mc);
 			mc = vmalloc(mc_size);
 			if (!mc)
 				break;
@@ -374,13 +373,11 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
 
 		if (get_ucode_data(mc, ucode_ptr, mc_size) ||
 		    microcode_sanity_check(mc) < 0) {
-			vfree(mc);
 			break;
 		}
 
 		if (get_matching_microcode(&uci->cpu_sig, mc, new_rev)) {
-			if (new_mc)
-				vfree(new_mc);
+			vfree(new_mc);
 			new_rev = mc_header.rev;
 			new_mc  = mc;
 			mc = NULL;	/* trigger new vmalloc */
@@ -390,12 +387,10 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
 		leftover  -= mc_size;
 	}
 
-	if (mc)
-		vfree(mc);
+	vfree(mc);
 
 	if (leftover) {
-		if (new_mc)
-			vfree(new_mc);
+		vfree(new_mc);
 		state = UCODE_ERROR;
 		goto out;
 	}
@@ -405,8 +400,7 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
 		goto out;
 	}
 
-	if (uci->mc)
-		vfree(uci->mc);
+	vfree(uci->mc);
 	uci->mc = (struct microcode_intel *)new_mc;
 
 	pr_debug("CPU%d found a matching microcode update with version 0x%x (current=0x%x)\n",

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2011-02-07 15:03 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2011-02-07 15:03 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, H. Peter Anvin, Thomas Gleixner, Andrew Morton

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	Ingo

------------------>
H. Peter Anvin (1):
      x86, nx: Mark the ACPI resume trampoline code as +x


 arch/x86/kernel/acpi/sleep.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 4d9ebba..68d1537 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -12,10 +12,8 @@
 #include <linux/cpumask.h>
 #include <asm/segment.h>
 #include <asm/desc.h>
-
-#ifdef CONFIG_X86_32
 #include <asm/pgtable.h>
-#endif
+#include <asm/cacheflush.h>
 
 #include "realmode/wakeup.h"
 #include "sleep.h"
@@ -149,6 +147,15 @@ void __init acpi_reserve_wakeup_memory(void)
 	memblock_x86_reserve_range(mem, mem + WAKEUP_SIZE, "ACPI WAKEUP");
 }
 
+int __init acpi_configure_wakeup_memory(void)
+{
+	if (acpi_realmode)
+		set_memory_x(acpi_realmode, WAKEUP_SIZE >> PAGE_SHIFT);
+
+	return 0;
+}
+arch_initcall(acpi_configure_wakeup_memory);
+
 
 static int __init acpi_sleep_setup(char *str)
 {

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2011-07-23  8:43 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2011-07-23  8:43 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
	Richard Weinberger

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-urgent-for-linus


out-of-topic modifications in x86-urgent-for-linus:
---------------------------------------------------
arch/um/sys-i386/Makefile          # a03fc8c: um: Make rwsem.S depend on CONFIG

 Thanks,

	Ingo

------------------>
Richard Weinberger (1):
      um: Make rwsem.S depend on CONFIG_RWSEM_XCHGADD_ALGORITHM


 arch/um/sys-i386/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile
index 15587ed..87b659d 100644
--- a/arch/um/sys-i386/Makefile
+++ b/arch/um/sys-i386/Makefile
@@ -8,7 +8,8 @@ obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
 
 obj-$(CONFIG_BINFMT_ELF) += elfcore.o
 
-subarch-obj-y = lib/rwsem.o lib/string_32.o
+subarch-obj-y = lib/string_32.o
+subarch-obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += lib/rwsem.o
 subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem_32.o
 subarch-obj-$(CONFIG_MODULES) += kernel/module.o
 

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2011-09-30 18:22 Ingo Molnar
  2011-09-30 18:59 ` Jeremy Fitzhardinge
  2011-09-30 19:44 ` Thomas Gleixner
  0 siblings, 2 replies; 79+ messages in thread
From: Ingo Molnar @ 2011-09-30 18:22 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton


Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-urgent-for-linus

 Thanks,

	Ingo

------------------>
Matt Fleming (1):
      x86/rtc: Don't recursively acquire rtc_lock


 arch/x86/kernel/rtc.c         |   23 ++++++++++++-----------
 arch/x86/platform/mrst/vrtc.c |    9 +++++++++
 2 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index 3f2ad26..ccdbc16 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -42,8 +42,11 @@ int mach_set_rtc_mmss(unsigned long nowtime)
 {
 	int real_seconds, real_minutes, cmos_minutes;
 	unsigned char save_control, save_freq_select;
+	unsigned long flags;
 	int retval = 0;
 
+	spin_lock_irqsave(&rtc_lock, flags);
+
 	 /* tell the clock it's being set */
 	save_control = CMOS_READ(RTC_CONTROL);
 	CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
@@ -93,12 +96,17 @@ int mach_set_rtc_mmss(unsigned long nowtime)
 	CMOS_WRITE(save_control, RTC_CONTROL);
 	CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
 
+	spin_unlock_irqrestore(&rtc_lock, flags);
+
 	return retval;
 }
 
 unsigned long mach_get_cmos_time(void)
 {
 	unsigned int status, year, mon, day, hour, min, sec, century = 0;
+	unsigned long flags;
+
+	spin_lock_irqsave(&rtc_lock, flags);
 
 	/*
 	 * If UIP is clear, then we have >= 244 microseconds before
@@ -125,6 +133,8 @@ unsigned long mach_get_cmos_time(void)
 	status = CMOS_READ(RTC_CONTROL);
 	WARN_ON_ONCE(RTC_ALWAYS_BCD && (status & RTC_DM_BINARY));
 
+	spin_unlock_irqrestore(&rtc_lock, flags);
+
 	if (RTC_ALWAYS_BCD || !(status & RTC_DM_BINARY)) {
 		sec = bcd2bin(sec);
 		min = bcd2bin(min);
@@ -169,24 +179,15 @@ EXPORT_SYMBOL(rtc_cmos_write);
 
 int update_persistent_clock(struct timespec now)
 {
-	unsigned long flags;
-	int retval;
-
-	spin_lock_irqsave(&rtc_lock, flags);
-	retval = x86_platform.set_wallclock(now.tv_sec);
-	spin_unlock_irqrestore(&rtc_lock, flags);
-
-	return retval;
+	return x86_platform.set_wallclock(now.tv_sec);
 }
 
 /* not static: needed by APM */
 void read_persistent_clock(struct timespec *ts)
 {
-	unsigned long retval, flags;
+	unsigned long retval;
 
-	spin_lock_irqsave(&rtc_lock, flags);
 	retval = x86_platform.get_wallclock();
-	spin_unlock_irqrestore(&rtc_lock, flags);
 
 	ts->tv_sec = retval;
 	ts->tv_nsec = 0;
diff --git a/arch/x86/platform/mrst/vrtc.c b/arch/x86/platform/mrst/vrtc.c
index 73d70d6..6d5dbcd 100644
--- a/arch/x86/platform/mrst/vrtc.c
+++ b/arch/x86/platform/mrst/vrtc.c
@@ -58,8 +58,11 @@ EXPORT_SYMBOL_GPL(vrtc_cmos_write);
 unsigned long vrtc_get_time(void)
 {
 	u8 sec, min, hour, mday, mon;
+	unsigned long flags;
 	u32 year;
 
+	spin_lock_irqsave(&rtc_lock, flags);
+
 	while ((vrtc_cmos_read(RTC_FREQ_SELECT) & RTC_UIP))
 		cpu_relax();
 
@@ -70,6 +73,8 @@ unsigned long vrtc_get_time(void)
 	mon = vrtc_cmos_read(RTC_MONTH);
 	year = vrtc_cmos_read(RTC_YEAR);
 
+	spin_unlock_irqrestore(&rtc_lock, flags);
+
 	/* vRTC YEAR reg contains the offset to 1960 */
 	year += 1960;
 
@@ -83,8 +88,10 @@ unsigned long vrtc_get_time(void)
 int vrtc_set_mmss(unsigned long nowtime)
 {
 	int real_sec, real_min;
+	unsigned long flags;
 	int vrtc_min;
 
+	spin_lock_irqsave(&rtc_lock, flags);
 	vrtc_min = vrtc_cmos_read(RTC_MINUTES);
 
 	real_sec = nowtime % 60;
@@ -95,6 +102,8 @@ int vrtc_set_mmss(unsigned long nowtime)
 
 	vrtc_cmos_write(real_sec, RTC_SECONDS);
 	vrtc_cmos_write(real_min, RTC_MINUTES);
+	spin_unlock_irqrestore(&rtc_lock, flags);
+
 	return 0;
 }
 

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2011-09-30 18:22 Ingo Molnar
@ 2011-09-30 18:59 ` Jeremy Fitzhardinge
  2011-09-30 19:44 ` Thomas Gleixner
  1 sibling, 0 replies; 79+ messages in thread
From: Jeremy Fitzhardinge @ 2011-09-30 18:59 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, H. Peter Anvin,
	Andrew Morton

On 09/30/2011 11:22 AM, Ingo Molnar wrote:
> Linus,
>
> Please pull the latest x86-urgent-for-linus git tree from:
>
>    git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-urgent-for-linus

Is that really git://tesla.tglx.de/git/linux-2.6-tip?

    J

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2011-09-30 18:22 Ingo Molnar
  2011-09-30 18:59 ` Jeremy Fitzhardinge
@ 2011-09-30 19:44 ` Thomas Gleixner
  1 sibling, 0 replies; 79+ messages in thread
From: Thomas Gleixner @ 2011-09-30 19:44 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linus Torvalds, linux-kernel, H. Peter Anvin, Andrew Morton

On Fri, 30 Sep 2011, Ingo Molnar wrote:

> 
> Linus,
> 
> Please pull the latest x86-urgent-for-linus git tree from:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-urgent-for-linus

     git://tesla.tglx.de/git/linux-2.6-tip x86-urgent-for-linus


^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2011-10-13  9:00 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2011-10-13  9:00 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://tesla.tglx.de/git/linux-2.6-tip.git x86-urgent-for-linus

 Thanks,

	Ingo

------------------>
Adrian Bunk (1):
      x86: Default to vsyscall=native for now


 Documentation/kernel-parameters.txt |    7 ++++---
 arch/x86/kernel/vsyscall_64.c       |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 854ed5ca..d6e6724 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2706,10 +2706,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			functions are at fixed addresses, they make nice
 			targets for exploits that can control RIP.
 
-			emulate     [default] Vsyscalls turn into traps and are
-			            emulated reasonably safely.
+			emulate     Vsyscalls turn into traps and are emulated
+			            reasonably safely.
 
-			native      Vsyscalls are native syscall instructions.
+			native      [default] Vsyscalls are native syscall
+			            instructions.
 			            This is a little bit faster than trapping
 			            and makes a few dynamic recompilers work
 			            better than they would in emulation mode.
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index 18ae83d..b56c65de 100644
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -56,7 +56,7 @@ DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data) =
 	.lock = __SEQLOCK_UNLOCKED(__vsyscall_gtod_data.lock),
 };
 
-static enum { EMULATE, NATIVE, NONE } vsyscall_mode = EMULATE;
+static enum { EMULATE, NATIVE, NONE } vsyscall_mode = NATIVE;
 
 static int __init vsyscall_setup(char *str)
 {

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2011-12-20 19:30 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2011-12-20 19:30 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

 Thanks,

	Ingo

------------------>
Clemens Ladisch (1):
      x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT


 arch/x86/kernel/dumpstack_32.c |    8 ++++----
 arch/x86/kernel/dumpstack_64.c |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
index 3b97a80..c99f9ed 100644
--- a/arch/x86/kernel/dumpstack_32.c
+++ b/arch/x86/kernel/dumpstack_32.c
@@ -116,16 +116,16 @@ void show_registers(struct pt_regs *regs)
 		for (i = 0; i < code_len; i++, ip++) {
 			if (ip < (u8 *)PAGE_OFFSET ||
 					probe_kernel_address(ip, c)) {
-				printk(" Bad EIP value.");
+				printk(KERN_CONT " Bad EIP value.");
 				break;
 			}
 			if (ip == (u8 *)regs->ip)
-				printk("<%02x> ", c);
+				printk(KERN_CONT "<%02x> ", c);
 			else
-				printk("%02x ", c);
+				printk(KERN_CONT "%02x ", c);
 		}
 	}
-	printk("\n");
+	printk(KERN_CONT "\n");
 }
 
 int is_valid_bugaddr(unsigned long ip)
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 19853ad..6d728d9 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -284,16 +284,16 @@ void show_registers(struct pt_regs *regs)
 		for (i = 0; i < code_len; i++, ip++) {
 			if (ip < (u8 *)PAGE_OFFSET ||
 					probe_kernel_address(ip, c)) {
-				printk(" Bad RIP value.");
+				printk(KERN_CONT " Bad RIP value.");
 				break;
 			}
 			if (ip == (u8 *)regs->ip)
-				printk("<%02x> ", c);
+				printk(KERN_CONT "<%02x> ", c);
 			else
-				printk("%02x ", c);
+				printk(KERN_CONT "%02x ", c);
 		}
 	}
-	printk("\n");
+	printk(KERN_CONT "\n");
 }
 
 int is_valid_bugaddr(unsigned long ip)

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2012-10-23 11:06 Ingo Molnar
  2012-10-23 15:00 ` H. Peter Anvin
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2012-10-23 11:06 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   HEAD: 235d220e1b55c1f8683fd4f59c3e8e39ba6ca915 Merge tag 'numascale_mce_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras into x86/urgent

Fix for a system with an atypical use of AMD CPUs.

 Thanks,

	Ingo

------------------>
Daniel J Blueman (1):
      x86, AMD, MCE: Prevent oops on multi-server system




^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2012-10-23 11:06 Ingo Molnar
@ 2012-10-23 15:00 ` H. Peter Anvin
  2012-10-23 15:17   ` Borislav Petkov
  0 siblings, 1 reply; 79+ messages in thread
From: H. Peter Anvin @ 2012-10-23 15:00 UTC (permalink / raw)
  To: Ingo Molnar, Linus Torvalds; +Cc: linux-kernel, Thomas Gleixner, Andrew Morton

I thought I had already pushed this fix with a proper description...

Ingo Molnar <mingo@kernel.org> wrote:

>Linus,
>
>Please pull the latest x86-urgent-for-linus git tree from:
>
>git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
>x86-urgent-for-linus
>
>HEAD: 235d220e1b55c1f8683fd4f59c3e8e39ba6ca915 Merge tag
>'numascale_mce_fix' of
>git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras into x86/urgent
>
>Fix for a system with an atypical use of AMD CPUs.
>
> Thanks,
>
>	Ingo
>
>------------------>
>Daniel J Blueman (1):
>      x86, AMD, MCE: Prevent oops on multi-server system

-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2012-10-23 15:00 ` H. Peter Anvin
@ 2012-10-23 15:17   ` Borislav Petkov
  0 siblings, 0 replies; 79+ messages in thread
From: Borislav Petkov @ 2012-10-23 15:17 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Ingo Molnar, Linus Torvalds, linux-kernel, Thomas Gleixner,
	Andrew Morton

On Tue, Oct 23, 2012 at 08:00:54AM -0700, H. Peter Anvin wrote:
> I thought I had already pushed this fix with a proper description...

Yes, this one is already upstream.

-- 
Regards/Gruss,
Boris.

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2013-07-10 14:32 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2013-07-10 14:32 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   HEAD: 4787c368a9bca39e173d702389ee2eaf0520abc1 x86/tracing: Add irq_enter/exit() in smp_trace_reschedule_interrupt()

irq-tracing fixlet.

 Thanks,

	Ingo

------------------>
Seiji Aguchi (1):
      x86/tracing: Add irq_enter/exit() in smp_trace_reschedule_interrupt()


 arch/x86/kernel/smp.c | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index f4fe0b8..cdaa347 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -265,23 +265,30 @@ void smp_reschedule_interrupt(struct pt_regs *regs)
 	 */
 }
 
-void smp_trace_reschedule_interrupt(struct pt_regs *regs)
+static inline void smp_entering_irq(void)
 {
 	ack_APIC_irq();
+	irq_enter();
+}
+
+void smp_trace_reschedule_interrupt(struct pt_regs *regs)
+{
+	/*
+	 * Need to call irq_enter() before calling the trace point.
+	 * __smp_reschedule_interrupt() calls irq_enter/exit() too (in
+	 * scheduler_ipi(). This is OK, since those functions are allowed
+	 * to nest.
+	 */
+	smp_entering_irq();
 	trace_reschedule_entry(RESCHEDULE_VECTOR);
 	__smp_reschedule_interrupt();
 	trace_reschedule_exit(RESCHEDULE_VECTOR);
+	exiting_irq();
 	/*
 	 * KVM uses this interrupt to force a cpu out of guest mode
 	 */
 }
 
-static inline void call_function_entering_irq(void)
-{
-	ack_APIC_irq();
-	irq_enter();
-}
-
 static inline void __smp_call_function_interrupt(void)
 {
 	generic_smp_call_function_interrupt();
@@ -290,14 +297,14 @@ static inline void __smp_call_function_interrupt(void)
 
 void smp_call_function_interrupt(struct pt_regs *regs)
 {
-	call_function_entering_irq();
+	smp_entering_irq();
 	__smp_call_function_interrupt();
 	exiting_irq();
 }
 
 void smp_trace_call_function_interrupt(struct pt_regs *regs)
 {
-	call_function_entering_irq();
+	smp_entering_irq();
 	trace_call_function_entry(CALL_FUNCTION_VECTOR);
 	__smp_call_function_interrupt();
 	trace_call_function_exit(CALL_FUNCTION_VECTOR);
@@ -312,14 +319,14 @@ static inline void __smp_call_function_single_interrupt(void)
 
 void smp_call_function_single_interrupt(struct pt_regs *regs)
 {
-	call_function_entering_irq();
+	smp_entering_irq();
 	__smp_call_function_single_interrupt();
 	exiting_irq();
 }
 
 void smp_trace_call_function_single_interrupt(struct pt_regs *regs)
 {
-	call_function_entering_irq();
+	smp_entering_irq();
 	trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR);
 	__smp_call_function_single_interrupt();
 	trace_call_function_single_exit(CALL_FUNCTION_SINGLE_VECTOR);

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2013-09-28 18:23 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2013-09-28 18:23 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, H. Peter Anvin, Thomas Gleixner, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   HEAD: accd1e823ed1d5980106dd522a4c535084400830 x86/microcode/AMD: Fix patch level reporting for family 15h

An AMD microcode patch level sysfs reporting fixlet.

 Thanks,

	Ingo

------------------>
Suravee Suthikulpanit (1):
      x86/microcode/AMD: Fix patch level reporting for family 15h


 arch/x86/kernel/microcode_amd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index 7123b5d..af99f71 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -216,6 +216,7 @@ int apply_microcode_amd(int cpu)
 	/* need to apply patch? */
 	if (rev >= mc_amd->hdr.patch_id) {
 		c->microcode = rev;
+		uci->cpu_sig.rev = rev;
 		return 0;
 	}
 

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2013-11-19 15:48 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2013-11-19 15:48 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, H. Peter Anvin, Thomas Gleixner, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: cc08e04c3fdcaab767b8db27527002b2b4d758cb x86: Export 'boot_cpu_physical_apicid' to modules

A modular build fix for certain .config's.

 Thanks,

	Ingo

------------------>
David Rientjes (1):
      x86: Export 'boot_cpu_physical_apicid' to modules


 arch/x86/kernel/apic/apic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index a7eb82d..befe498 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -62,6 +62,7 @@ unsigned disabled_cpus;
 
 /* Processor that is doing the boot up */
 unsigned int boot_cpu_physical_apicid = -1U;
+EXPORT_SYMBOL_GPL(boot_cpu_physical_apicid);
 
 /*
  * The highest APIC ID seen during enumeration.

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2014-04-19 10:58 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2014-04-19 10:58 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, H. Peter Anvin, Thomas Gleixner, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: ea431643d6c38728195e2c456801c3ef66bb9991 x86/mce: Fix CMCI preemption bugs

This fixes the preemption-count imbalance crash reported by Owen 
Kibel. (The second part of the changelog is not true because even 
RAW_SPINLOCKs have a preemption count - but this was the tested commit 
so I didn't amend it. Let me know if I should resend it.)

 Thanks,

	Ingo

------------------>
Ingo Molnar (1):
      x86/mce: Fix CMCI preemption bugs


 arch/x86/kernel/cpu/mcheck/mce.c       |  4 +---
 arch/x86/kernel/cpu/mcheck/mce_intel.c | 18 +++++++++---------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index eeee23f..68317c8 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -598,7 +598,6 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
 {
 	struct mce m;
 	int i;
-	unsigned long *v;
 
 	this_cpu_inc(mce_poll_count);
 
@@ -618,8 +617,7 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
 		if (!(m.status & MCI_STATUS_VAL))
 			continue;
 
-		v = &get_cpu_var(mce_polled_error);
-		set_bit(0, v);
+		this_cpu_write(mce_polled_error, 1);
 		/*
 		 * Uncorrected or signalled events are handled by the exception
 		 * handler when it is enabled, so don't process those here.
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel.c b/arch/x86/kernel/cpu/mcheck/mce_intel.c
index 3bdb95a..9a316b2 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_intel.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_intel.c
@@ -42,7 +42,7 @@ static DEFINE_PER_CPU(mce_banks_t, mce_banks_owned);
  * cmci_discover_lock protects against parallel discovery attempts
  * which could race against each other.
  */
-static DEFINE_RAW_SPINLOCK(cmci_discover_lock);
+static DEFINE_SPINLOCK(cmci_discover_lock);
 
 #define CMCI_THRESHOLD		1
 #define CMCI_POLL_INTERVAL	(30 * HZ)
@@ -144,14 +144,14 @@ static void cmci_storm_disable_banks(void)
 	int bank;
 	u64 val;
 
-	raw_spin_lock_irqsave(&cmci_discover_lock, flags);
+	spin_lock_irqsave(&cmci_discover_lock, flags);
 	owned = __get_cpu_var(mce_banks_owned);
 	for_each_set_bit(bank, owned, MAX_NR_BANKS) {
 		rdmsrl(MSR_IA32_MCx_CTL2(bank), val);
 		val &= ~MCI_CTL2_CMCI_EN;
 		wrmsrl(MSR_IA32_MCx_CTL2(bank), val);
 	}
-	raw_spin_unlock_irqrestore(&cmci_discover_lock, flags);
+	spin_unlock_irqrestore(&cmci_discover_lock, flags);
 }
 
 static bool cmci_storm_detect(void)
@@ -211,7 +211,7 @@ static void cmci_discover(int banks)
 	int i;
 	int bios_wrong_thresh = 0;
 
-	raw_spin_lock_irqsave(&cmci_discover_lock, flags);
+	spin_lock_irqsave(&cmci_discover_lock, flags);
 	for (i = 0; i < banks; i++) {
 		u64 val;
 		int bios_zero_thresh = 0;
@@ -266,7 +266,7 @@ static void cmci_discover(int banks)
 			WARN_ON(!test_bit(i, __get_cpu_var(mce_poll_banks)));
 		}
 	}
-	raw_spin_unlock_irqrestore(&cmci_discover_lock, flags);
+	spin_unlock_irqrestore(&cmci_discover_lock, flags);
 	if (mca_cfg.bios_cmci_threshold && bios_wrong_thresh) {
 		pr_info_once(
 			"bios_cmci_threshold: Some banks do not have valid thresholds set\n");
@@ -316,10 +316,10 @@ void cmci_clear(void)
 
 	if (!cmci_supported(&banks))
 		return;
-	raw_spin_lock_irqsave(&cmci_discover_lock, flags);
+	spin_lock_irqsave(&cmci_discover_lock, flags);
 	for (i = 0; i < banks; i++)
 		__cmci_disable_bank(i);
-	raw_spin_unlock_irqrestore(&cmci_discover_lock, flags);
+	spin_unlock_irqrestore(&cmci_discover_lock, flags);
 }
 
 static void cmci_rediscover_work_func(void *arg)
@@ -360,9 +360,9 @@ void cmci_disable_bank(int bank)
 	if (!cmci_supported(&banks))
 		return;
 
-	raw_spin_lock_irqsave(&cmci_discover_lock, flags);
+	spin_lock_irqsave(&cmci_discover_lock, flags);
 	__cmci_disable_bank(bank);
-	raw_spin_unlock_irqrestore(&cmci_discover_lock, flags);
+	spin_unlock_irqrestore(&cmci_discover_lock, flags);
 }
 
 static void intel_init_cmci(void)

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2014-12-19 12:16 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2014-12-19 12:16 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andy Lutomirski

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: 3fb2f4237bb452eb4e98f6a5dbd5a445b4fed9d0 x86/tls: Don't validate lm in set_thread_area() after all

This tree contains a single TLS ABI validation fix from Andy 
Lutomirski.

 Thanks,

	Ingo

------------------>
Andy Lutomirski (1):
      x86/tls: Don't validate lm in set_thread_area() after all


 arch/x86/include/uapi/asm/ldt.h | 7 +++++++
 arch/x86/kernel/tls.c           | 6 ------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/x86/include/uapi/asm/ldt.h b/arch/x86/include/uapi/asm/ldt.h
index 46727eb37bfe..6e1aaf73852a 100644
--- a/arch/x86/include/uapi/asm/ldt.h
+++ b/arch/x86/include/uapi/asm/ldt.h
@@ -28,6 +28,13 @@ struct user_desc {
 	unsigned int  seg_not_present:1;
 	unsigned int  useable:1;
 #ifdef __x86_64__
+	/*
+	 * Because this bit is not present in 32-bit user code, user
+	 * programs can pass uninitialized values here.  Therefore, in
+	 * any context in which a user_desc comes from a 32-bit program,
+	 * the kernel must act as though lm == 0, regardless of the
+	 * actual value.
+	 */
 	unsigned int  lm:1;
 #endif
 };
diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c
index 3e551eee87b9..4e942f31b1a7 100644
--- a/arch/x86/kernel/tls.c
+++ b/arch/x86/kernel/tls.c
@@ -55,12 +55,6 @@ static bool tls_desc_okay(const struct user_desc *info)
 	if (info->seg_not_present)
 		return false;
 
-#ifdef CONFIG_X86_64
-	/* The L bit makes no sense for data. */
-	if (info->lm)
-		return false;
-#endif
-
 	return true;
 }
 

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2015-02-06 18:41 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2015-02-06 18:41 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Borislav Petkov,
	Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: 6d84d1d13081dca4b6bd532fb8b95a7ed5a816dd Merge tag 'microcode_fix_for_3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/urgent

An x86 microcode driver oops fix.

 Thanks,

	Ingo

------------------>
Boris Ostrovsky (1):
      x86, microcode: Return error from driver init code when loader is disabled


 arch/x86/kernel/cpu/microcode/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 15c29096136b..36a83617eb21 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -552,7 +552,7 @@ static int __init microcode_init(void)
 	int error;
 
 	if (paravirt_enabled() || dis_ucode_ldr)
-		return 0;
+		return -EINVAL;
 
 	if (c->x86_vendor == X86_VENDOR_INTEL)
 		microcode_ops = init_intel_microcode();

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2015-03-28 13:58 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2015-03-28 13:58 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, H. Peter Anvin, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: b3494a4ab20f6bdf74cdf2badf7918bb65ee8a00 x86/asm/entry: Check for syscall exit work with IRQs disabled

Fix x86 syscall exit code bug that resulted in spurious non-execution 
of TIF-driven user-return worklets, causing big trouble for things 
like KVM that rely on user notifiers for correctness of their vcpu 
model, causing crashes like double faults.

 Thanks,

	Ingo

------------------>
Andy Lutomirski (1):
      x86/asm/entry: Check for syscall exit work with IRQs disabled


 arch/x86/kernel/entry_64.S | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 1d74d161687c..2babb393915e 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -364,12 +364,21 @@ GLOBAL(system_call_after_swapgs)
  * Has incomplete stack frame and undefined top of stack.
  */
 ret_from_sys_call:
-	testl $_TIF_ALLWORK_MASK,TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
-	jnz int_ret_from_sys_call_fixup	/* Go the the slow path */
-
 	LOCKDEP_SYS_EXIT
 	DISABLE_INTERRUPTS(CLBR_NONE)
 	TRACE_IRQS_OFF
+
+	/*
+	 * We must check ti flags with interrupts (or at least preemption)
+	 * off because we must *never* return to userspace without
+	 * processing exit work that is enqueued if we're preempted here.
+	 * In particular, returning to userspace with any of the one-shot
+	 * flags (TIF_NOTIFY_RESUME, TIF_USER_RETURN_NOTIFY, etc) set is
+	 * very bad.
+	 */
+	testl $_TIF_ALLWORK_MASK,TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
+	jnz int_ret_from_sys_call_fixup	/* Go the the slow path */
+
 	CFI_REMEMBER_STATE
 	/*
 	 * sysretq will re-enable interrupts:
@@ -386,7 +395,7 @@ GLOBAL(system_call_after_swapgs)
 
 int_ret_from_sys_call_fixup:
 	FIXUP_TOP_OF_STACK %r11, -ARGOFFSET
-	jmp int_ret_from_sys_call
+	jmp int_ret_from_sys_call_irqs_off
 
 	/* Do syscall tracing */
 tracesys:
@@ -432,6 +441,7 @@ GLOBAL(system_call_after_swapgs)
 GLOBAL(int_ret_from_sys_call)
 	DISABLE_INTERRUPTS(CLBR_NONE)
 	TRACE_IRQS_OFF
+int_ret_from_sys_call_irqs_off:
 	movl $_TIF_ALLWORK_MASK,%edi
 	/* edi:	mask to check */
 GLOBAL(int_with_check)

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2015-05-15  7:26 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2015-05-15  7:26 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: ef7254a595912b026d80a4116b8c4cd5b79d9c62 x86/vdso: Fix 'make bzImage' on older distros

A bzImage build fix on older distros.

 Thanks,

	Ingo

------------------>
Oleg Nesterov (1):
      x86/vdso: Fix 'make bzImage' on older distros


 arch/x86/vdso/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 275a3a8b78af..e97032069f88 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -51,7 +51,7 @@ VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
 $(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE
 	$(call if_changed,vdso)
 
-HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi
+HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi -I$(srctree)/arch/x86/include/uapi
 hostprogs-y			+= vdso2c
 
 quiet_cmd_vdso2c = VDSO2C  $@

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2016-07-25 15:54 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2016-07-25 15:54 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
	Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: 4d581259b7d44c8120a614b4e9244094c824d51f x86/reboot: Add Dell Optiplex 7450 AIO reboot quirk

Leftover fix from the v4.7 cycle: adds a reboot quirk.

 Thanks,

	Ingo

------------------>
Alex Hung (1):
      x86/reboot: Add Dell Optiplex 7450 AIO reboot quirk


 arch/x86/kernel/reboot.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index a9b31eb815f2..15ed70f8278b 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -55,6 +55,19 @@ bool port_cf9_safe = false;
  */
 
 /*
+ * Some machines require the "reboot=a" commandline options
+ */
+static int __init set_acpi_reboot(const struct dmi_system_id *d)
+{
+	if (reboot_type != BOOT_ACPI) {
+		reboot_type = BOOT_ACPI;
+		pr_info("%s series board detected. Selecting %s-method for reboots.\n",
+			d->ident, "ACPI");
+	}
+	return 0;
+}
+
+/*
  * Some machines require the "reboot=b" or "reboot=k"  commandline options,
  * this quirk makes that automatic.
  */
@@ -395,6 +408,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Dell XPS710"),
 		},
 	},
+	{	/* Handle problems with rebooting on Dell Optiplex 7450 AIO */
+		.callback = set_acpi_reboot,
+		.ident = "Dell OptiPlex 7450 AIO",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 7450 AIO"),
+		},
+	},
 
 	/* Hewlett-Packard */
 	{	/* Handle problems with rebooting on HP laptops */

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2018-07-21 12:55 Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2018-07-21 12:55 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Peter Zijlstra, Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: fbdb328c6bae0a7c78d75734a738b66b86dffc96 x86/MCE: Remove min interval polling limitation

A single fix for a MCE-polling regression, which prevented the disabling of 
polling.

 Thanks,

	Ingo

------------------>
Dewet Thibaut (1):
      x86/MCE: Remove min interval polling limitation


 arch/x86/kernel/cpu/mcheck/mce.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index c102ad51025e..8c50754c09c1 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2165,9 +2165,6 @@ static ssize_t store_int_with_restart(struct device *s,
 	if (check_interval == old_check_interval)
 		return ret;
 
-	if (check_interval < 1)
-		check_interval = 1;
-
 	mutex_lock(&mce_sysfs_mutex);
 	mce_restart();
 	mutex_unlock(&mce_sysfs_mutex);

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2019-05-05 11:00 Ingo Molnar
  2019-05-05 22:10 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2019-05-05 11:00 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
	Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: b51ce3744f115850166f3d6c292b9c8cb849ad4f x86/mm/mem_encrypt: Disable all instrumentation for early SME setup

Disable function tracing during early SME setup to fix a boot crash on 
SME-enabled kernels running distro kernels (some of which have function 
tracing enabled).

  out-of-topic modifications in x86-urgent-for-linus:
  -----------------------------------------------------
  lib/Makefile                       # b51ce3744f11: x86/mm/mem_encrypt: Disable 

 Thanks,

	Ingo

------------------>
Gary Hook (1):
      x86/mm/mem_encrypt: Disable all instrumentation for early SME setup


 arch/x86/lib/Makefile | 12 ++++++++++++
 lib/Makefile          | 11 +++++++++++
 2 files changed, 23 insertions(+)

diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 140e61843a07..3cb3af51ec89 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -6,6 +6,18 @@
 # Produces uninteresting flaky coverage.
 KCOV_INSTRUMENT_delay.o	:= n
 
+# Early boot use of cmdline; don't instrument it
+ifdef CONFIG_AMD_MEM_ENCRYPT
+KCOV_INSTRUMENT_cmdline.o := n
+KASAN_SANITIZE_cmdline.o  := n
+
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_cmdline.o = -pg
+endif
+
+CFLAGS_cmdline.o := $(call cc-option, -fno-stack-protector)
+endif
+
 inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk
 inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt
 quiet_cmd_inat_tables = GEN     $@
diff --git a/lib/Makefile b/lib/Makefile
index 3b08673e8881..18c2be516ab4 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -17,6 +17,17 @@ KCOV_INSTRUMENT_list_debug.o := n
 KCOV_INSTRUMENT_debugobjects.o := n
 KCOV_INSTRUMENT_dynamic_debug.o := n
 
+# Early boot use of cmdline, don't instrument it
+ifdef CONFIG_AMD_MEM_ENCRYPT
+KASAN_SANITIZE_string.o := n
+
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_string.o = -pg
+endif
+
+CFLAGS_string.o := $(call cc-option, -fno-stack-protector)
+endif
+
 lib-y := ctype.o string.o vsprintf.o cmdline.o \
 	 rbtree.o radix-tree.o timerqueue.o xarray.o \
 	 idr.o int_sqrt.o extable.o \

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2019-05-05 11:00 Ingo Molnar
@ 2019-05-05 22:10 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2019-05-05 22:10 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Andrew Morton

The pull request you sent on Sun, 5 May 2019 13:00:29 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/13369e831173251e2bc3bc2a78f67c387e8d9609

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2019-07-14 11:32 Ingo Molnar
  2019-07-14 18:45 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2019-07-14 11:32 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
	Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: e9a1379f9219be439f47a0f063431a92dc529eda x86/vdso: Fix flip/flop vdso build bug

A single build system bugfix.

 Thanks,

	Ingo

------------------>
Naohiro Aota (1):
      x86/vdso: Fix flip/flop vdso build bug


 arch/x86/entry/vdso/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index 39106111be86..34773395139a 100644
--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
@@ -56,8 +56,7 @@ VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \
 			-z max-page-size=4096
 
 $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE
-	$(call if_changed,vdso)
-	$(call if_changed,vdso_check)
+	$(call if_changed,vdso_and_check)
 
 HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi -I$(srctree)/arch/$(SUBARCH)/include/uapi
 hostprogs-y			+= vdso2c
@@ -127,8 +126,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
 	$(call if_changed,objcopy)
 
 $(obj)/vdsox32.so.dbg: $(obj)/vdsox32.lds $(vobjx32s) FORCE
-	$(call if_changed,vdso)
-	$(call if_changed,vdso_check)
+	$(call if_changed,vdso_and_check)
 
 CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
 VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -soname linux-gate.so.1
@@ -167,8 +165,7 @@ $(obj)/vdso32.so.dbg: FORCE \
 		      $(obj)/vdso32/note.o \
 		      $(obj)/vdso32/system_call.o \
 		      $(obj)/vdso32/sigreturn.o
-	$(call if_changed,vdso)
-	$(call if_changed,vdso_check)
+	$(call if_changed,vdso_and_check)
 
 #
 # The DSO images are built using a special linker script.
@@ -184,6 +181,9 @@ VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
 	-Bsymbolic
 GCOV_PROFILE := n
 
+quiet_cmd_vdso_and_check = VDSO    $@
+      cmd_vdso_and_check = $(cmd_vdso); $(cmd_vdso_check)
+
 #
 # Install the unstripped copies of vdso*.so.  If our toolchain supports
 # build-id, install .build-id links as well.

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2019-07-14 11:32 Ingo Molnar
@ 2019-07-14 18:45 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2019-07-14 18:45 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Andrew Morton

The pull request you sent on Sun, 14 Jul 2019 13:32:11 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/577d9460d3d0a69b96f749f974642441ae186a7f

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2019-09-28 12:42 Ingo Molnar
  2019-09-28 20:50 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2019-09-28 12:42 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
	Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: ca14c996afe7228ff9b480cf225211cc17212688 x86/purgatory: Disable the stackleak GCC plugin for the purgatory

A kexec fix for the case when GCC_PLUGIN_STACKLEAK=y is enabled.

 Thanks,

	Ingo

------------------>
Arvind Sankar (1):
      x86/purgatory: Disable the stackleak GCC plugin for the purgatory


 arch/x86/purgatory/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index 10fb42da0007..b81b5172cf99 100644
--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -23,6 +23,7 @@ KCOV_INSTRUMENT := n
 
 PURGATORY_CFLAGS_REMOVE := -mcmodel=kernel
 PURGATORY_CFLAGS := -mcmodel=large -ffreestanding -fno-zero-initialized-in-bss
+PURGATORY_CFLAGS += $(DISABLE_STACKLEAK_PLUGIN)
 
 # Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
 # in turn leaves some undefined symbols like __fentry__ in purgatory and not

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2019-09-28 12:42 Ingo Molnar
@ 2019-09-28 20:50 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2019-09-28 20:50 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Andrew Morton

The pull request you sent on Sat, 28 Sep 2019 14:42:43 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f19e00ee84be14e840386cb4f3c0bda5b9cfb5ab

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2019-12-17 11:58 Ingo Molnar
  2019-12-17 19:20 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2019-12-17 11:58 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
	Andrew Morton

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: af164898482817a1d487964b68f3c21bae7a1beb x86/efi: Update e820 with reserved EFI boot services data to fix kexec breakage

Fix kexec booting with certain EFI memory map layouts.

 Thanks,

	Ingo

------------------>
Dave Young (1):
      x86/efi: Update e820 with reserved EFI boot services data to fix kexec breakage


 arch/x86/platform/efi/quirks.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index 7675cf754d90..f8f0220b6a66 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -260,10 +260,6 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
 		return;
 	}
 
-	/* No need to reserve regions that will never be freed. */
-	if (md.attribute & EFI_MEMORY_RUNTIME)
-		return;
-
 	size += addr % EFI_PAGE_SIZE;
 	size = round_up(size, EFI_PAGE_SIZE);
 	addr = round_down(addr, EFI_PAGE_SIZE);
@@ -293,6 +289,8 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
 	early_memunmap(new, new_size);
 
 	efi_memmap_install(new_phys, num_entries);
+	e820__range_update(addr, size, E820_TYPE_RAM, E820_TYPE_RESERVED);
+	e820__update_table(e820_table);
 }
 
 /*

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2019-12-17 11:58 Ingo Molnar
@ 2019-12-17 19:20 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2019-12-17 19:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Andrew Morton

The pull request you sent on Tue, 17 Dec 2019 12:58:35 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/9065e0636036e4f8a6f65f9c34ed384e4b776273

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2020-03-24  9:06 Ingo Molnar
  2020-03-24 17:15 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2020-03-24  9:06 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Peter Zijlstra

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

   # HEAD: 870b4333a62e45b0b2000d14b301b7b8b8cad9da x86/ioremap: Fix CONFIG_EFI=n build

A build fix with certain Kconfig combinations.

 Thanks,

	Ingo

------------------>
Borislav Petkov (1):
      x86/ioremap: Fix CONFIG_EFI=n build


 arch/x86/mm/ioremap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 935a91e1fd77..18c637c0dc6f 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -115,6 +115,9 @@ static void __ioremap_check_other(resource_size_t addr, struct ioremap_desc *des
 	if (!sev_active())
 		return;
 
+	if (!IS_ENABLED(CONFIG_EFI))
+		return;
+
 	if (efi_mem_type(addr) == EFI_RUNTIME_SERVICES_DATA)
 		desc->flags |= IORES_MAP_ENCRYPTED;
 }

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2020-03-24  9:06 Ingo Molnar
@ 2020-03-24 17:15 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2020-03-24 17:15 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra

The pull request you sent on Tue, 24 Mar 2020 10:06:27 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/3f3ee43a462344f6509bd15c988e39d330af91b3

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2020-04-02  9:51 Ingo Molnar
  2020-04-02 22:00 ` Linus Torvalds
  2020-04-02 22:45 ` pr-tracker-bot
  0 siblings, 2 replies; 79+ messages in thread
From: Ingo Molnar @ 2020-04-02  9:51 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
	Andrew Morton

Linus,

Please pull the latest x86/urgent git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2020-04-02

   # HEAD: 1651e700664b4597ddf4f8adfe435252a0d11277 x86: Fix bitops.h warning with a moved cast

A single fix addressing Sparse warnings. <asm/bitops.h> is changed non-trivially
to avoid the warnings, but generated code is not supposed to be affected.

Hopefully I got the Git tagging and the scripting around it right. :-)

The only slightly annoying part for the scripting was to extract the 
contents of the signed tag into the draft email, which I did with this 
rather inelegant hack:

 git tag -l --format='%(contents)' $TAG | gawk '/-----BEGIN PGP SIGNATURE-----/{exit;}//{print $0;}' | head -n -1

... but I couldn't find a better way.

I suspect Git is trying to gently tell me that I should be using
'git request-pull' instead of rolling my own, I guess? ;-)

 Thanks,

	Ingo

------------------>
Jesse Brandeburg (1):
      x86: Fix bitops.h warning with a moved cast


 arch/x86/include/asm/bitops.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index 062cdecb2f24..53f246e9df5a 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -54,7 +54,7 @@ arch_set_bit(long nr, volatile unsigned long *addr)
 	if (__builtin_constant_p(nr)) {
 		asm volatile(LOCK_PREFIX "orb %1,%0"
 			: CONST_MASK_ADDR(nr, addr)
-			: "iq" ((u8)CONST_MASK(nr))
+			: "iq" (CONST_MASK(nr) & 0xff)
 			: "memory");
 	} else {
 		asm volatile(LOCK_PREFIX __ASM_SIZE(bts) " %1,%0"
@@ -74,7 +74,7 @@ arch_clear_bit(long nr, volatile unsigned long *addr)
 	if (__builtin_constant_p(nr)) {
 		asm volatile(LOCK_PREFIX "andb %1,%0"
 			: CONST_MASK_ADDR(nr, addr)
-			: "iq" ((u8)~CONST_MASK(nr)));
+			: "iq" (CONST_MASK(nr) ^ 0xff));
 	} else {
 		asm volatile(LOCK_PREFIX __ASM_SIZE(btr) " %1,%0"
 			: : RLONG_ADDR(addr), "Ir" (nr) : "memory");

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2020-04-02  9:51 Ingo Molnar
@ 2020-04-02 22:00 ` Linus Torvalds
  2020-04-02 22:45 ` pr-tracker-bot
  1 sibling, 0 replies; 79+ messages in thread
From: Linus Torvalds @ 2020-04-02 22:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Andrew Morton

On Thu, Apr 2, 2020 at 2:51 AM Ingo Molnar <mingo@kernel.org> wrote:
>
> The only slightly annoying part for the scripting was to extract the
> contents of the signed tag into the draft email, which I did with this
> rather inelegant hack:
>
>  git tag -l --format='%(contents)' $TAG | gawk '/-----BEGIN PGP SIGNATURE-----/{exit;}//{print $0;}' | head -n -1
>
> ... but I couldn't find a better way.

Yeah, you're supposed to use the existing code, but I guess your
approach works too.

I think git request-pull just uses "git cat-file" instead to show the
tag contents, but yes, I guess you can use "git tag -l --format" too.

[ Goes and looks up ]

This is what git-request-pull does:

        git cat-file tag "$head" |
        sed -n -e '1,/^$/d' -e '/^-----BEGIN PGP /q' -e p

but admittedly "get cat-file" is a really low-level plumbing thing.
It's basically how you get the raw data out of any git object.

                 Linus

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2020-04-02  9:51 Ingo Molnar
  2020-04-02 22:00 ` Linus Torvalds
@ 2020-04-02 22:45 ` pr-tracker-bot
  1 sibling, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2020-04-02 22:45 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Andrew Morton

The pull request you sent on Thu, 2 Apr 2020 11:51:26 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2020-04-02

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f14a9532ee30c68a56ff502c382860f674cc180c

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2020-08-02 19:17 Ingo Molnar
  2020-08-02 20:15 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2020-08-02 19:17 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
	Andrew Morton

Linus,

Please pull the latest x86/urgent git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2020-08-02

   # HEAD: bdd65589593edd79b6a12ce86b3b7a7c6dae5208 x86/i8259: Use printk_deferred() to prevent deadlock

A single fix for a potential deadlock when printing a message about spurious interrupts.

 Thanks,

	Ingo

------------------>
Thomas Gleixner (1):
      x86/i8259: Use printk_deferred() to prevent deadlock


 arch/x86/kernel/i8259.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
index f3c76252247d..282b4ee1339f 100644
--- a/arch/x86/kernel/i8259.c
+++ b/arch/x86/kernel/i8259.c
@@ -207,7 +207,7 @@ static void mask_and_ack_8259A(struct irq_data *data)
 		 * lets ACK and report it. [once per IRQ]
 		 */
 		if (!(spurious_irq_mask & irqmask)) {
-			printk(KERN_DEBUG
+			printk_deferred(KERN_DEBUG
 			       "spurious 8259A interrupt: IRQ%d.\n", irq);
 			spurious_irq_mask |= irqmask;
 		}

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2020-08-02 19:17 Ingo Molnar
@ 2020-08-02 20:15 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2020-08-02 20:15 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Andrew Morton

The pull request you sent on Sun, 2 Aug 2020 21:17:45 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2020-08-02

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5a30a78924ecd97b0335d2e1d3e01a5023c1a3d8

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2022-08-13 10:40 Ingo Molnar
  2022-08-13 21:48 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2022-08-13 10:40 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
	Dave Hansen, H. Peter Anvin, x86

Linus,

Please pull the latest x86/urgent git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2022-08-13

   # HEAD: e6cfcdda8cbe81eaf821c897369a65fec987b404 x86/bugs: Enable STIBP for IBPB mitigated RETBleed

Fix the "IBPB mitigated RETBleed" mode of operation on AMD CPUs
(not turned on by default), which also need STIBP enabled (if
available) to be '100% safe' on even the shortest speculation
windows.

 Thanks,

	Ingo

------------------>
Kim Phillips (1):
      x86/bugs: Enable STIBP for IBPB mitigated RETBleed


 Documentation/admin-guide/kernel-parameters.txt | 29 ++++++++++++++++++-------
 arch/x86/kernel/cpu/bugs.c                      | 10 +++++----
 2 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 5e9147fe8968..523b19624026 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5209,20 +5209,33 @@
 			Speculative Code Execution with Return Instructions)
 			vulnerability.
 
+			AMD-based UNRET and IBPB mitigations alone do not stop
+			sibling threads from influencing the predictions of other
+			sibling threads. For that reason, STIBP is used on pro-
+			cessors that support it, and mitigate SMT on processors
+			that don't.
+
 			off          - no mitigation
 			auto         - automatically select a migitation
 			auto,nosmt   - automatically select a mitigation,
 				       disabling SMT if necessary for
 				       the full mitigation (only on Zen1
 				       and older without STIBP).
-			ibpb	     - mitigate short speculation windows on
-				       basic block boundaries too. Safe, highest
-				       perf impact.
-			unret        - force enable untrained return thunks,
-				       only effective on AMD f15h-f17h
-				       based systems.
-			unret,nosmt  - like unret, will disable SMT when STIBP
-			               is not available.
+			ibpb         - On AMD, mitigate short speculation
+				       windows on basic block boundaries too.
+				       Safe, highest perf impact. It also
+				       enables STIBP if present. Not suitable
+				       on Intel.
+			ibpb,nosmt   - Like "ibpb" above but will disable SMT
+				       when STIBP is not available. This is
+				       the alternative for systems which do not
+				       have STIBP.
+			unret        - Force enable untrained return thunks,
+				       only effective on AMD f15h-f17h based
+				       systems.
+			unret,nosmt  - Like unret, but will disable SMT when STIBP
+				       is not available. This is the alternative for
+				       systems which do not have STIBP.
 
 			Selecting 'auto' will choose a mitigation method at run
 			time according to the CPU.
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 6761668100b9..d50686ca5870 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -152,7 +152,7 @@ void __init check_bugs(void)
 	/*
 	 * spectre_v2_user_select_mitigation() relies on the state set by
 	 * retbleed_select_mitigation(); specifically the STIBP selection is
-	 * forced for UNRET.
+	 * forced for UNRET or IBPB.
 	 */
 	spectre_v2_user_select_mitigation();
 	ssb_select_mitigation();
@@ -1179,7 +1179,8 @@ spectre_v2_user_select_mitigation(void)
 	    boot_cpu_has(X86_FEATURE_AMD_STIBP_ALWAYS_ON))
 		mode = SPECTRE_V2_USER_STRICT_PREFERRED;
 
-	if (retbleed_mitigation == RETBLEED_MITIGATION_UNRET) {
+	if (retbleed_mitigation == RETBLEED_MITIGATION_UNRET ||
+	    retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
 		if (mode != SPECTRE_V2_USER_STRICT &&
 		    mode != SPECTRE_V2_USER_STRICT_PREFERRED)
 			pr_info("Selecting STIBP always-on mode to complement retbleed mitigation\n");
@@ -2320,10 +2321,11 @@ static ssize_t srbds_show_state(char *buf)
 
 static ssize_t retbleed_show_state(char *buf)
 {
-	if (retbleed_mitigation == RETBLEED_MITIGATION_UNRET) {
+	if (retbleed_mitigation == RETBLEED_MITIGATION_UNRET ||
+	    retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
 	    if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
 		boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
-		    return sprintf(buf, "Vulnerable: untrained return thunk on non-Zen uarch\n");
+		    return sprintf(buf, "Vulnerable: untrained return thunk / IBPB on non-AMD based uarch\n");
 
 	    return sprintf(buf, "%s; SMT %s\n",
 			   retbleed_strings[retbleed_mitigation],

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2022-08-13 10:40 Ingo Molnar
@ 2022-08-13 21:48 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2022-08-13 21:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Peter Zijlstra, Dave Hansen, H. Peter Anvin, x86

The pull request you sent on Sat, 13 Aug 2022 12:40:03 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2022-08-13

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/c5f1e32e323157c71eacc6fe087db8d586ff6cb5

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2023-09-02 10:24 Ingo Molnar
  2023-09-02 16:13 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2023-09-02 10:24 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Dave Hansen,
	Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

Linus,

Please pull the latest x86/urgent git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2023-09-02

   # HEAD: 6ea7bb00c1ba180f8bf8320b8d59b532501c5271 selftests/x86: Update map_shadow_stack syscall nr

Fix __NR_map_shadow_stack syscall-renumbering fallout in the
x86 self-test code.

[ Arguably the existing code was unnecessarily fragile, and
  tooling should have picked up the new syscall number,
  and a wider fix is being worked on - but meanwhile, let's
  not have the old syscall number in the kernel tree. ]

 Thanks,

	Ingo

------------------>
Rick Edgecombe (1):
      selftests/x86: Update map_shadow_stack syscall nr


 tools/testing/selftests/x86/test_shadow_stack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/x86/test_shadow_stack.c b/tools/testing/selftests/x86/test_shadow_stack.c
index 2188968674cb..757e6527f67e 100644
--- a/tools/testing/selftests/x86/test_shadow_stack.c
+++ b/tools/testing/selftests/x86/test_shadow_stack.c
@@ -40,7 +40,7 @@
  * without building the headers.
  */
 #ifndef __NR_map_shadow_stack
-#define __NR_map_shadow_stack	452
+#define __NR_map_shadow_stack	453
 
 #define SHADOW_STACK_SET_TOKEN	(1ULL << 0)
 

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2023-09-02 10:24 Ingo Molnar
@ 2023-09-02 16:13 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2023-09-02 16:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Dave Hansen, Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

The pull request you sent on Sat, 2 Sep 2023 12:24:30 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2023-09-02

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/fdde6187804782dce49c78d00e04bac6535628c7

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86/cleanups for v6.14
@ 2025-01-21  7:28 Ingo Molnar
  2025-01-21  7:34 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 79+ messages in thread
From: Ingo Molnar @ 2025-01-21  7:28 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, the arch/x86 maintainers

Linus,

Please pull the latest x86/cleanups Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cleanups-2025-01-21

   # HEAD: 0094014be0cd75273ef7f2934c17fb8cffd4db6e x86/ioapic: Remove a stray tab in the IO-APIC type string

Miscellaneous x86 cleanups and typo fixes, and also the removal
of the "disablelapic" boot parameter.

 Thanks,

	Ingo

------------------>
Alan Song (1):
      x86/ioapic: Remove a stray tab in the IO-APIC type string

Baoquan He (2):
      x86/ioremap: Simplify setup_data mapping variants
      x86/ioremap: Remove unused size parameter in remapping functions

Borislav Petkov (AMD) (5):
      x86/boot/compressed: Remove unused header includes from kaslr.c
      Documentation: Merge x86-specific boot options doc into kernel-parameters.txt
      x86/apic: Remove "disablelapic" cmdline option
      Documentation/kernel-parameters: Fix a typo in kvm.enable_virt_at_load text
      x86/cpufeatures: Remove "AMD" from the comments to the AMD-specific leaf

Raag Jadav (1):
      x86/cpu: Fix typo in x86_match_cpu()'s doc


 Documentation/admin-guide/kernel-parameters.rst    |   3 -
 Documentation/admin-guide/kernel-parameters.txt    | 239 +++++++++++++++-
 Documentation/arch/x86/x86_64/boot-options.rst     | 312 ---------------------
 .../arch/x86/x86_64/fake-numa-for-cpusets.rst      |   2 +-
 Documentation/arch/x86/x86_64/index.rst            |   1 -
 arch/x86/Kconfig.debug                             |   2 +-
 arch/x86/boot/compressed/kaslr.c                   |   4 -
 arch/x86/include/asm/cpufeatures.h                 |  12 +-
 arch/x86/kernel/apic/apic.c                        |   9 +-
 arch/x86/kernel/apic/io_apic.c                     |   2 +-
 arch/x86/kernel/cpu/match.c                        |   2 +-
 arch/x86/kernel/cpu/topology.c                     |   2 +-
 arch/x86/kernel/pci-dma.c                          |   4 -
 arch/x86/mm/ioremap.c                              | 117 +++-----
 14 files changed, 277 insertions(+), 434 deletions(-)
 delete mode 100644 Documentation/arch/x86/x86_64/boot-options.rst

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86/cleanups for v6.14
  2025-01-21  7:28 [GIT PULL] x86/cleanups for v6.14 Ingo Molnar
@ 2025-01-21  7:34 ` Ingo Molnar
  2025-01-21 11:31   ` Borislav Petkov
  2025-01-21 19:40 ` pr-tracker-bot
  2025-01-21 21:29 ` [GIT PULL] x86/boot enhancements " Ingo Molnar
  2 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2025-01-21  7:34 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, the arch/x86 maintainers


* Ingo Molnar <mingo@kernel.org> wrote:

> Linus,
> 
> Please pull the latest x86/cleanups Git tree from:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cleanups-2025-01-21
> 
>    # HEAD: 0094014be0cd75273ef7f2934c17fb8cffd4db6e x86/ioapic: Remove a stray tab in the IO-APIC type string
> 
> Miscellaneous x86 cleanups and typo fixes, and also the removal
> of the "disablelapic" boot parameter.

Merge note: if you've pulled x86/sev from Boris already, then there 
will be a new conflict in arch/x86/include/asm/cpufeatures.h due to 
overlapping (but compatible) changes to the same lines of code.

My conflict resolution is below, for reference.

Thanks,

	Ingo

=======================>

    Merge branch 'x86/cleanups' into tmp.tmp
    
     Conflicts:
            arch/x86/include/asm/cpufeatures.h
    
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

diff --cc arch/x86/include/asm/cpufeatures.h
index 8b55685255d6,09e1e54676f4..9746e75a1866
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@@ -443,18 -443,15 +443,18 @@@
  #define X86_FEATURE_SPEC_CTRL_SSBD	(18*32+31) /* Speculative Store Bypass Disable */
  
  /* AMD-defined memory encryption features, CPUID level 0x8000001f (EAX), word 19 */
- #define X86_FEATURE_SME			(19*32+ 0) /* "sme" AMD Secure Memory Encryption */
- #define X86_FEATURE_SEV			(19*32+ 1) /* "sev" AMD Secure Encrypted Virtualization */
+ #define X86_FEATURE_SME			(19*32+ 0) /* "sme" Secure Memory Encryption */
+ #define X86_FEATURE_SEV			(19*32+ 1) /* "sev" Secure Encrypted Virtualization */
  #define X86_FEATURE_VM_PAGE_FLUSH	(19*32+ 2) /* VM Page Flush MSR is supported */
- #define X86_FEATURE_SEV_ES		(19*32+ 3) /* "sev_es" AMD Secure Encrypted Virtualization - Encrypted State */
- #define X86_FEATURE_SEV_SNP		(19*32+ 4) /* "sev_snp" AMD Secure Encrypted Virtualization - Secure Nested Paging */
+ #define X86_FEATURE_SEV_ES		(19*32+ 3) /* "sev_es" Secure Encrypted Virtualization - Encrypted State */
+ #define X86_FEATURE_SEV_SNP		(19*32+ 4) /* "sev_snp" Secure Encrypted Virtualization - Secure Nested Paging */
  #define X86_FEATURE_V_TSC_AUX		(19*32+ 9) /* Virtual TSC_AUX */
- #define X86_FEATURE_SME_COHERENT	(19*32+10) /* AMD hardware-enforced cache coherency */
- #define X86_FEATURE_DEBUG_SWAP		(19*32+14) /* "debug_swap" AMD SEV-ES full debug state swap support */
+ #define X86_FEATURE_SME_COHERENT	(19*32+10) /* hardware-enforced cache coherency */
+ #define X86_FEATURE_DEBUG_SWAP		(19*32+14) /* "debug_swap" SEV-ES full debug state swap support */
 +#define X86_FEATURE_RMPREAD		(19*32+21) /* RMPREAD instruction */
 +#define X86_FEATURE_SEGMENTED_RMP	(19*32+23) /* Segmented RMP support */
  #define X86_FEATURE_SVSM		(19*32+28) /* "svsm" SVSM present */
 +#define X86_FEATURE_HV_INUSE_WR_ALLOWED	(19*32+30) /* Allow Write to in-use hypervisor-owned pages */
  
  /* AMD-defined Extended Feature 2 EAX, CPUID level 0x80000021 (EAX), word 20 */
  #define X86_FEATURE_NO_NESTED_DATA_BP	(20*32+ 0) /* No Nested Data Breakpoints */

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86/cleanups for v6.14
  2025-01-21  7:34 ` Ingo Molnar
@ 2025-01-21 11:31   ` Borislav Petkov
  0 siblings, 0 replies; 79+ messages in thread
From: Borislav Petkov @ 2025-01-21 11:31 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linus Torvalds, linux-kernel, the arch/x86 maintainers

On Tue, Jan 21, 2025 at 08:34:29AM +0100, Ingo Molnar wrote:
> Merge note: if you've pulled x86/sev from Boris already, then there

Right, FWIW, I try to merge the branches locally here in the same order we
send them to Linus so that I can anticipate any merge conflicts.

> will be a new conflict in arch/x86/include/asm/cpufeatures.h due to 
> overlapping (but compatible) changes to the same lines of code.
> 
> My conflict resolution is below, for reference.

And yes, I can confirm the same resolution I've been doing here too.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86/cleanups for v6.14
  2025-01-21  7:28 [GIT PULL] x86/cleanups for v6.14 Ingo Molnar
  2025-01-21  7:34 ` Ingo Molnar
@ 2025-01-21 19:40 ` pr-tracker-bot
  2025-01-21 21:29 ` [GIT PULL] x86/boot enhancements " Ingo Molnar
  2 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2025-01-21 19:40 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linus Torvalds, linux-kernel, the arch/x86 maintainers

The pull request you sent on Tue, 21 Jan 2025 08:28:27 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cleanups-2025-01-21

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/858df1de2158bd7ab88d31b557592e990bacc0b5

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86/boot enhancements for v6.14
  2025-01-21  7:28 [GIT PULL] x86/cleanups for v6.14 Ingo Molnar
  2025-01-21  7:34 ` Ingo Molnar
  2025-01-21 19:40 ` pr-tracker-bot
@ 2025-01-21 21:29 ` Ingo Molnar
  2025-01-24 14:06   ` pr-tracker-bot
  2025-01-27  3:18   ` Linus Torvalds
  2 siblings, 2 replies; 79+ messages in thread
From: Ingo Molnar @ 2025-01-21 21:29 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, the arch/x86 maintainers, David Woodhouse,
	Ard Biesheuvel, Peter Zijlstra, H. Peter Anvin

Linus,

Please pull the latest x86/boot Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-boot-2025-01-21

   # HEAD: cf4ca80650908628bf1c0c29e3fd236b1915d789 x86/sev: Disable ftrace branch profiling in SEV startup code

   MERGE NOTE: there will be a new conflict when pulling this tree, due to
   overlapping additions to arch/x86/include/asm/sev-common.h. My resolution
   was to advance the Linux-internal enumeration of reason codes, in merge order:

     #define GHCB_TERM_SECURE_TSC		10	/* Secure TSC initialization failed */
     #define GHCB_TERM_SVSM_CA_REMAP_FAIL	11	/* SVSM is present but CA could not be remapped */

x86/boot changes for v6.14:

 - A large and involved preparatory series to pave the way to add 
   exception handling for relocate_kernel - which will be a debugging 
   facility that has aided in the field to debug an exceptionally hard 
   to debug early boot bug. Plus assorted cleanups and fixes that were 
   discovered along the way, by David Woodhouse:

      - Clean up and document register use in relocate_kernel_64.S
      - Use named labels in swap_pages in relocate_kernel_64.S
      - Only swap pages for ::preserve_context mode
      - Allocate PGD for x86_64 transition page tables separately
      - Copy control page into place in machine_kexec_prepare()
      - Invoke copy of relocate_kernel() instead of the original
      - Move relocate_kernel to kernel .data section
      - Add data section to relocate_kernel
      - Drop page_list argument from relocate_kernel()
      - Eliminate writes through kernel mapping of relocate_kernel page
      - Clean up register usage in relocate_kernel()
      - Mark relocate_kernel page as ROX instead of RWX
      - Disable global pages before writing to control page
      - Ensure preserve_context flag is set on return to kernel
      - Use correct swap page in swap_pages function
      - Fix stack and handling of re-entry point for ::preserve_context
      - Mark machine_kexec() with __nocfi
      - Cope with relocate_kernel() not being at the start of the page
      - Use typedef for relocate_kernel_fn function prototype
      - Fix location of relocate_kernel with -ffunction-sections (fix by Nathan Chancellor)

 - A series to remove the last remaining absolute symbol references from
   .head.text, and enforce this at build time, by Ard Biesheuvel:

      - Avoid WARN()s and panic()s in early boot code
      - Don't hang but terminate on failure to remap SVSM CA
      - Determine VA/PA offset before entering C code
      - Avoid intentional absolute symbol references in .head.text
      - Disable UBSAN in early boot code
      - Move ENTRY_TEXT to the start of the image
      - Move .head.text into its own output section
      - Reject absolute references in .head.text

 - Which build-time enforcement uncovered a handful of bugs of essentially
   non-working code, and a wrokaround for a toolchain bug, fixed by
   Ard Biesheuvel as well:

      - Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12
      - Disable UBSAN on SEV code that may execute very early
      - Disable ftrace branch profiling in SEV startup code

 - And miscellaneous cleanups:

       - kexec_core: Add and update comments regarding the KEXEC_JUMP flow (Rafael J. Wysocki)
       - x86/sysfs: Constify 'struct bin_attribute' (Thomas Weißschuh)

Signed-off-by: Ingo Molnar <mingo@kernel.org>

Ard Biesheuvel (11):
      x86/sev: Avoid WARN()s and panic()s in early boot code
      x86/boot/64: Determine VA/PA offset before entering C code
      x86/boot/64: Avoid intentional absolute symbol references in .head.text
      x86/boot: Disable UBSAN in early boot code
      x86/kernel: Move ENTRY_TEXT to the start of the image
      x86/boot: Move .head.text into its own output section
      x86/boot: Reject absolute references in .head.text
      x86/boot/64: Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12
      x86/sev: Disable UBSAN on SEV code that may execute very early
      x86/sev: Don't hang but terminate on failure to remap SVSM CA
      x86/sev: Disable ftrace branch profiling in SEV startup code

David Woodhouse (19):
      x86/kexec: Clean up and document register use in relocate_kernel_64.S
      x86/kexec: Use named labels in swap_pages in relocate_kernel_64.S
      x86/kexec: Only swap pages for ::preserve_context mode
      x86/kexec: Allocate PGD for x86_64 transition page tables separately
      x86/kexec: Copy control page into place in machine_kexec_prepare()
      x86/kexec: Invoke copy of relocate_kernel() instead of the original
      x86/kexec: Move relocate_kernel to kernel .data section
      x86/kexec: Add data section to relocate_kernel
      x86/kexec: Drop page_list argument from relocate_kernel()
      x86/kexec: Eliminate writes through kernel mapping of relocate_kernel page
      x86/kexec: Clean up register usage in relocate_kernel()
      x86/kexec: Mark relocate_kernel page as ROX instead of RWX
      x86/kexec: Disable global pages before writing to control page
      x86/kexec: Ensure preserve_context flag is set on return to kernel
      x86/kexec: Use correct swap page in swap_pages function
      x86/kexec: Fix stack and handling of re-entry point for ::preserve_context
      x86/kexec: Mark machine_kexec() with __nocfi
      x86/kexec: Cope with relocate_kernel() not being at the start of the page
      x86/kexec: Use typedef for relocate_kernel_fn function prototype

Ingo Molnar (1):
      Merge branch 'x86/urgent' into x86/boot, to pick up dependent fixes

Nathan Chancellor (1):
      x86/kexec: Fix location of relocate_kernel with -ffunction-sections

Rafael J. Wysocki (1):
      kexec_core: Add and update comments regarding the KEXEC_JUMP flow

Thomas Weißschuh (1):
      x86/sysfs: Constify 'struct bin_attribute'

 arch/x86/coco/sev/Makefile           |   3 +
 arch/x86/coco/sev/core.c             |  15 ++-
 arch/x86/coco/sev/shared.c           |  16 +--
 arch/x86/include/asm/init.h          |   2 +-
 arch/x86/include/asm/kexec.h         |  54 +++++-----
 arch/x86/include/asm/sections.h      |   1 +
 arch/x86/include/asm/setup.h         |   2 +-
 arch/x86/include/asm/sev-common.h    |   1 +
 arch/x86/kernel/callthunks.c         |   6 ++
 arch/x86/kernel/head64.c             |  40 +++++---
 arch/x86/kernel/head_64.S            |  12 ++-
 arch/x86/kernel/ksysfs.c             |  18 ++--
 arch/x86/kernel/machine_kexec_32.c   |   7 +-
 arch/x86/kernel/machine_kexec_64.c   |  95 ++++++++++-------
 arch/x86/kernel/relocate_kernel_64.S | 193 +++++++++++++++++++----------------
 arch/x86/kernel/vmlinux.lds.S        |  45 +++++---
 arch/x86/tools/relocs.c              |   8 +-
 kernel/kexec_core.c                  |  23 +++--
 18 files changed, 317 insertions(+), 224 deletions(-)

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86/boot enhancements for v6.14
  2025-01-21 21:29 ` [GIT PULL] x86/boot enhancements " Ingo Molnar
@ 2025-01-24 14:06   ` pr-tracker-bot
  2025-01-27  3:18   ` Linus Torvalds
  1 sibling, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2025-01-24 14:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, the arch/x86 maintainers,
	David Woodhouse, Ard Biesheuvel, Peter Zijlstra, H. Peter Anvin

The pull request you sent on Tue, 21 Jan 2025 22:29:29 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-boot-2025-01-21

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5b7f7234ff18a5f48e0d36c417a0d07c7fdfc61a

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86/boot enhancements for v6.14
  2025-01-21 21:29 ` [GIT PULL] x86/boot enhancements " Ingo Molnar
  2025-01-24 14:06   ` pr-tracker-bot
@ 2025-01-27  3:18   ` Linus Torvalds
  2025-01-27 10:20     ` [PATCH] Revert "x86/boot: Reject absolute references in .head.text Ingo Molnar
                       ` (2 more replies)
  1 sibling, 3 replies; 79+ messages in thread
From: Linus Torvalds @ 2025-01-27  3:18 UTC (permalink / raw)
  To: Ingo Molnar, Ard Biesheuvel
  Cc: linux-kernel, the arch/x86 maintainers, David Woodhouse,
	Peter Zijlstra, H. Peter Anvin

On Tue, 21 Jan 2025 at 13:29, Ingo Molnar <mingo@kernel.org> wrote:
>
> - A series to remove the last remaining absolute symbol references from
>   .head.text, and enforce this at build time, by Ard Biesheuvel:
> [...]
>  - Which build-time enforcement uncovered a handful of bugs of essentially
>    non-working code, and a wrokaround for a toolchain bug, fixed by
>    Ard Biesheuvel as well:
>
>       - Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12
>       - Disable UBSAN on SEV code that may execute very early
>       - Disable ftrace branch profiling in SEV startup code

Bah. I only noticed this today, because I was on the road part of the
week and didn't do my usual "build with clang".

But this is broken with my normal clang config, and I get a very
unhelpful error message:

    Absolute reference to symbol '.rodata' not permitted in .head.text

and I have no idea why, or where it comes from.  And that error
message doesn't specify enough information for me to even *guess* at
what's going on.

And bisecting it obviously just points at faf0ed487415 ("x86/boot:
Reject absolute references in .head.text"), since it's just a random
new check for an old issue.

New random rule, with new random error as a result, and totally opaque
to anybody else than Ard.

Useless crap, in other words.

Why isn't the fix a revert? Because that error message is really bad.
It needs to tell me where things went wrong, not just a "You're effed.
Ha! Ha!".

And to add insult to injury, all of this is done in-place on the
vmlinux file, so when it all fails, make does

    make[2]: *** Deleting file 'vmlinux'

and doesn't even leave behind anything to look at.

So I really think this was all horribly badly done.

Anyway, not know what the right thing to do is, I hacked up the
makefiles to squirrel off a copy of the vmlinux file, and did

        objdump --no-addresses --no-show-raw-insn \
                -j .head.text --disassemble \
                -rR ORIGINAL  | less -S

and sure enough, it shows things like this:

  <snp_cpuid>:
        push   %rbp
        push   %r15
        push   %r14
        push   %rbx
        sub    $0x18,%rsp
        lea    0x5ac8fb(%rip),%r8        # <cpuid_table_copy>
                        R_X86_64_PC32   .rodata+0x4f1758
        mov    (%r8),%eax
        test   %eax,%eax
    ..
        lea    0x5ac841(%rip),%rax        # <cpuid_std_range_max>
                        R_X86_64_PC32   .rodata+0x4f174c
    ..
        jmp    *-0x7dfffe90(,%r9,8)
                        R_X86_64_32S    .rodata+0x170
    ..

and

  <snp_init>:
        push   %rbp
        push   %r15
        push   %r14
        push   %r12
    ..
        mov    %rax,0x5ac3bb(%rip)        # <secrets_pa>
                        R_X86_64_PC32   .rodata+0x4f173c
        mov    0x18(%r15),%rsi
        test   %rsi,%rsi
    ..

and

  <pvalidate_4k_page>:
        push   %rbx
        sub    $0x60,%rsp
        lea    0x5ac0c4(%rip),%rax        # <snp_vmpl>
   ..
        test   $0x4,%cl
        jne    <pvalidate_4k_page+0xad>
        lea    0x5ac068(%rip),%rax        # <boot_svsm_caa>
                        R_X86_64_PC32   .rodata+0x4f1744
        mov    (%rax),%rax
        jmp    <pvalidate_4k_page+0xb8>
    ..

so those relocs to rodata most definitely exist.

Anyway, that check needs to either

 (a) die a painful death very quickly

 (b) be made to actually print out useful information of WHERE the
relocation comes from and WHERE it points to

because the current implementation of that check is not acceptable.

The next time I have to play makefile games and then do objdump by
hand to figure out what the %^$% the build is complaining about, I'm
just reverting it outright and not writing this long explanation of
the problem.

                  Linus

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [PATCH] Revert "x86/boot: Reject absolute references in .head.text
  2025-01-27  3:18   ` Linus Torvalds
@ 2025-01-27 10:20     ` Ingo Molnar
  2025-01-27 15:54       ` [GIT PULL] x86 fix Ingo Molnar
  2025-01-27 10:25     ` [tip: x86/urgent] Revert "x86/boot: Reject absolute references in .head.text" tip-bot2 for Ingo Molnar
  2025-01-27 11:12     ` [GIT PULL] x86/boot enhancements for v6.14 Ard Biesheuvel
  2 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2025-01-27 10:20 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ard Biesheuvel, linux-kernel, the arch/x86 maintainers,
	David Woodhouse, Peter Zijlstra, H. Peter Anvin


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Tue, 21 Jan 2025 at 13:29, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > - A series to remove the last remaining absolute symbol references from
> >   .head.text, and enforce this at build time, by Ard Biesheuvel:
> > [...]
> >  - Which build-time enforcement uncovered a handful of bugs of essentially
> >    non-working code, and a wrokaround for a toolchain bug, fixed by
> >    Ard Biesheuvel as well:
> >
> >       - Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12
> >       - Disable UBSAN on SEV code that may execute very early
> >       - Disable ftrace branch profiling in SEV startup code
> 
> Bah. I only noticed this today, because I was on the road part of the
> week and didn't do my usual "build with clang".
> 
> But this is broken with my normal clang config, and I get a very
> unhelpful error message:
> 
>     Absolute reference to symbol '.rodata' not permitted in .head.text
> 
> and I have no idea why, or where it comes from.  And that error
> message doesn't specify enough information for me to even *guess* at
> what's going on.
> 
> And bisecting it obviously just points at faf0ed487415 ("x86/boot:
> Reject absolute references in .head.text"), since it's just a random
> new check for an old issue.
> 
> New random rule, with new random error as a result, and totally opaque
> to anybody else than Ard.
> 
> Useless crap, in other words.
> 
> Why isn't the fix a revert? Because that error message is really bad.
> It needs to tell me where things went wrong, not just a "You're effed.
> Ha! Ha!".
> 
> And to add insult to injury, all of this is done in-place on the
> vmlinux file, so when it all fails, make does
> 
>     make[2]: *** Deleting file 'vmlinux'
> 
> and doesn't even leave behind anything to look at.

Sorry about that - I was really hoping we'd never see this arguably 
maximally passive-aggressive message and build failure, as the patch 
has lived in -next for 1.5 months, but here we go ...

> Anyway, that check needs to either
> 
>  (a) die a painful death very quickly
> 
>  (b) be made to actually print out useful information of WHERE the
> relocation comes from and WHERE it points to

I'd go for (a)+(b): I've queued up a revert which I'll send to you in a 
few hours, so (b) can be done properly. Also feel free to queue up the 
revert directly:

  Acked-by: Ingo Molnar <mingo@kernel.org>

I'd even argue that (b) should first be a non-fatal and 100% helpful 
message in a standard build warning format so that CI bots pick it up, 
and then in a kernel release or two we can do (c) that does the hard 
build failure ...

Thanks,

	Ingo

===========================>
From: Ingo Molnar <mingo@kernel.org>
Date: Mon, 27 Jan 2025 11:08:14 +0100
Subject: [PATCH] Revert "x86/boot: Reject absolute references in .head.text"

This reverts commit faf0ed487415f76fe4acf7980ce360901f5e1698.

As Linus reported, the hard build failure is entirely unhelpful
in tracking down the bug:

	Absolute reference to symbol '.rodata' not permitted in .head.text

... and to add insult to injury, the offending vmlinux gets deleted,
making it hard to figure out what's going on ...

So revert this until a (much) more developer-friendly version
is merged.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/CAHk-=wj7k9nvJn6cpa3-5Ciwn2RGyE605BMkjWE4MqnvC9E92A@mail.gmail.com
---
 arch/x86/tools/relocs.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index e937be979ec8..27441e5863b2 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -841,10 +841,10 @@ static int is_percpu_sym(ElfW(Sym) *sym, const char *symname)
 static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
 		      const char *symname)
 {
-	int headtext = !strcmp(sec_name(sec->shdr.sh_info), ".head.text");
 	unsigned r_type = ELF64_R_TYPE(rel->r_info);
 	ElfW(Addr) offset = rel->r_offset;
 	int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname);
+
 	if (sym->st_shndx == SHN_UNDEF)
 		return 0;
 
@@ -900,12 +900,6 @@ static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
 			break;
 		}
 
-		if (headtext) {
-			die("Absolute reference to symbol '%s' not permitted in .head.text\n",
-			    symname);
-			break;
-		}
-
 		/*
 		 * Relocation offsets for 64 bit kernels are output
 		 * as 32 bits and sign extended back to 64 bits when

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [tip: x86/urgent] Revert "x86/boot: Reject absolute references in .head.text"
  2025-01-27  3:18   ` Linus Torvalds
  2025-01-27 10:20     ` [PATCH] Revert "x86/boot: Reject absolute references in .head.text Ingo Molnar
@ 2025-01-27 10:25     ` tip-bot2 for Ingo Molnar
  2025-01-27 11:12     ` [GIT PULL] x86/boot enhancements for v6.14 Ard Biesheuvel
  2 siblings, 0 replies; 79+ messages in thread
From: tip-bot2 for Ingo Molnar @ 2025-01-27 10:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Linus Torvalds, Ard Biesheuvel, Ingo Molnar, x86, linux-kernel

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     fb1102a09a3b6710ac1e033690f0283696dc94dc
Gitweb:        https://git.kernel.org/tip/fb1102a09a3b6710ac1e033690f0283696dc94dc
Author:        Ingo Molnar <mingo@kernel.org>
AuthorDate:    Mon, 27 Jan 2025 11:08:14 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 27 Jan 2025 11:08:14 +01:00

Revert "x86/boot: Reject absolute references in .head.text"

This reverts commit faf0ed487415f76fe4acf7980ce360901f5e1698.

As Linus reported, the hard build failure is entirely unhelpful
in tracking down the bug:

	Absolute reference to symbol '.rodata' not permitted in .head.text

... and to add insult to injury, the offending vmlinux gets deleted,
making it hard to figure out what's going on ...

So revert this until a (much) more developer-friendly version
is merged.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/CAHk-=wj7k9nvJn6cpa3-5Ciwn2RGyE605BMkjWE4MqnvC9E92A@mail.gmail.com
---
 arch/x86/tools/relocs.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index e937be9..27441e5 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -841,10 +841,10 @@ static int is_percpu_sym(ElfW(Sym) *sym, const char *symname)
 static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
 		      const char *symname)
 {
-	int headtext = !strcmp(sec_name(sec->shdr.sh_info), ".head.text");
 	unsigned r_type = ELF64_R_TYPE(rel->r_info);
 	ElfW(Addr) offset = rel->r_offset;
 	int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname);
+
 	if (sym->st_shndx == SHN_UNDEF)
 		return 0;
 
@@ -900,12 +900,6 @@ static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
 			break;
 		}
 
-		if (headtext) {
-			die("Absolute reference to symbol '%s' not permitted in .head.text\n",
-			    symname);
-			break;
-		}
-
 		/*
 		 * Relocation offsets for 64 bit kernels are output
 		 * as 32 bits and sign extended back to 64 bits when

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86/boot enhancements for v6.14
  2025-01-27  3:18   ` Linus Torvalds
  2025-01-27 10:20     ` [PATCH] Revert "x86/boot: Reject absolute references in .head.text Ingo Molnar
  2025-01-27 10:25     ` [tip: x86/urgent] Revert "x86/boot: Reject absolute references in .head.text" tip-bot2 for Ingo Molnar
@ 2025-01-27 11:12     ` Ard Biesheuvel
  2025-01-27 15:51       ` Ingo Molnar
  2 siblings, 1 reply; 79+ messages in thread
From: Ard Biesheuvel @ 2025-01-27 11:12 UTC (permalink / raw)
  To: Linus Torvalds, Nathan Chancellor
  Cc: Ingo Molnar, linux-kernel, the arch/x86 maintainers,
	David Woodhouse, Peter Zijlstra, H. Peter Anvin

(cc Nathan)

On Mon, 27 Jan 2025 at 04:19, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Tue, 21 Jan 2025 at 13:29, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > - A series to remove the last remaining absolute symbol references from
> >   .head.text, and enforce this at build time, by Ard Biesheuvel:
> > [...]
> >  - Which build-time enforcement uncovered a handful of bugs of essentially
> >    non-working code, and a wrokaround for a toolchain bug, fixed by
> >    Ard Biesheuvel as well:
> >
> >       - Fix spurious undefined reference when CONFIG_X86_5LEVEL=n, on GCC-12
> >       - Disable UBSAN on SEV code that may execute very early
> >       - Disable ftrace branch profiling in SEV startup code
>
> Bah. I only noticed this today, because I was on the road part of the
> week and didn't do my usual "build with clang".
>
> But this is broken with my normal clang config, and I get a very
> unhelpful error message:
>
>     Absolute reference to symbol '.rodata' not permitted in .head.text
>

Agreed. I'll change this to section+addend if the symbol is
STT_SECTION, and provide the offset into .head.text as well.

...

> Anyway, not know what the right thing to do is, I hacked up the
> makefiles to squirrel off a copy of the vmlinux file, and did
>
>         objdump --no-addresses --no-show-raw-insn \
>                 -j .head.text --disassemble \
>                 -rR ORIGINAL  | less -S
>
> and sure enough, it shows things like this:
>
>   <snp_cpuid>:
>         push   %rbp
>         push   %r15
>         push   %r14
>         push   %rbx
>         sub    $0x18,%rsp
>         lea    0x5ac8fb(%rip),%r8        # <cpuid_table_copy>
>                         R_X86_64_PC32   .rodata+0x4f1758
>         mov    (%r8),%eax
>         test   %eax,%eax
>     ..
>         lea    0x5ac841(%rip),%rax        # <cpuid_std_range_max>
>                         R_X86_64_PC32   .rodata+0x4f174c
>     ..
>         jmp    *-0x7dfffe90(,%r9,8)
>                         R_X86_64_32S    .rodata+0x170

So this should be the culprit - all the other references are
RIP-relative so those are fine.

I guess you are disabling retpolines and IBT in your Clang config?
This looks like the switch() in snp_cpuid_postprocess() being emitted
as a jump table.

This is another example of a pattern that is simply broken and
guaranteed to fail when booting this kernel as a SEV-SNP guest. So I
hope we agree that these issues should be detected at build time, and
it is only the quality of the diagnostic message that you are
objecting to?

> Anyway, that check needs to either
>
>  (a) die a painful death very quickly
>
>  (b) be made to actually print out useful information of WHERE the
> relocation comes from and WHERE it points to
>
> because the current implementation of that check is not acceptable.
>
> The next time I have to play makefile games and then do objdump by
> hand to figure out what the %^$% the build is complaining about, I'm
> just reverting it outright and not writing this long explanation of
> the problem.
>

Understood.

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86/boot enhancements for v6.14
  2025-01-27 11:12     ` [GIT PULL] x86/boot enhancements for v6.14 Ard Biesheuvel
@ 2025-01-27 15:51       ` Ingo Molnar
  0 siblings, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2025-01-27 15:51 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Linus Torvalds, Nathan Chancellor, linux-kernel,
	the arch/x86 maintainers, David Woodhouse, Peter Zijlstra,
	H. Peter Anvin


* Ard Biesheuvel <ardb@kernel.org> wrote:

> This is another example of a pattern that is simply broken and 
> guaranteed to fail when booting this kernel as a SEV-SNP guest. So I 
> hope we agree that these issues should be detected at build time, and 
> it is only the quality of the diagnostic message that you are 
> objecting to?

And I believe the fact that they are fatal messages is a problem - we 
should initially just emit (informative) warnings.

Note that in the above case 'SEV-SNP guest' is basically support for a 
niche usecase built into the kernel image, and in the vast majority of 
cases the kernel will boot and work just fine. We should not fail the 
build for breakage in a niche usecase, at least initially.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
  2025-01-27 10:20     ` [PATCH] Revert "x86/boot: Reject absolute references in .head.text Ingo Molnar
@ 2025-01-27 15:54       ` Ingo Molnar
  2025-01-27 17:10         ` Linus Torvalds
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2025-01-27 15:54 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ard Biesheuvel, linux-kernel, the arch/x86 maintainers,
	David Woodhouse, Peter Zijlstra, H. Peter Anvin

Linus,

Please pull the latest x86/urgent Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-01-27

   # HEAD: fb1102a09a3b6710ac1e033690f0283696dc94dc Revert "x86/boot: Reject absolute references in .head.text"

Fix a build regression on certain config and build environment
combinations that generate absolute references to symbols.

 Thanks,

	Ingo

------------------>
Ingo Molnar (1):
      Revert "x86/boot: Reject absolute references in .head.text"


 arch/x86/tools/relocs.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index e937be979ec8..27441e5863b2 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -841,10 +841,10 @@ static int is_percpu_sym(ElfW(Sym) *sym, const char *symname)
 static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
 		      const char *symname)
 {
-	int headtext = !strcmp(sec_name(sec->shdr.sh_info), ".head.text");
 	unsigned r_type = ELF64_R_TYPE(rel->r_info);
 	ElfW(Addr) offset = rel->r_offset;
 	int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname);
+
 	if (sym->st_shndx == SHN_UNDEF)
 		return 0;
 
@@ -900,12 +900,6 @@ static int do_reloc64(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym,
 			break;
 		}
 
-		if (headtext) {
-			die("Absolute reference to symbol '%s' not permitted in .head.text\n",
-			    symname);
-			break;
-		}
-
 		/*
 		 * Relocation offsets for 64 bit kernels are output
 		 * as 32 bits and sign extended back to 64 bits when

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2025-01-27 15:54       ` [GIT PULL] x86 fix Ingo Molnar
@ 2025-01-27 17:10         ` Linus Torvalds
  2025-01-28 22:19           ` Ingo Molnar
  0 siblings, 1 reply; 79+ messages in thread
From: Linus Torvalds @ 2025-01-27 17:10 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Ard Biesheuvel, linux-kernel, the arch/x86 maintainers,
	David Woodhouse, Peter Zijlstra, H. Peter Anvin

On Mon, 27 Jan 2025 at 07:54, Ingo Molnar <mingo@kernel.org> wrote:
>
> Fix a build regression on certain config and build environment
> combinations that generate absolute references to symbols.

I'll hold off on this, because it looks like Ard is very close to have
this fixed (and also made it non-fatal in the process).

               Linus

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
  2025-01-27 17:10         ` Linus Torvalds
@ 2025-01-28 22:19           ` Ingo Molnar
  2025-01-28 22:22             ` Ingo Molnar
  2025-01-28 22:39             ` pr-tracker-bot
  0 siblings, 2 replies; 79+ messages in thread
From: Ingo Molnar @ 2025-01-28 22:19 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ard Biesheuvel, linux-kernel, the arch/x86 maintainers,
	David Woodhouse, Peter Zijlstra, H. Peter Anvin


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Mon, 27 Jan 2025 at 07:54, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > Fix a build regression on certain config and build environment
> > combinations that generate absolute references to symbols.
> 
> I'll hold off on this, because it looks like Ard is very close to 
> have this fixed (and also made it non-fatal in the process).

Makes sense - meanwhile while Ard is iterating his build-warning patch 
here's the SEV fix that should address the build failure you've 
reported.

Please pull the latest x86/urgent Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-01-28

   # HEAD: 1105ab42a84bc11c62597005f78ccad2434fbd66 x86/sev: Disable jump tables in SEV startup code

Fix a build regression on certain config and build environment
combinations that generate absolute references to symbols.

 Thanks,

	Ingo

------------------>
Ard Biesheuvel (1):
      x86/sev: Disable jump tables in SEV startup code


 arch/x86/coco/sev/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/coco/sev/Makefile b/arch/x86/coco/sev/Makefile
index 08de37559307..dcb06dc8b5ae 100644
--- a/arch/x86/coco/sev/Makefile
+++ b/arch/x86/coco/sev/Makefile
@@ -2,6 +2,10 @@
 
 obj-y += core.o
 
+# jump tables are emitted using absolute references in non-PIC code
+# so they cannot be used in the early SEV startup code
+CFLAGS_core.o += -fno-jump-tables
+
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_core.o = -pg
 endif

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2025-01-28 22:19           ` Ingo Molnar
@ 2025-01-28 22:22             ` Ingo Molnar
  2025-01-28 22:39             ` pr-tracker-bot
  1 sibling, 0 replies; 79+ messages in thread
From: Ingo Molnar @ 2025-01-28 22:22 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ard Biesheuvel, linux-kernel, the arch/x86 maintainers,
	David Woodhouse, Peter Zijlstra, H. Peter Anvin


* Ingo Molnar <mingo@kernel.org> wrote:

> 
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
> 
> > On Mon, 27 Jan 2025 at 07:54, Ingo Molnar <mingo@kernel.org> wrote:
> > >
> > > Fix a build regression on certain config and build environment
> > > combinations that generate absolute references to symbols.
> > 
> > I'll hold off on this, because it looks like Ard is very close to 
> > have this fixed (and also made it non-fatal in the process).
> 
> Makes sense - meanwhile while Ard is iterating his build-warning patch 
> here's the SEV fix that should address the build failure you've 
> reported.
> 
> Please pull the latest x86/urgent Git tree from:
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-01-28
> 
>    # HEAD: 1105ab42a84bc11c62597005f78ccad2434fbd66 x86/sev: Disable jump tables in SEV startup code
> 
> Fix a build regression on certain config and build environment
> combinations that generate absolute references to symbols.

Erm, I phrased this poorly: the primary fix is that of a potential 
early boot crash in SEV-SNP guests - the wider build error was the 
canary that highlighted the SEV boot code bug that was benign in your 
specific environment.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2025-01-28 22:19           ` Ingo Molnar
  2025-01-28 22:22             ` Ingo Molnar
@ 2025-01-28 22:39             ` pr-tracker-bot
  1 sibling, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2025-01-28 22:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Ard Biesheuvel, linux-kernel,
	the arch/x86 maintainers, David Woodhouse, Peter Zijlstra,
	H. Peter Anvin

The pull request you sent on Tue, 28 Jan 2025 23:19:45 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-01-28

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/05dbaf8dd8bf537d4b4eb3115ab42a5fb40ff1f5

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2025-02-08  9:33 Ingo Molnar
  2025-02-08 20:07 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2025-02-08  9:33 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, the arch/x86 maintainers, Peter Zijlstra,
	H. Peter Anvin

Linus,

Please pull the latest x86/urgent Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-02-08

   # HEAD: ee2ab467bddfb2d7f68d996dbab94d7b88f8eaf7 x86/boot: Use '-std=gnu11' to fix build with GCC 15

Fix a build regression on GCC 15 builds, caused by
GCC changing the default C version that is overriden
in the main Makefile but not in the x86 boot code
Makefile.

 Thanks,

	Ingo

------------------>
Nathan Chancellor (1):
      x86/boot: Use '-std=gnu11' to fix build with GCC 15


 arch/x86/boot/compressed/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index f2051644de94..606c74f27459 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -25,6 +25,7 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
 # avoid errors with '-march=i386', and future flags may depend on the target to
 # be valid.
 KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS)
+KBUILD_CFLAGS += -std=gnu11
 KBUILD_CFLAGS += -fno-strict-aliasing -fPIE
 KBUILD_CFLAGS += -Wundef
 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2025-02-08  9:33 Ingo Molnar
@ 2025-02-08 20:07 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2025-02-08 20:07 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, the arch/x86 maintainers,
	Peter Zijlstra, H. Peter Anvin

The pull request you sent on Sat, 8 Feb 2025 10:33:08 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-02-08

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a5057ded6e882fc7a5f26de592259818ed07d397

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2025-03-14  9:14 Ingo Molnar
  2025-03-14 20:14 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2025-03-14  9:14 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Dave Hansen,
	Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

Linus,

Please pull the latest x86/urgent Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-03-14

   # HEAD: a2ab25529bbcea51b5e01dded79f45aeb94f644a x86/vmware: Parse MP tables for SEV-SNP enabled guests under VMware hypervisors

Fix the bootup of SEV-SNP enabled guests under VMware hypervisors.

 Thanks,

	Ingo

------------------>
Ajay Kaher (1):
      x86/vmware: Parse MP tables for SEV-SNP enabled guests under VMware hypervisors


 arch/x86/kernel/cpu/vmware.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 00189cdeb775..cb3f900c46fc 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -26,6 +26,7 @@
 #include <linux/export.h>
 #include <linux/clocksource.h>
 #include <linux/cpu.h>
+#include <linux/efi.h>
 #include <linux/reboot.h>
 #include <linux/static_call.h>
 #include <asm/div64.h>
@@ -429,6 +430,9 @@ static void __init vmware_platform_setup(void)
 		pr_warn("Failed to get TSC freq from the hypervisor\n");
 	}
 
+	if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP) && !efi_enabled(EFI_BOOT))
+		x86_init.mpparse.find_mptable = mpparse_find_mptable;
+
 	vmware_paravirt_ops_setup();
 
 #ifdef CONFIG_X86_IO_APIC

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2025-03-14  9:14 Ingo Molnar
@ 2025-03-14 20:14 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2025-03-14 20:14 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Dave Hansen, Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

The pull request you sent on Fri, 14 Mar 2025 10:14:14 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-03-14

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/2eaca8a09e55a30e8f2df8d13d4071f8f856b716

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2025-05-04  7:36 Ingo Molnar
  2025-05-04 15:23 ` pr-tracker-bot
  0 siblings, 1 reply; 79+ messages in thread
From: Ingo Molnar @ 2025-05-04  7:36 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Dave Hansen,
	Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

Linus,

Please pull the latest x86/urgent Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-05-04

   # HEAD: 8ed12ab1319b2d8e4a529504777aacacf71371e4 x86/boot/sev: Support memory acceptance in the EFI stub under SVSM

Fix SEV-SNP memory acceptance from the EFI stub for guests
running at VMPL >0.

 Thanks,

	Ingo

------------------>
Ard Biesheuvel (1):
      x86/boot/sev: Support memory acceptance in the EFI stub under SVSM


 arch/x86/boot/compressed/mem.c |  5 +----
 arch/x86/boot/compressed/sev.c | 40 ++++++++++++++++++++++++++++++++++++++++
 arch/x86/boot/compressed/sev.h |  2 ++
 3 files changed, 43 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2025-05-04  7:36 Ingo Molnar
@ 2025-05-04 15:23 ` pr-tracker-bot
  0 siblings, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2025-05-04 15:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Dave Hansen, Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

The pull request you sent on Sun, 4 May 2025 09:36:06 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-05-04

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/3d84c97a8df80a7fcef8d051c24356e4f005b1be

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [GIT PULL] x86 fix
@ 2025-05-11  7:53 Ingo Molnar
  2025-05-11 18:40 ` pr-tracker-bot
  2025-05-11 18:40 ` pr-tracker-bot
  0 siblings, 2 replies; 79+ messages in thread
From: Ingo Molnar @ 2025-05-11  7:53 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Thomas Gleixner, Borislav Petkov, Dave Hansen,
	Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

Linus,

Please pull the latest x86/urgent Git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-05-11

   # HEAD: 5214a9f6c0f56644acb9d2cbb58facf1856d322b x86/microcode: Consolidate the loader enablement checking

Fix a boot regression on very old x86 CPUs without CPUID support.

 Thanks,

	Ingo

------------------>
Borislav Petkov (AMD) (1):
      x86/microcode: Consolidate the loader enablement checking


 arch/x86/include/asm/microcode.h         |  2 ++
 arch/x86/kernel/cpu/microcode/amd.c      |  6 ++--
 arch/x86/kernel/cpu/microcode/core.c     | 58 +++++++++++++++++++-------------
 arch/x86/kernel/cpu/microcode/intel.c    |  2 +-
 arch/x86/kernel/cpu/microcode/internal.h |  1 -
 arch/x86/kernel/head32.c                 |  4 ---
 6 files changed, 41 insertions(+), 32 deletions(-)

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2025-05-11  7:53 [GIT PULL] x86 fix Ingo Molnar
@ 2025-05-11 18:40 ` pr-tracker-bot
  2025-05-11 18:40 ` pr-tracker-bot
  1 sibling, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2025-05-11 18:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Dave Hansen, Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

The pull request you sent on Sun, 11 May 2025 09:53:59 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-05-11

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/b9e62a2b8ffd2bc39b5838e163c41d8a08dae19a

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [GIT PULL] x86 fix
  2025-05-11  7:53 [GIT PULL] x86 fix Ingo Molnar
  2025-05-11 18:40 ` pr-tracker-bot
@ 2025-05-11 18:40 ` pr-tracker-bot
  1 sibling, 0 replies; 79+ messages in thread
From: pr-tracker-bot @ 2025-05-11 18:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, linux-kernel, Thomas Gleixner, Borislav Petkov,
	Dave Hansen, Peter Zijlstra, Andrew Morton, H. Peter Anvin, x86

The pull request you sent on Sun, 11 May 2025 09:53:59 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2025-05-11

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/b9e62a2b8ffd2bc39b5838e163c41d8a08dae19a

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 79+ messages in thread

end of thread, other threads:[~2025-05-11 18:39 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21  7:28 [GIT PULL] x86/cleanups for v6.14 Ingo Molnar
2025-01-21  7:34 ` Ingo Molnar
2025-01-21 11:31   ` Borislav Petkov
2025-01-21 19:40 ` pr-tracker-bot
2025-01-21 21:29 ` [GIT PULL] x86/boot enhancements " Ingo Molnar
2025-01-24 14:06   ` pr-tracker-bot
2025-01-27  3:18   ` Linus Torvalds
2025-01-27 10:20     ` [PATCH] Revert "x86/boot: Reject absolute references in .head.text Ingo Molnar
2025-01-27 15:54       ` [GIT PULL] x86 fix Ingo Molnar
2025-01-27 17:10         ` Linus Torvalds
2025-01-28 22:19           ` Ingo Molnar
2025-01-28 22:22             ` Ingo Molnar
2025-01-28 22:39             ` pr-tracker-bot
2025-01-27 10:25     ` [tip: x86/urgent] Revert "x86/boot: Reject absolute references in .head.text" tip-bot2 for Ingo Molnar
2025-01-27 11:12     ` [GIT PULL] x86/boot enhancements for v6.14 Ard Biesheuvel
2025-01-27 15:51       ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2025-05-11  7:53 [GIT PULL] x86 fix Ingo Molnar
2025-05-11 18:40 ` pr-tracker-bot
2025-05-11 18:40 ` pr-tracker-bot
2025-05-04  7:36 Ingo Molnar
2025-05-04 15:23 ` pr-tracker-bot
2025-03-14  9:14 Ingo Molnar
2025-03-14 20:14 ` pr-tracker-bot
2025-02-08  9:33 Ingo Molnar
2025-02-08 20:07 ` pr-tracker-bot
2023-09-02 10:24 Ingo Molnar
2023-09-02 16:13 ` pr-tracker-bot
2022-08-13 10:40 Ingo Molnar
2022-08-13 21:48 ` pr-tracker-bot
2020-08-02 19:17 Ingo Molnar
2020-08-02 20:15 ` pr-tracker-bot
2020-04-02  9:51 Ingo Molnar
2020-04-02 22:00 ` Linus Torvalds
2020-04-02 22:45 ` pr-tracker-bot
2020-03-24  9:06 Ingo Molnar
2020-03-24 17:15 ` pr-tracker-bot
2019-12-17 11:58 Ingo Molnar
2019-12-17 19:20 ` pr-tracker-bot
2019-09-28 12:42 Ingo Molnar
2019-09-28 20:50 ` pr-tracker-bot
2019-07-14 11:32 Ingo Molnar
2019-07-14 18:45 ` pr-tracker-bot
2019-05-05 11:00 Ingo Molnar
2019-05-05 22:10 ` pr-tracker-bot
2018-07-21 12:55 Ingo Molnar
2016-07-25 15:54 Ingo Molnar
2015-05-15  7:26 Ingo Molnar
2015-03-28 13:58 Ingo Molnar
2015-02-06 18:41 Ingo Molnar
2014-12-19 12:16 Ingo Molnar
2014-04-19 10:58 Ingo Molnar
2013-11-19 15:48 Ingo Molnar
2013-09-28 18:23 Ingo Molnar
2013-07-10 14:32 Ingo Molnar
2012-10-23 11:06 Ingo Molnar
2012-10-23 15:00 ` H. Peter Anvin
2012-10-23 15:17   ` Borislav Petkov
2011-12-20 19:30 Ingo Molnar
2011-10-13  9:00 Ingo Molnar
2011-09-30 18:22 Ingo Molnar
2011-09-30 18:59 ` Jeremy Fitzhardinge
2011-09-30 19:44 ` Thomas Gleixner
2011-07-23  8:43 Ingo Molnar
2011-02-07 15:03 Ingo Molnar
2010-12-28 22:27 Ingo Molnar
2010-12-23 13:00 Ingo Molnar
2010-12-08  7:51 Ingo Molnar
2010-10-30 18:26 Ingo Molnar
2009-09-27  8:02 Ingo Molnar
2009-08-10 18:08 Ingo Molnar
2009-06-29  8:36 Ingo Molnar
2009-03-10 18:25 [git pull] " Ingo Molnar
2009-02-28 13:02 i915 needs pgprot_writecombine() and is_io_mapping_posible() Theodore Ts'o
2009-02-28 13:34 ` [git pull] x86 fix Ingo Molnar
2009-01-13  1:17 Ingo Molnar
2008-11-07 16:30 Ingo Molnar
2008-10-04 14:55 Ingo Molnar
2008-07-01 19:57 Ingo Molnar
2008-04-26 19:47 Ingo Molnar
2008-04-26 20:15 ` Harvey Harrison

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 NNTP newsgroup(s).