diff mbox series

[4/6] arm64: compat: Remove 32-bit sigreturn code from the vDSO

Message ID 20200623085436.3696-5-will@kernel.org (mailing list archive)
State New, archived
Headers show
Series Fix unwinding through sigreturn trampolines | expand

Commit Message

Will Deacon June 23, 2020, 8:54 a.m. UTC
The sigreturn code in the compat vDSO is unused. Remove it.

Signed-off-by: Will Deacon <will@kernel.org>
---
 arch/arm64/kernel/vdso32/Makefile    |  1 -
 arch/arm64/kernel/vdso32/sigreturn.S | 58 ----------------------------
 arch/arm64/kernel/vdso32/vdso.lds.S  | 12 ------
 3 files changed, 71 deletions(-)
 delete mode 100644 arch/arm64/kernel/vdso32/sigreturn.S

Comments

Mark Rutland June 23, 2020, 10:33 a.m. UTC | #1
On Tue, Jun 23, 2020 at 09:54:34AM +0100, Will Deacon wrote:
> The sigreturn code in the compat vDSO is unused. Remove it.
> 
> Signed-off-by: Will Deacon <will@kernel.org>

Reviewed-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  arch/arm64/kernel/vdso32/Makefile    |  1 -
>  arch/arm64/kernel/vdso32/sigreturn.S | 58 ----------------------------
>  arch/arm64/kernel/vdso32/vdso.lds.S  | 12 ------
>  3 files changed, 71 deletions(-)
>  delete mode 100644 arch/arm64/kernel/vdso32/sigreturn.S
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 7ea1e827e505..d88148bef6b0 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -140,7 +140,6 @@ hostprogs := $(munge)
>  
>  c-obj-vdso := note.o
>  c-obj-vdso-gettimeofday := vgettimeofday.o
> -asm-obj-vdso := sigreturn.o
>  
>  ifneq ($(c-gettimeofday-y),)
>  VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y)
> diff --git a/arch/arm64/kernel/vdso32/sigreturn.S b/arch/arm64/kernel/vdso32/sigreturn.S
> deleted file mode 100644
> index b0091064c3d6..000000000000
> --- a/arch/arm64/kernel/vdso32/sigreturn.S
> +++ /dev/null
> @@ -1,58 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * This file provides both A32 and T32 versions, in accordance with the
> - * arm sigreturn code.
> - *
> - * Please read the comments in arch/arm64/kernel/vdso/sigreturn.S to
> - * understand some of the craziness in here.
> - *
> - * Copyright (C) 2018 ARM Limited
> - */
> -
> -#include <linux/linkage.h>
> -#include <asm/asm-offsets.h>
> -#include <asm/unistd.h>
> -
> -	.text
> -
> -	.arm
> -	.fnstart
> -	.save {r0-r15}
> -	.pad #COMPAT_SIGFRAME_REGS_OFFSET
> -	nop
> -SYM_CODE_START(__kernel_sigreturn_arm)
> -	mov r7, #__NR_compat_sigreturn
> -	svc #0
> -	.fnend
> -SYM_CODE_END(__kernel_sigreturn_arm)
> -
> -	.fnstart
> -	.save {r0-r15}
> -	.pad #COMPAT_RT_SIGFRAME_REGS_OFFSET
> -	nop
> -SYM_CODE_START(__kernel_rt_sigreturn_arm)
> -	mov r7, #__NR_compat_rt_sigreturn
> -	svc #0
> -	.fnend
> -SYM_CODE_END(__kernel_rt_sigreturn_arm)
> -
> -	.thumb
> -	.fnstart
> -	.save {r0-r15}
> -	.pad #COMPAT_SIGFRAME_REGS_OFFSET
> -	nop
> -SYM_CODE_START(__kernel_sigreturn_thumb)
> -	mov r7, #__NR_compat_sigreturn
> -	svc #0
> -	.fnend
> -SYM_CODE_END(__kernel_sigreturn_thumb)
> -
> -	.fnstart
> -	.save {r0-r15}
> -	.pad #COMPAT_RT_SIGFRAME_REGS_OFFSET
> -	nop
> -SYM_CODE_START(__kernel_rt_sigreturn_thumb)
> -	mov r7, #__NR_compat_rt_sigreturn
> -	svc #0
> -	.fnend
> -SYM_CODE_END(__kernel_rt_sigreturn_thumb)
> diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S
> index a3944927eaeb..337d03522048 100644
> --- a/arch/arm64/kernel/vdso32/vdso.lds.S
> +++ b/arch/arm64/kernel/vdso32/vdso.lds.S
> @@ -64,19 +64,7 @@ VERSION
>  		__vdso_clock_gettime;
>  		__vdso_gettimeofday;
>  		__vdso_clock_getres;
> -		__kernel_sigreturn_arm;
> -		__kernel_sigreturn_thumb;
> -		__kernel_rt_sigreturn_arm;
> -		__kernel_rt_sigreturn_thumb;
>  		__vdso_clock_gettime64;
>  	local: *;
>  	};
>  }
> -
> -/*
> - * Make the sigreturn code visible to the kernel.
> - */
> -VDSO_compat_sigreturn_arm	= __kernel_sigreturn_arm;
> -VDSO_compat_sigreturn_thumb	= __kernel_sigreturn_thumb;
> -VDSO_compat_rt_sigreturn_arm	= __kernel_rt_sigreturn_arm;
> -VDSO_compat_rt_sigreturn_thumb	= __kernel_rt_sigreturn_thumb;
> -- 
> 2.27.0.111.gc72c7da667-goog
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Vincenzo Frascino June 23, 2020, 11:54 a.m. UTC | #2
On 6/23/20 9:54 AM, Will Deacon wrote:
> The sigreturn code in the compat vDSO is unused. Remove it.
> 
> Signed-off-by: Will Deacon <will@kernel.org>

Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

