Re: [PATCH v4 06/17] x86: Move C entry and exit code to arch/x86/entry/common.c

Borislav Petkov
2015-06-30T16:32:58Z

On Mon, Jun 29, 2015 at 12:33:38PM -0700, Andy Lutomirski wrote:
> The entry and exit C helpers were confusingly scattered between
> ptrace.c and signal.c, even though they aren't specific to ptrace or
> signal handling. Move them together in a new file.
>
> This change just moves code around. It doesn't change anything.
>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
> arch/x86/entry/Makefile | 1 +
> arch/x86/entry/common.c | 253 ++++++++++++++++++++++++++++++++++++++++++
> arch/x86/include/asm/signal.h | 1 +
> arch/x86/kernel/ptrace.c | 202 +--------------------------------
> arch/x86/kernel/signal.c | 28 +----
> 5 files changed, 257 insertions(+), 228 deletions(-)
> create mode 100644 arch/x86/entry/common.c
>
> diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile
> index 7a144971db79..bd55dedd7614 100644
> --- a/arch/x86/entry/Makefile
> +++ b/arch/x86/entry/Makefile
> @@ -2,6 +2,7 @@
> # Makefile for the x86 low level entry code
> #
> obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o
> +obj-y += common.o
>
> obj-y += vdso/
> obj-y += vsyscall/
> diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
> new file mode 100644
> index 000000000000..348465473e55
> --- /dev/null
> +++ b/arch/x86/entry/common.c
> @@ -0,0 +1,253 @@
> +/*
> + * entry.c - C code for kernel entry and exit

common.c

> + * Copyright (c) 2015 Andrew Lutomirski
> + * GPL v2
> + *
> + * Based on asm and ptrace code by many authors. The code here originated
> + * in ptrace.c and signal.c.
> + */

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--