From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764954AbdEWUJz (ORCPT ); Tue, 23 May 2017 16:09:55 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:54782 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759481AbdEWUJx (ORCPT ); Tue, 23 May 2017 16:09:53 -0400 Date: Tue, 23 May 2017 21:09:46 +0100 From: Russell King - ARM Linux To: Dmitry Safonov Cc: Will Deacon , linux-kernel@vger.kernel.org, 0x7f454c46@gmail.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv2] ARM32: Support mremap() for sigpage/vDSO Message-ID: <20170523200946.GG22219@n2100.armlinux.org.uk> References: <20170414132529.8337-1-dsafonov@virtuozzo.com> <871579ef-ee9a-c321-80e4-47836bb0e472@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 18, 2017 at 02:13:29PM +0300, Dmitry Safonov wrote: > On 04/25/2017 08:18 PM, Dmitry Safonov wrote: > >On 04/14/2017 04:25 PM, Dmitry Safonov wrote: > >>CRIU restores application mappings on the same place where they > >>were before Checkpoint. That means, that we need to move vDSO > >>and sigpage during restore on exactly the same place where > >>they were before C/R. > >> > >>Make mremap() code update mm->context.{sigpage,vdso} pointers > >>during VMA move. Sigpage is used for landing after handling > >>a signal - if the pointer is not updated during moving, the > >>application might crash on any signal after mremap(). > >> > >>vDSO pointer on ARM32 is used only for setting auxv at this moment, > >>update it during mremap() in case of future usage. > >> > >>Without those updates, current work of CRIU on ARM32 is not reliable. > >>Historically, we error Checkpointing if we find vDSO page on ARM32 > >>and suggest user to disable CONFIG_VDSO. > >>But that's not correct - it goes from x86 where signal processing > >>is ended in vDSO blob. For arm32 it's sigpage, which is not disabled > >>with `CONFIG_VDSO=n'. > >> > >>Looks like C/R was working by luck - because userspace on ARM32 at > >>this moment always sets SA_RESTORER. > >> > >>Cc: linux-arm-kernel@lists.infradead.org > >>Cc: Russell King > >>Cc: Will Deacon > >>Cc: Andy Lutomirski > >>Cc: Thomas Gleixner > >>Cc: Cyrill Gorcunov > >>Cc: Pavel Emelyanov > >>Cc: Christopher Covington > >>Signed-off-by: Dmitry Safonov > >>--- > >>v2: (buildbot) Fix (unsinged long) to (void*) cast warning. > >> > >> arch/arm/kernel/process.c | 8 ++++++++ > >> arch/arm/kernel/vdso.c | 18 ++++++++++++++++++ > >> arch/x86/entry/vdso/vma.c | 3 --- > >> mm/mmap.c | 4 ++++ > >> 4 files changed, 30 insertions(+), 3 deletions(-) > > > >Ping? > > Ping? I'm mostly happy with the ARM bits, but I can't take the patch without acks from others because it touches other architectures/generic code. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.