> ---
>  arch/arm64/kernel/vdso32/Makefile    |  1 -
>  arch/arm64/kernel/vdso32/sigreturn.S | 58 ----------------------------
>  arch/arm64/kernel/vdso32/vdso.lds.S  | 12 ------
>  3 files changed, 71 deletions(-)
>  delete mode 100644 arch/arm64/kernel/vdso32/sigreturn.S
> 
> diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> index 7ea1e827e505..d88148bef6b0 100644
> --- a/arch/arm64/kernel/vdso32/Makefile
> +++ b/arch/arm64/kernel/vdso32/Makefile
> @@ -140,7 +140,6 @@ hostprogs := $(munge)
>  
>  c-obj-vdso := note.o
>  c-obj-vdso-gettimeofday := vgettimeofday.o
> -asm-obj-vdso := sigreturn.o
>  
>  ifneq ($(c-gettimeofday-y),)
>  VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y)
> diff --git a/arch/arm64/kernel/vdso32/sigreturn.S b/arch/arm64/kernel/vdso32/sigreturn.S
> deleted file mode 100644
> index b0091064c3d6..000000000000
> --- a/arch/arm64/kernel/vdso32/sigreturn.S
> +++ /dev/null
> @@ -1,58 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * This file provides both A32 and T32 versions, in accordance with the
> - * arm sigreturn code.
> - *
> - * Please read the comments in arch/arm64/kernel/vdso/sigreturn.S to
> - * understand some of the craziness in here.
> - *
> - * Copyright (C) 2018 ARM Limited
> - */
> -
> -#include <linux/linkage.h>
> -#include <asm/asm-offsets.h>
> -#include <asm/unistd.h>
> -
> -	.text
> -
> -	.arm
> -	.fnstart
> -	.save {r0-r15}
> -	.pad #COMPAT_SIGFRAME_REGS_OFFSET
> -	nop
> -SYM_CODE_START(__kernel_sigreturn_arm)
> -	mov r7, #__NR_compat_sigreturn
> -	svc #0
> -	.fnend
> -SYM_CODE_END(__kernel_sigreturn_arm)
> -
> -	.fnstart
> -	.save {r0-r15}
> -	.pad #COMPAT_RT_SIGFRAME_REGS_OFFSET
> -	nop
> -SYM_CODE_START(__kernel_rt_sigreturn_arm)
> -	mov r7, #__NR_compat_rt_sigreturn
> -	svc #0
> -	.fnend
> -SYM_CODE_END(__kernel_rt_sigreturn_arm)
> -
> -	.thumb
> -	.fnstart
> -	.save {r0-r15}
> -	.pad #COMPAT_SIGFRAME_REGS_OFFSET
> -	nop
> -SYM_CODE_START(__kernel_sigreturn_thumb)
> -	mov r7, #__NR_compat_sigreturn
> -	svc #0
> -	.fnend
> -SYM_CODE_END(__kernel_sigreturn_thumb)
> -
> -	.fnstart
> -	.save {r0-r15}
> -	.pad #COMPAT_RT_SIGFRAME_REGS_OFFSET
> -	nop
> -SYM_CODE_START(__kernel_rt_sigreturn_thumb)
> -	mov r7, #__NR_compat_rt_sigreturn
> -	svc #0
> -	.fnend
> -SYM_CODE_END(__kernel_rt_sigreturn_thumb)
> diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S
> index a3944927eaeb..337d03522048 100644
> --- a/arch/arm64/kernel/vdso32/vdso.lds.S
> +++ b/arch/arm64/kernel/vdso32/vdso.lds.S
> @@ -64,19 +64,7 @@ VERSION
>  		__vdso_clock_gettime;
>  		__vdso_gettimeofday;
>  		__vdso_clock_getres;
> -		__kernel_sigreturn_arm;
> -		__kernel_sigreturn_thumb;
> -		__kernel_rt_sigreturn_arm;
> -		__kernel_rt_sigreturn_thumb;
>  		__vdso_clock_gettime64;
>  	local: *;
>  	};
>  }
> -
> -/*
> - * Make the sigreturn code visible to the kernel.
> - */
> -VDSO_compat_sigreturn_arm	= __kernel_sigreturn_arm;
> -VDSO_compat_sigreturn_thumb	= __kernel_sigreturn_thumb;
> -VDSO_compat_rt_sigreturn_arm	= __kernel_rt_sigreturn_arm;
> -VDSO_compat_rt_sigreturn_thumb	= __kernel_rt_sigreturn_thumb;
>
diff mbox series

