From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756044AbcDGMWD (ORCPT ); Thu, 7 Apr 2016 08:22:03 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:35005 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755472AbcDGMWA (ORCPT ); Thu, 7 Apr 2016 08:22:00 -0400 Date: Thu, 7 Apr 2016 15:21:56 +0300 From: Cyrill Gorcunov To: Dmitry Safonov , Andy Lutomirski Cc: Shuah Khan , "H. Peter Anvin" , 0x7f454c46@gmail.com, khorenko@virtuozzo.com, "linux-kernel@vger.kernel.org" , Thomas Gleixner , Borislav Petkov , xemul@virtuozzo.com, linux-kselftest@vger.kernel.org, Andrew Morton , X86 ML , Ingo Molnar , Dave Hansen Subject: Re: [PATCH 1/2] x86/arch_prctl: add ARCH_SET_{COMPAT,NATIVE} to change compatible mode Message-ID: <20160407122156.GG2258@uranus.lan> References: <1459960170-4454-1-git-send-email-dsafonov@virtuozzo.com> <1459960170-4454-2-git-send-email-dsafonov@virtuozzo.com> <57064E6C.2030202@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57064E6C.2030202@virtuozzo.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 07, 2016 at 03:11:24PM +0300, Dmitry Safonov wrote: > On 04/06/2016 09:04 PM, Andy Lutomirski wrote: > >[cc Dave Hansen for MPX] > > > Will add x32 support for v2. > >I think that you should separate vdso remapping from "personality". > >vdso remapping should be available even on native 32-bit builds, which > >means that either you can't use arch_prctl for it or you'll have to > >wire up arch_prctl as a 32-bit syscall. > I cant say, I got your point. Do you mean by vdso remapping > mremap for vdso/vvar pages? I think, it should work now. > I did remapping for vdso as blob for native x86_64 task differs > to compatible task. So it's just changing blobs, address value > is there for convenience - I may omit it and just remap > different vdso blob at the same place where was previous vdso. > I'm not sure, why do we need possibility to map 64-bit vdso blob > on native 32-bit builds? First of all, thanks a huge for all your comments, Andy! Dima, I'm not seeing in patch, don't you have to take mm::mmap_sem when walking over VMAs? Cyrill