Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034257AbcJ0W0S (ORCPT ); Thu, 27 Oct 2016 18:26:18 -0400 Received: from mail-vk0-f48.google.com ([209.85.213.48]:34656 "EHLO mail-vk0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034190AbcJ0W0P (ORCPT ); Thu, 27 Oct 2016 18:26:15 -0400 MIME-Version: 1.0 In-Reply-To: <20161027141516.28447-3-dsafonov@virtuozzo.com> References: <20161027141516.28447-1-dsafonov@virtuozzo.com> <20161027141516.28447-3-dsafonov@virtuozzo.com> From: Andy Lutomirski Date: Thu, 27 Oct 2016 15:25:53 -0700 Message-ID: Subject: Re: [PATCH 2/2] x86/vdso: set vdso pointer only after success To: Dmitry Safonov Cc: "linux-kernel@vger.kernel.org" , Dmitry Safonov <0x7f454c46@gmail.com>, Cyrill Gorcunov , Andy Lutomirski , Oleg Nesterov , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "linux-mm@kvack.org" , X86 ML 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: 709 Lines: 12 On Thu, Oct 27, 2016 at 7:15 AM, Dmitry Safonov wrote: > Those pointers were initialized before call to _install_special_mapping > after the commit f7b6eb3fa072 ("x86: Set context.vdso before installing > the mapping"). This is not required anymore as special mappings have > their vma name and don't use arch_vma_name() after commit a62c34bd2a8a > ("x86, mm: Improve _install_special_mapping and fix x86 vdso naming"). > So, this way to init looks less entangled. > I even belive, we can remove null initializers: > - on failure load_elf_binary() will not start a new thread; > - arch_prctl will have the same pointers as before syscall. Acked-by: Andy Lutomirski