Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1345933

Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify xol_mapping.fault
Date 2016-02-29 17:00 +0100
Message-ID <r7yoO-4YQ-15@gated-at.bofh.it> (permalink)
References <r6Vns-15z-5@gated-at.bofh.it> <r7uuR-2tX-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify  xol_mapping.fault Oleg Nesterov <oleg@redhat.com> - 2016-02-27 23:20 +0100
  [tip:x86/asm] uprobes: __create_xol_area() must nullify  xol_mapping.fault tip-bot for Oleg Nesterov <tipbot@zytor.com> - 2016-02-29 12:10 +0100
  Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify  xol_mapping.fault Peter Zijlstra <peterz@infradead.org> - 2016-02-29 12:50 +0100
    Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify  xol_mapping.fault Oleg Nesterov <oleg@redhat.com> - 2016-02-29 17:00 +0100
      Re: [PATCH tip/x86/asm] uprobes: __create_xol_area() must nullify  xol_mapping.fault Peter Zijlstra <peterz@infradead.org> - 2016-02-29 17:20 +0100

csiph-web