From patchwork Thu Jun 27 04:46:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Lutomirski X-Patchwork-Id: 11018905 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3DFB3112C for ; Thu, 27 Jun 2019 06:44:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29805289F5 for ; Thu, 27 Jun 2019 06:44:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 174C428A2E; Thu, 27 Jun 2019 06:44:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8C72F289F5 for ; Thu, 27 Jun 2019 06:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SUKe2s1FLKLWD3h5TTAuN3/IWImuONyWWLjh3INLyGE=; b=k6RbRXNT4tCu3D C9IA2N8O9fKW2aGmBwJ6fiAT2M8+hQPE0QZPDoE71uInsh7+J7gixTCwC736lpktbIIQ7qHeGVxfi pRgAJv0e+qWM4/ALO4uqZfs96ox7ndfkHBKiKior3rT4XZ3sEpbNw4+b1CBX/m6LEDHwzPnVjn99O /ID7jpZlH0a/w3GsMBrF80gdK4Wf5067xnfyI+8CFWUCBrLNVxGM3w21nv7Wh2eSV3IrL/qplJ839 OgnCNKUybUuziLiUzRgrtRcIEJ175iFmFAzP8qtE1Sv3ucJ754fpfEMupAVYeZFtbFDa8kKs38ez8 BxCmncpVkTJCbI+6FKkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hgO8z-00077i-Pe; Thu, 27 Jun 2019 06:44:29 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hgO83-0006KM-5f for linux-riscv@bombadil.infradead.org; Thu, 27 Jun 2019 06:43:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OqQio5SkalDs3TzrE767eUg//ZrNCITQGL3nEQjuWgM=; b=BGq7Q0RMqheNaJsjFnI1KsSD8u HcVn5bsLP527Hj0fduKtPlhVqtOhj8ySPo1JjbMRPT+VUkOekF4eNLAkWnaxmEEs2oHFwEN4XJ+uI c++6iTR5qKH6+XB9pkHe0xAIS5mpt2wgyh5f6CbltozcRS3HagdRxcHBOnHFrCeFNnmHIRMl9JnwU MdgXsiiBIG20GhyFrrDSCF07IUgEQAr3RJcms7laBUSSp8h5GS6ggftHFbAINeCqsKk8OuuRS8oOn k/szOiNHfH8ytCDPxDsjWqm8ZmLL6aZgqPO+h+ID480kjWmjP+b6BQZ67O4O78KYvgVhoqzQC0iKG NPBYEgew==; Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hgMIn-0006co-Ur for linux-riscv@lists.infradead.org; Thu, 27 Jun 2019 04:46:31 +0000 Received: from localhost (c-67-180-165-146.hsd1.ca.comcast.net [67.180.165.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73C7421855; Thu, 27 Jun 2019 04:46:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561610786; bh=6vzbfhIZQItZusxbZ3B57FOIszhglW9mEe2rAHhF5WM=; h=From:To:Cc:Subject:Date:From; b=fAqrKeDD6m3OuCXa06TjEPKMTd3nBbvFSLBNgp8BK3LRGdkZrn/QAGhK9wUuM6QHU JLkYUtA+5Dkw2HqEtkzHGSlXADBsgBew5H3RrF7NZik1mL8rs4WIBwaH/0cOkqQ/Yz R8IMmQHPQWAijAv1G9zOUYktvvX4XfU58+MPJAng= From: Andy Lutomirski To: LKML Subject: [PATCH] riscv: Remove gate area stubs Date: Wed, 26 Jun 2019 21:46:18 -0700 Message-Id: X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Weimer , Albert Ou , Kees Cook , Jann Horn , x86@kernel.org, Palmer Dabbelt , Andy Lutomirski , linux-riscv@lists.infradead.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit a6c19dfe3994 ("arm64,ia64,ppc,s390,sh,tile,um,x86,mm: remove default gate area"), which predates riscv's inclusion in Linux by almost three years, the default behavior wrt the gate area is sane. Remove riscv's gate area stubs. Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Signed-off-by: Andy Lutomirski Reviewed-by: Christoph Hellwig --- arch/riscv/include/asm/page.h | 4 ---- arch/riscv/kernel/vdso.c | 19 ------------------- 2 files changed, 23 deletions(-) diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h index 8ddb6c7fedac..d3e5f6c0c21a 100644 --- a/arch/riscv/include/asm/page.h +++ b/arch/riscv/include/asm/page.h @@ -115,8 +115,4 @@ extern unsigned long min_low_pfn; #include #include -/* vDSO support */ -/* We do define AT_SYSINFO_EHDR but don't use the gate mechanism */ -#define __HAVE_ARCH_GATE_AREA - #endif /* _ASM_RISCV_PAGE_H */ diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c index a0084c36d270..c9c21e0d5641 100644 --- a/arch/riscv/kernel/vdso.c +++ b/arch/riscv/kernel/vdso.c @@ -92,22 +92,3 @@ const char *arch_vma_name(struct vm_area_struct *vma) return "[vdso]"; return NULL; } - -/* - * Function stubs to prevent linker errors when AT_SYSINFO_EHDR is defined - */ - -int in_gate_area_no_mm(unsigned long addr) -{ - return 0; -} - -int in_gate_area(struct mm_struct *mm, unsigned long addr) -{ - return 0; -} - -struct vm_area_struct *get_gate_vma(struct mm_struct *mm) -{ - return NULL; -}