Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1614921ybd; Wed, 26 Jun 2019 21:47:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQDUgnvlsxdbNqoAuRhM+kRHc5cuWt0MpZNli09ay0T/rHsy+vSE7zOBuE9o9KwRXHDBXa X-Received: by 2002:a17:902:7d86:: with SMTP id a6mr2203776plm.199.1561610876944; Wed, 26 Jun 2019 21:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561610876; cv=none; d=google.com; s=arc-20160816; b=O7B0ieTptsIEBVR1jxR2MUkYMUajL7zl4qXOWBE4X6xWla0U9S3fj0EYGB5MsCNE/J LR3UPrCjb5jx/DY/MgplHFdxRHmAFNNnPKSX1cbU5Q/3Q4dYh+q7OFl3lFJ9J6MPsGte pweswVYup/w+DDCV4cFNYNTFnG9Qiy3l0nogWbBd7h4XTHGz5ZVZFZBLCaB0yVrAviHQ NDylskwzoAQakIjSLHBV49I3D2E+4h/c3HO/+V1HRld1K5aaa33xj1EVntgKKREtwy8d rKNGfstAcrg0qxIATO2lEF2vbFFCeErJNXcnk1+yi38wlY6XHnbKgjCj25bDVN+AXsdY MNnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=OqQio5SkalDs3TzrE767eUg//ZrNCITQGL3nEQjuWgM=; b=Ji4CS5/wfgTPWTMY2FPMF3ANlpjfvEx2BxOuZ6BBqEY8PAsegfUlvV0hly1dx8l6CQ YttgjUV49JQDR+vGJv8z/tkJOrBrhpUNy+AhTS1sEX9sIVJ68yhOhB00QrW9c/lkYOpg NAvB3eBqech7n3YWldkZSx9XHDt8fn+a+8uiD1qtSvTTLF+UB2eTKo8kAjiyQSOs6b8W Iu6faXbQJ0duMlH14fLDaW1xWxZCMyyE6WQr4/SNR+aTxIk/PtptyS8tbqMz5kh4vz1f BaBTyZQo8kwXfG3IS2NcFZXMm7R8phB0ScM/q2xNLzWiFB6LR0AaG1ee+0LbRh2IABsx EKtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fAqrKeDD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t14si1272474plr.53.2019.06.26.21.47.41; Wed, 26 Jun 2019 21:47:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fAqrKeDD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726869AbfF0Eq1 (ORCPT + 99 others); Thu, 27 Jun 2019 00:46:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:57634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725385AbfF0Eq1 (ORCPT ); Thu, 27 Jun 2019 00:46:27 -0400 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 Cc: x86@kernel.org, Kees Cook , Florian Weimer , Jann Horn , Andy Lutomirski , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -} -- 2.21.0