From patchwork Mon Apr 1 11:20:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Frascino X-Patchwork-Id: 10879729 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 792A21575 for ; Mon, 1 Apr 2019 11:20:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F12C2862C for ; Mon, 1 Apr 2019 11:20:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51F3C28643; Mon, 1 Apr 2019 11:20:42 +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 DA439285A5 for ; Mon, 1 Apr 2019 11:20:41 +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=rZGk4t3h3uinnjZbxrTzcs2fKQR0y3kULL76erD/XF4=; b=YVBMb+kHAHndrf mQchOGFATcGJONLuFhaYHSaI1F50/TOg7JDlyK1+7Cx0mgluoqYxj8TgblirBi9yCdh7YUCyFb3pw TpeTclvZC3rEFjYZMGZZXp56+RoyvNv86bpl6JCmfzZ/3mawI8mQKD6lCwy3Vzu9P69sE7iqva060 yMhqFV2EthlwyaRXjb+HLXphDEb+9XerGEqTHJolash8ZR8YLUQ8CtWbDnsJndd5zG2kZNIZhvs2K jKV2pqQZCx+dD1Yh2E1wgltK7yjIF1hpVl5bridCFrXpea/q9jorvYYONsNTFzgcCHDq2Hb/fiUYR gSMfyLbStY4BhQomixww==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAuzX-0001Ja-VB; Mon, 01 Apr 2019 11:20:39 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAuzU-0001IY-QD for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2019 11:20:38 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8854EA78; Mon, 1 Apr 2019 04:20:35 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6E9FC3F557; Mon, 1 Apr 2019 04:20:34 -0700 (PDT) From: Vincenzo Frascino To: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/4] arm64: compat: Add kuser helpers config option Date: Mon, 1 Apr 2019 12:20:21 +0100 Message-Id: <20190401112025.40807-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190401_042036_855960_59D32F72 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Catalin Marinas , Will Deacon Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently on arm64 compat kuser helper are enabled by default. To be on pair with arm32, this patchset makes it possible to disable the kuser helpers by adding a CONFIG_KUSER_HELPERS option which is enabled by default to avoid compatibility issues. When the config option is disabled: - The kuser helpers-related code is not compiled with the kernel. - The kuser helpers mapping, for any compat process, at 0xffff0000 is not done. - Any attempt to use a kuser helper from a compat process will result in a segfault. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Vincenzo Frascino Vincenzo Frascino (4): arm64: compat: Alloc separate pages for vectors and sigpage arm64: compat: Split kuser32 arm64: compat: Refactor aarch32_alloc_vdso_pages() arm64: compat: Add KUSER_HELPERS config option arch/arm64/Kconfig | 30 ++++++ arch/arm64/include/asm/elf.h | 6 +- arch/arm64/include/asm/processor.h | 4 +- arch/arm64/include/asm/signal32.h | 2 - arch/arm64/kernel/Makefile | 5 +- arch/arm64/kernel/kuser32.S | 65 +------------ arch/arm64/kernel/signal32.c | 5 +- arch/arm64/kernel/sigreturn32.S | 46 +++++++++ arch/arm64/kernel/vdso.c | 150 +++++++++++++++++++++++------ 9 files changed, 211 insertions(+), 102 deletions(-) create mode 100644 arch/arm64/kernel/sigreturn32.S