Patch

diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 7ea1e827e505..d88148bef6b0 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -140,7 +140,6 @@  hostprogs := $(munge)
 
 c-obj-vdso := note.o
 c-obj-vdso-gettimeofday := vgettimeofday.o
-asm-obj-vdso := sigreturn.o
 
 ifneq ($(c-gettimeofday-y),)
 VDSO_CFLAGS_gettimeofday_o += -include $(c-gettimeofday-y)
diff --git a/arch/arm64/kernel/vdso32/sigreturn.S b/arch/arm64/kernel/vdso32/sigreturn.S
deleted file mode 100644
index b0091064c3d6..000000000000
--- a/arch/arm64/kernel/vdso32/sigreturn.S
+++ /dev/null
@@ -1,58 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * This file provides both A32 and T32 versions, in accordance with the
- * arm sigreturn code.
- *
- * Please read the comments in arch/arm64/kernel/vdso/sigreturn.S to
- * understand some of the craziness in here.
- *
- * Copyright (C) 2018 ARM Limited
- */
-
-#include <linux/linkage.h>
-#include <asm/asm-offsets.h>
-#include <asm/unistd.h>
-
-	.text
-
-	.arm
-	.fnstart
-	.save {r0-r15}
-	.pad #COMPAT_SIGFRAME_REGS_OFFSET
-	nop
-SYM_CODE_START(__kernel_sigreturn_arm)
-	mov r7, #__NR_compat_sigreturn
-	svc #0
-	.fnend
-SYM_CODE_END(__kernel_sigreturn_arm)
-
-	.fnstart
-	.save {r0-r15}
-	.pad #COMPAT_RT_SIGFRAME_REGS_OFFSET
-	nop
-SYM_CODE_START(__kernel_rt_sigreturn_arm)
-	mov r7, #__NR_compat_rt_sigreturn
-	svc #0
-	.fnend
-SYM_CODE_END(__kernel_rt_sigreturn_arm)
-
-	.thumb
-	.fnstart
-	.save {r0-r15}
-	.pad #COMPAT_SIGFRAME_REGS_OFFSET
-	nop
-SYM_CODE_START(__kernel_sigreturn_thumb)
-	mov r7, #__NR_compat_sigreturn
-	svc #0
-	.fnend
-SYM_CODE_END(__kernel_sigreturn_thumb)
-
-	.fnstart
-	.save {r0-r15}
-	.pad #COMPAT_RT_SIGFRAME_REGS_OFFSET
-	nop
-SYM_CODE_START(__kernel_rt_sigreturn_thumb)
-	mov r7, #__NR_compat_rt_sigreturn
-	svc #0
-	.fnend
-SYM_CODE_END(__kernel_rt_sigreturn_thumb)
diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S
index a3944927eaeb..337d03522048 100644
--- a/arch/arm64/kernel/vdso32/vdso.lds.S
+++ b/arch/arm64/kernel/vdso32/vdso.lds.S
@@ -64,19 +64,7 @@  VERSION
 		__vdso_clock_gettime;
 		__vdso_gettimeofday;
 		__vdso_clock_getres;
-		__kernel_sigreturn_arm;
-		__kernel_sigreturn_thumb;
-		__kernel_rt_sigreturn_arm;
-		__kernel_rt_sigreturn_thumb;
 		__vdso_clock_gettime64;
 	local: *;
 	};
 }
-
-/*
- * Make the sigreturn code visible to the kernel.
- */
-VDSO_compat_sigreturn_arm	= __kernel_sigreturn_arm;
-VDSO_compat_sigreturn_thumb	= __kernel_sigreturn_thumb;
-VDSO_compat_rt_sigreturn_arm	= __kernel_rt_sigreturn_arm;
-VDSO_compat_rt_sigreturn_thumb	= __kernel_rt_sigreturn_thumb;