lp:~canonical-kernel/ubuntu/+source/linux-aws/+git/lunar

Owned by Canonical Kernel
Get this repository:
git clone https://git.not.enabled/~canonical-kernel/ubuntu/+source/linux-aws/+git/lunar
Members of Canonical Kernel can upload to this repository. Log in for directions.

Branches

Name Last Modified Last Commit
master-next 2023-10-13 16:26:45 UTC
x86/boot: Move x86_cache_alignment initialization to correct spot

Author: Dave Hansen
Author Date: 2023-10-12 15:30:54 UTC

x86/boot: Move x86_cache_alignment initialization to correct spot

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

c->x86_cache_alignment is initialized from c->x86_clflush_size.
However, commit fbf6449f84bf moved c->x86_clflush_size initialization
to later in boot without moving the c->x86_cache_alignment assignment:

  fbf6449f84bf ("x86/sev-es: Set x86_virt_bits to the correct value straight away, instead of a two-phase approach")

This presumably left c->x86_cache_alignment set to zero for longer
than it should be.

The result was an oops on 32-bit kernels while accessing a pointer
at 0x20. The 0x20 came from accessing a structure member at offset
0x10 (buffer->cpumask) from a ZERO_SIZE_PTR=0x10. kmalloc() can
evidently return ZERO_SIZE_PTR when it's given 0 as its alignment
requirement.

Move the c->x86_cache_alignment initialization to be after
c->x86_clflush_size has an actual value.

Fixes: fbf6449f84bf ("x86/sev-es: Set x86_virt_bits to the correct value straight away, instead of a two-phase approach")
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20231002220045.1014760-1-dave.hansen@linux.intel.com
(cherry picked from commit 3e32552652917f10c0aa8ac75cdc8f0b8d257dec linux-next)
Signed-off-by: John Cabaj <john.cabaj@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: John Cabaj <john.cabaj@canonical.com>

master 2022-06-15 10:30:14 UTC
UBUNTU: Ubuntu-aws-5.18.0-1002.2

Author: Paolo Pisati
Author Date: 2022-06-15 10:30:14 UTC

UBUNTU: Ubuntu-aws-5.18.0-1002.2

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>

12 of 2 results
This repository contains Public information 
Everyone can see this information.

Subscribers