[PATCH 0/4] x86-32: Clean up GS segment handling

Brian Gerst posted 4 patches 4 years, 2 months ago
arch/powerpc/kernel/fadump.c               |  2 +-
arch/powerpc/platforms/powernv/opal-core.c |  2 +-
arch/x86/include/asm/elf.h                 | 15 ++-------------
arch/x86/include/asm/mmu_context.h         |  2 +-
arch/x86/include/asm/segment.h             | 12 ------------
arch/x86/include/asm/special_insns.h       |  7 ++++---
arch/x86/kernel/process.c                  |  5 +----
arch/x86/kernel/process_32.c               | 11 ++++-------
arch/x86/kernel/ptrace.c                   |  6 +++---
arch/x86/kernel/signal.c                   |  8 +++++---
arch/x86/kernel/vm86_32.c                  |  4 ++--
arch/x86/lib/insn-eval.c                   |  5 +++--
arch/x86/math-emu/get_address.c            |  2 +-
include/linux/elfcore.h                    |  9 ---------
kernel/kexec_core.c                        |  2 +-
15 files changed, 29 insertions(+), 63 deletions(-)
[PATCH 0/4] x86-32: Clean up GS segment handling
Posted by Brian Gerst 4 years, 2 months ago
Since commit 3fb0fdb3bbe ("Make the canary into a regular percpu
variable"), the GS segment is no longer switched on kernel entry for
32-bit kernels.  Clean up the remaining code that handled lazy GS
switching.

Brian Gerst (4):
  x86-32: Simplify ELF_CORE_COPY_REGS
  ELF: Remove elf_core_copy_kernel_regs()
  x86-32: Remove lazy GS macros
  x86: Merge load_gs_index()

 arch/powerpc/kernel/fadump.c               |  2 +-
 arch/powerpc/platforms/powernv/opal-core.c |  2 +-
 arch/x86/include/asm/elf.h                 | 15 ++-------------
 arch/x86/include/asm/mmu_context.h         |  2 +-
 arch/x86/include/asm/segment.h             | 12 ------------
 arch/x86/include/asm/special_insns.h       |  7 ++++---
 arch/x86/kernel/process.c                  |  5 +----
 arch/x86/kernel/process_32.c               | 11 ++++-------
 arch/x86/kernel/ptrace.c                   |  6 +++---
 arch/x86/kernel/signal.c                   |  8 +++++---
 arch/x86/kernel/vm86_32.c                  |  4 ++--
 arch/x86/lib/insn-eval.c                   |  5 +++--
 arch/x86/math-emu/get_address.c            |  2 +-
 include/linux/elfcore.h                    |  9 ---------
 kernel/kexec_core.c                        |  2 +-
 15 files changed, 29 insertions(+), 63 deletions(-)

-- 
2.35.1
Re: [PATCH 0/4] x86-32: Clean up GS segment handling
Posted by Andy Lutomirski 4 years, 2 months ago
On 3/25/22 08:39, Brian Gerst wrote:
> Since commit 3fb0fdb3bbe ("Make the canary into a regular percpu
> variable"), the GS segment is no longer switched on kernel entry for
> 32-bit kernels.  Clean up the remaining code that handled lazy GS
> switching.
> 

Acked-by: Andy Lutomirski <luto@kernel.org>

Thanks!

> Brian Gerst (4):
>    x86-32: Simplify ELF_CORE_COPY_REGS
>    ELF: Remove elf_core_copy_kernel_regs()
>    x86-32: Remove lazy GS macros
>    x86: Merge load_gs_index()
> 
>   arch/powerpc/kernel/fadump.c               |  2 +-
>   arch/powerpc/platforms/powernv/opal-core.c |  2 +-
>   arch/x86/include/asm/elf.h                 | 15 ++-------------
>   arch/x86/include/asm/mmu_context.h         |  2 +-
>   arch/x86/include/asm/segment.h             | 12 ------------
>   arch/x86/include/asm/special_insns.h       |  7 ++++---
>   arch/x86/kernel/process.c                  |  5 +----
>   arch/x86/kernel/process_32.c               | 11 ++++-------
>   arch/x86/kernel/ptrace.c                   |  6 +++---
>   arch/x86/kernel/signal.c                   |  8 +++++---
>   arch/x86/kernel/vm86_32.c                  |  4 ++--
>   arch/x86/lib/insn-eval.c                   |  5 +++--
>   arch/x86/math-emu/get_address.c            |  2 +-
>   include/linux/elfcore.h                    |  9 ---------
>   kernel/kexec_core.c                        |  2 +-
>   15 files changed, 29 insertions(+), 63 deletions(-)
>
Re: [PATCH 0/4] x86-32: Clean up GS segment handling
Posted by Thomas Gleixner 4 years, 2 months ago
On Fri, Mar 25 2022 at 11:39, Brian Gerst wrote:
> Since commit 3fb0fdb3bbe ("Make the canary into a regular percpu
> variable"), the GS segment is no longer switched on kernel entry for
> 32-bit kernels.  Clean up the remaining code that handled lazy GS
> switching.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>