Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754849AbdDJP4e (ORCPT ); Mon, 10 Apr 2017 11:56:34 -0400 Received: from mail-ua0-f177.google.com ([209.85.217.177]:34128 "EHLO mail-ua0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754259AbdDJP41 (ORCPT ); Mon, 10 Apr 2017 11:56:27 -0400 MIME-Version: 1.0 In-Reply-To: <20170410151723.602367196@linutronix.de> References: <20170410151426.808543816@linutronix.de> <20170410151723.602367196@linutronix.de> From: Andy Lutomirski Date: Mon, 10 Apr 2017 08:56:06 -0700 Message-ID: Subject: Re: [patch 2/3] x86/vdso: Plug race between mapping and ELF header setup To: Thomas Gleixner Cc: LKML , X86 ML , Peter Zijlstra , Mathias Krause , stable 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: 700 Lines: 18 On Mon, Apr 10, 2017 at 8:14 AM, Thomas Gleixner wrote: > The vsyscall32 sysctl can racy against a concurrent fork when it switches > from disabled to enabled: > > arch_setup_additional_pages() > if (vdso32_enabled) > --> No mapping > sysctl.vsysscall32() > --> vdso32_enabled = true > create_elf_tables() > ARCH_DLINFO_IA32 > if (vdso32_enabled) { > --> Add VDSO entry with NULL pointer > > Make ARCH_DLINFO_IA32 check whether the VDSO mapping has been set up for > the newly forked process or not. Acked-by: Andy Lutomirski