From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D646BC433DB for ; Thu, 18 Mar 2021 18:08:27 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C65B64EE2 for ; Thu, 18 Mar 2021 18:08:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C65B64EE2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EMEowH4AxYFBFFf9OEa4/QG/2MAQ03mNV7UEoZArENw=; b=ROpGc7viKUBnWtaOZy3Zl+s/J VWnsgGP3ZqYH2s/7c+/lvrW25otHrCffjGqgrImNxU4Nrr/v0fWVB4VamnBgOZmXRbWy2SmIyPPP4 AOex8JtvLXB47OK7DW3uJDE+DtQN4j4+3ZQlQwaD0LrqlB7C4oLMeytEcQ98NlitvgMUz/IjbOtIK vU7ytODul8+aQ1WytUPa4XF79xB8XYy3AQa8h8ZYC4H0oILDDFMfgYPlzKxLTxMsNpLYMzFG9MAk8 aaIWUmEIcULq65oy/y/Tlj/+nrAyMVJjogIKqNKrgvSZrWxJnela9zVFtMHN7YG3cZQRtcSEzty0q 3oDJ8xPsA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMx2u-005nsy-Kq; Thu, 18 Mar 2021 18:06:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMx2r-005nsO-Mf for linux-arm-kernel@lists.infradead.org; Thu, 18 Mar 2021 18:06:55 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3287D31B; Thu, 18 Mar 2021 11:06:42 -0700 (PDT) Received: from [10.37.12.7] (unknown [10.37.12.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 214343F70D; Thu, 18 Mar 2021 11:06:36 -0700 (PDT) Subject: Re: [PATCH 3/5] arm64: compat: Allow signal page to be remapped To: Will Deacon , linux-arm-kernel@lists.infradead.org Cc: kernel-team@android.com, Catalin Marinas , Mark Rutland , Marc Zyngier , Russell King References: <20210318170738.7756-1-will@kernel.org> <20210318170738.7756-4-will@kernel.org> From: Vincenzo Frascino Message-ID: Date: Thu, 18 Mar 2021 18:06:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210318170738.7756-4-will@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210318_180653_934247_DDB0003A X-CRM114-Status: GOOD ( 18.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/18/21 5:07 PM, Will Deacon wrote: > For compatability with 32-bit Arm, allow the compat signal page to be > remapped via mremap(). > > Signed-off-by: Will Deacon Reviewed-by: Vincenzo Frascino > --- > arch/arm64/kernel/vdso.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c > index 421411981dc3..16bf0b46fb70 100644 > --- a/arch/arm64/kernel/vdso.c > +++ b/arch/arm64/kernel/vdso.c > @@ -271,6 +271,14 @@ enum aarch32_map { > static struct page *aarch32_vectors_page __ro_after_init; > static struct page *aarch32_sig_page __ro_after_init; > > +static int aarch32_sigpage_mremap(const struct vm_special_mapping *sm, > + struct vm_area_struct *new_vma) > +{ > + current->mm->context.sigpage = (void *)new_vma->vm_start; > + > + return 0; > +} > + > static struct vm_special_mapping aarch32_vdso_maps[] = { > [AA32_MAP_VECTORS] = { > .name = "[vectors]", /* ABI */ > @@ -279,6 +287,7 @@ static struct vm_special_mapping aarch32_vdso_maps[] = { > [AA32_MAP_SIGPAGE] = { > .name = "[sigpage]", /* ABI */ > .pages = &aarch32_sig_page, > + .mremap = aarch32_sigpage_mremap, > }, > [AA32_MAP_VVAR] = { > .name = "[vvar]", > -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel