From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754071AbcHRNIb (ORCPT ); Thu, 18 Aug 2016 09:08:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55440 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946827AbcHRNIL (ORCPT ); Thu, 18 Aug 2016 09:08:11 -0400 From: Josh Poimboeuf To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Linus Torvalds , Steven Rostedt , Brian Gerst , Kees Cook , Peter Zijlstra , Frederic Weisbecker , Byungchul Park , Nilay Vaish Subject: [PATCH v4 56/57] x86/mm: removed unused arch_within_stack_frames() arguments Date: Thu, 18 Aug 2016 08:06:36 -0500 Message-Id: In-Reply-To: References: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 18 Aug 2016 13:08:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove two unused arch_within_stack_frames() arguments: 'stack' and 'stackend'. The x86 unwinder already knows how to find the stack bounds, and that's generally the case for other arch unwinders as well. Signed-off-by: Josh Poimboeuf --- arch/x86/include/asm/thread_info.h | 8 ++------ arch/x86/lib/usercopy.c | 4 +--- include/linux/thread_info.h | 4 +--- mm/usercopy.c | 3 +-- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index 0f27e04..530789b 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -178,14 +178,10 @@ static inline unsigned long current_stack_pointer(void) #ifdef CONFIG_HARDENED_USERCOPY #ifdef CONFIG_FRAME_POINTER -int arch_within_stack_frames(const void * const stack, - const void * const stackend, - void *first_frame, +int arch_within_stack_frames(void *first_frame, const void *obj, unsigned long len); #else -static inline int arch_within_stack_frames(const void * const stack, - const void * const stackend, - void *first_frame +static inline int arch_within_stack_frames(void *first_frame, const void *obj, unsigned long len) { return 0; diff --git a/arch/x86/lib/usercopy.c b/arch/x86/lib/usercopy.c index fe0b233..3045da7 100644 --- a/arch/x86/lib/usercopy.c +++ b/arch/x86/lib/usercopy.c @@ -46,9 +46,7 @@ EXPORT_SYMBOL_GPL(copy_from_user_nmi); * -1 if placed across a frame boundary (or outside stack) * 0 unable to determine (no frame pointers, etc) */ -int arch_within_stack_frames(const void * const stack, - const void * const stackend, - void *first_frame, +int arch_within_stack_frames(void *first_frame, const void *obj, unsigned long len) { struct unwind_state state; diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index aa58813..74d99e2 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -106,9 +106,7 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) #define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED) #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES -static inline int arch_within_stack_frames(const void * const stack, - const void * const stackend, - void *first_frame, +static inline int arch_within_stack_frames(void *first_frame, const void *obj, unsigned long len) { return 0; diff --git a/mm/usercopy.c b/mm/usercopy.c index 359249c..7b2585a 100644 --- a/mm/usercopy.c +++ b/mm/usercopy.c @@ -58,8 +58,7 @@ static __always_inline int check_stack_object(const void *obj, * Starting with the caller's stack frame, check if the object * is safely within a valid frame. */ - ret = arch_within_stack_frames(stack, stackend, - __builtin_frame_address(0), obj, len); + ret = arch_within_stack_frames(__builtin_frame_address(0), obj, len); if (ret) return ret; -- 2.7.4