Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752272AbcDIIGe (ORCPT ); Sat, 9 Apr 2016 04:06:34 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:33126 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751356AbcDIIG3 (ORCPT ); Sat, 9 Apr 2016 04:06:29 -0400 MIME-Version: 1.0 In-Reply-To: References: <1459960170-4454-1-git-send-email-dsafonov@virtuozzo.com> <1459960170-4454-2-git-send-email-dsafonov@virtuozzo.com> <57064E6C.2030202@virtuozzo.com> <5707B70F.9080402@virtuozzo.com> <5707D9F1.3090102@virtuozzo.com> From: Dmitry Safonov <0x7f454c46@gmail.com> Date: Sat, 9 Apr 2016 11:06:08 +0300 Message-ID: Subject: Re: [PATCH 1/2] x86/arch_prctl: add ARCH_SET_{COMPAT,NATIVE} to change compatible mode To: Andy Lutomirski Cc: Dmitry Safonov , Thomas Gleixner , Shuah Khan , Ingo Molnar , Dave Hansen , Borislav Petkov , khorenko@virtuozzo.com, X86 ML , Andrew Morton , xemul@virtuozzo.com, linux-kselftest@vger.kernel.org, Cyrill Gorcunov , "linux-kernel@vger.kernel.org" , "H. Peter Anvin" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 32 2016-04-08 23:44 GMT+03:00 Andy Lutomirski : > On Apr 8, 2016 9:20 AM, "Dmitry Safonov" wrote: >> >> >> And if it's not there - return error? > > No, just leave IP unchanged. Ok, will resend with this fixup. > > Feel free to ask for help on some of these details. user_64bit_mode > will be helpful too. Thanks. >> I doubt, is it sane to remove >> TS_COMPAT instead, leaving TIF_IA32, as for some cases >> we need to know if task is compatible outside of syscall's path? > > No. TS_COMPAT is important, and it's also better behaved than > TIF_IA32 -- it has a very specific meaning: "am I currently executing > a 32-bit syscall". > > > The comment is wrong :). TS_COMPAT is true on int80 or 32-bit vdso > syscall entries and is false otherwise. 64-bit tasks can use int80 > and, with your patches, will be able to use the 32-bit vdso entry as > well. > Oh, yes, I see what you pointing, thanks, will work on it.