Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753182AbdHIKNs (ORCPT ); Wed, 9 Aug 2017 06:13:48 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:45502 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752808AbdHIKNq (ORCPT ); Wed, 9 Aug 2017 06:13:46 -0400 Date: Wed, 9 Aug 2017 11:13:41 +0100 From: Catalin Marinas To: Dmitry Safonov Cc: linux-kernel@vger.kernel.org, 0x7f454c46@gmail.com, Will Deacon , Russell King , Christopher Covington , Cyrill Gorcunov , linux-arm-kernel@lists.infradead.org, Pavel Emelyanov Subject: Re: [PATCH] arm64/vdso: Support mremap() for vDSO Message-ID: <20170809101341.j7qvffmkgaxtfapb@armageddon.cambridge.arm.com> References: <20170726170737.21696-1-dsafonov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170726170737.21696-1-dsafonov@virtuozzo.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1412 Lines: 33 On Wed, Jul 26, 2017 at 08:07:37PM +0300, Dmitry Safonov wrote: > vDSO VMA address is saved in mm_context for the purpose of using > restorer from vDSO page to return to userspace after signal handling. > > In Checkpoint Restore in Userspace (CRIU) project we place vDSO VMA > on restore back to the place where it was on the dump. > With the exception for x86 (where there is API to map vDSO with > arch_prctl()), we move vDSO inherited from CRIU task to restoree > position by mremap(). > > CRIU does support arm64 architecture, but kernel doesn't update > context.vdso pointer after mremap(). Which results in translation > fault after signal handling on restored application: > https://github.com/xemul/criu/issues/288 > > Make vDSO code track the VMA address by supplying .mremap() fops > the same way it's done for x86 and arm32 by: > commit b059a453b1cf ("x86/vdso: Add mremap hook to vm_special_mapping") > commit 280e87e98c09 ("ARM: 8683/1: ARM32: Support mremap() for sigpage/vDSO"). > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Russell King > Cc: linux-arm-kernel@lists.infradead.org > Cc: Cyrill Gorcunov > Cc: Pavel Emelyanov > Cc: Christopher Covington > Signed-off-by: Dmitry Safonov Queued for 4.14. Thanks. -- Catalin