From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756016AbcB2PvW (ORCPT ); Mon, 29 Feb 2016 10:51:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37815 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753718AbcB2PvS (ORCPT ); Mon, 29 Feb 2016 10:51:18 -0500 Date: Mon, 29 Feb 2016 16:51:14 +0100 From: Oleg Nesterov To: Peter Zijlstra Cc: Andy Lutomirski , Ingo Molnar , Jiri Olsa , Pratyush Anand , linux-kernel@vger.kernel.org Subject: Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault Message-ID: <20160229155114.GA1922@redhat.com> References: <20160227221128.GA29565@redhat.com> <20160229114210.GK6356@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160229114210.GK6356@twins.programming.kicks-ass.net> 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 02/29, Peter Zijlstra wrote: > > On Sat, Feb 27, 2016 at 11:11:28PM +0100, Oleg Nesterov wrote: > > --- a/kernel/events/uprobes.c > > +++ b/kernel/events/uprobes.c > > @@ -1178,6 +1178,7 @@ static struct xol_area *__create_xol_area(unsigned long vaddr) > > goto free_area; > > > > area->xol_mapping.name = "[uprobes]"; > > + area->xol_mapping.fault = NULL; > > area->xol_mapping.pages = area->pages; > > Would not something like: > > area->xol_mapping = (struct vm_special_mapping){ > .name = "[uprobes]", > .pages = area->pages, > }; > > Be a more robust approach? That way, if someone adds more fields, they > at least get initialized (to 0). OK, agreed... Do you want me to send v2? Or incremental patch because this one is already in -tip tree. Or do nothing unless you feel strongly about it. area->xol_mapping should go away, but we need a simple preparation in mm/mmap.c. Oleg.