[PATCH 0/8] x86 signal code cleanups

Brian Gerst posted 8 patches 3 years, 10 months ago
arch/x86/entry/entry_64_compat.S              |   4 +-
arch/x86/ia32/Makefile                        |   2 -
arch/x86/include/asm/elf.h                    |   4 -
arch/x86/include/asm/fpu/signal.h             |   7 -
arch/x86/include/asm/segment.h                |   2 +-
arch/x86/include/asm/sighandling.h            |   9 +
arch/x86/include/asm/signal.h                 |   5 -
arch/x86/kernel/Makefile                      |   4 +-
arch/x86/kernel/signal.c                      | 654 +-----------------
.../ia32_signal.c => kernel/signal_32.c}      | 117 ++--
arch/x86/kernel/signal_64.c                   | 383 ++++++++++
arch/x86/xen/xen-asm.S                        |   8 +-
include/linux/compat.h                        |   2 -
include/linux/syscalls.h                      |   2 +
14 files changed, 493 insertions(+), 710 deletions(-)
rename arch/x86/{ia32/ia32_signal.c => kernel/signal_32.c} (82%)
create mode 100644 arch/x86/kernel/signal_64.c
[PATCH 0/8] x86 signal code cleanups
Posted by Brian Gerst 3 years, 10 months ago
The 32-bit signal code has significant differences from 64-bit, and
those are duplicated for native and compat modes.  This patch series
merges the 32-bit code into one file, and does some general cleanups
in the x86 signal code.  There should be no functional changes.

Brian Gerst (8):
  x86/signal: Remove sig parameter from frame setup functions
  x86/signal: Remove sigset_t parameter from frame setup functions
  signal/compat: Remove compat_sigset_t override
  x86: Remove __USER32_DS
  x86/signal: Merge get_sigframe()
  x86/signal: Add ABI prefixes to frame setup functions
  x86/signal/32: Merge native and compat 32-bit signal code
  x86/signal/64: Move 64-bit signal code to its own file

 arch/x86/entry/entry_64_compat.S              |   4 +-
 arch/x86/ia32/Makefile                        |   2 -
 arch/x86/include/asm/elf.h                    |   4 -
 arch/x86/include/asm/fpu/signal.h             |   7 -
 arch/x86/include/asm/segment.h                |   2 +-
 arch/x86/include/asm/sighandling.h            |   9 +
 arch/x86/include/asm/signal.h                 |   5 -
 arch/x86/kernel/Makefile                      |   4 +-
 arch/x86/kernel/signal.c                      | 654 +-----------------
 .../ia32_signal.c => kernel/signal_32.c}      | 117 ++--
 arch/x86/kernel/signal_64.c                   | 383 ++++++++++
 arch/x86/xen/xen-asm.S                        |   8 +-
 include/linux/compat.h                        |   2 -
 include/linux/syscalls.h                      |   2 +
 14 files changed, 493 insertions(+), 710 deletions(-)
 rename arch/x86/{ia32/ia32_signal.c => kernel/signal_32.c} (82%)
 create mode 100644 arch/x86/kernel/signal_64.c

-- 
2.35.3
Re: [PATCH 0/8] x86 signal code cleanups
Posted by Andy Lutomirski 3 years, 10 months ago
On 6/6/22 13:37, Brian Gerst wrote:
> The 32-bit signal code has significant differences from 64-bit, and
> those are duplicated for native and compat modes.  This patch series
> merges the 32-bit code into one file, and does some general cleanups
> in the x86 signal code.  There should be no functional changes.
> 

This looks generally sane.  What kind of testing have you done?

--Andy
Re: [PATCH 0/8] x86 signal code cleanups
Posted by Brian Gerst 3 years, 10 months ago
On Tue, Jun 28, 2022 at 7:23 PM Andy Lutomirski <luto@kernel.org> wrote:
>
> On 6/6/22 13:37, Brian Gerst wrote:
> > The 32-bit signal code has significant differences from 64-bit, and
> > those are duplicated for native and compat modes.  This patch series
> > merges the 32-bit code into one file, and does some general cleanups
> > in the x86 signal code.  There should be no functional changes.
> >
>
> This looks generally sane.  What kind of testing have you done?

I ran all of the self tests, did a parallel kernel build, and general
usage like web browsing.  Do you have any suggestions for other tests?

--
Brian Gerst
Re: [PATCH 0/8] x86 signal code cleanups
Posted by Eric W. Biederman 3 years, 10 months ago
Brian Gerst <brgerst@gmail.com> writes:

> The 32-bit signal code has significant differences from 64-bit, and
> those are duplicated for native and compat modes.  This patch series
> merges the 32-bit code into one file, and does some general cleanups
> in the x86 signal code.  There should be no functional changes.

At a quick skim I don't see anything scary in there.

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>

> Brian Gerst (8):
>   x86/signal: Remove sig parameter from frame setup functions
>   x86/signal: Remove sigset_t parameter from frame setup functions
>   signal/compat: Remove compat_sigset_t override
>   x86: Remove __USER32_DS
>   x86/signal: Merge get_sigframe()
>   x86/signal: Add ABI prefixes to frame setup functions
>   x86/signal/32: Merge native and compat 32-bit signal code
>   x86/signal/64: Move 64-bit signal code to its own file
>
>  arch/x86/entry/entry_64_compat.S              |   4 +-
>  arch/x86/ia32/Makefile                        |   2 -
>  arch/x86/include/asm/elf.h                    |   4 -
>  arch/x86/include/asm/fpu/signal.h             |   7 -
>  arch/x86/include/asm/segment.h                |   2 +-
>  arch/x86/include/asm/sighandling.h            |   9 +
>  arch/x86/include/asm/signal.h                 |   5 -
>  arch/x86/kernel/Makefile                      |   4 +-
>  arch/x86/kernel/signal.c                      | 654 +-----------------
>  .../ia32_signal.c => kernel/signal_32.c}      | 117 ++--
>  arch/x86/kernel/signal_64.c                   | 383 ++++++++++
>  arch/x86/xen/xen-asm.S                        |   8 +-
>  include/linux/compat.h                        |   2 -
>  include/linux/syscalls.h                      |   2 +
>  14 files changed, 493 insertions(+), 710 deletions(-)
>  rename arch/x86/{ia32/ia32_signal.c => kernel/signal_32.c} (82%)
>  create mode 100644 arch/x86/kernel/signal_64.c

Eric