From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752988AbbCKPUB (ORCPT ); Wed, 11 Mar 2015 11:20:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52770 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751186AbbCKPUA (ORCPT ); Wed, 11 Mar 2015 11:20:00 -0400 Message-ID: <55005D05.6010606@redhat.com> Date: Wed, 11 Mar 2015 16:19:33 +0100 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Borislav Petkov CC: Ingo Molnar , Linus Torvalds , Steven Rostedt , "H. Peter Anvin" , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] x86: entry_64.S: remove unused thread_struct::usersp References: <1425984307-2143-1-git-send-email-dvlasenk@redhat.com> <1425984307-2143-2-git-send-email-dvlasenk@redhat.com> <20150311125552.GA3359@pd.tnic> In-Reply-To: <20150311125552.GA3359@pd.tnic> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/11/2015 01:55 PM, Borislav Petkov wrote: > On Tue, Mar 10, 2015 at 11:45:07AM +0100, Denys Vlasenko wrote: >> @@ -894,11 +893,6 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); >> #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.sp0 - 1) >> extern unsigned long KSTK_ESP(struct task_struct *task); >> >> -/* >> - * User space RSP while inside the SYSCALL fast path >> - */ >> -DECLARE_PER_CPU(unsigned long, old_rsp); > > Please grep the whole arch/x86/ tree for old_rsp as there are more > leftovers. I think I did: $ grep -r old_rsp arch/x86 arch/x86/xen/xen-asm_64.S: movq %rsp, PER_CPU_VAR(old_rsp) arch/x86/xen/xen-asm_64.S: pushq PER_CPU_VAR(old_rsp) arch/x86/xen/xen-asm_64.S: movq %rsp, PER_CPU_VAR(old_rsp) arch/x86/xen/xen-asm_64.S: pushq PER_CPU_VAR(old_rsp) arch/x86/kernel/process_64.c:__visible DEFINE_PER_CPU(unsigned long, old_rsp); arch/x86/kernel/entry_64.S: movq %rsp,PER_CPU_VAR(old_rsp) arch/x86/kernel/entry_64.S: movq PER_CPU_VAR(old_rsp),%rcx arch/x86/kernel/entry_64.S: /* 0(%rsp): old_rsp */ The only remaining use in C code is the definition in process_64.c It is necessary for assembly (.S) files.