Re: [PATCH v2 01/12] uprobes: update outdated comment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/03, Oleg Nesterov wrote:
>
> >  	/*
> > -	 * The NULL 'tsk' here ensures that any faults that occur here
> > -	 * will not be accounted to the task.  'mm' *is* current->mm,
> > -	 * but we treat this as a 'remote' access since it is
> > -	 * essentially a kernel access to the memory.
> > +	 * 'mm' *is* current->mm, but we treat this as a 'remote' access since
> > +	 * it is essentially a kernel access to the memory.
> >  	 */
> >  	result = get_user_pages_remote(mm, vaddr, 1, FOLL_FORCE, &page, NULL);
>
> OK, this makes it less confusing, so
>
> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>
> ---------------------------------------------------------------------
> but it still looks confusing to me. This code used to pass tsk = NULL
> only to avoid tsk->maj/min_flt++ in faultin_page().
>
> But today mm_account_fault() increments these counters without checking
> FAULT_FLAG_REMOTE, mm == current->mm, so it seems it would be better to
> just use get_user_pages() and remove this comment?

Well, yes, it still looks confusing, imo.

Andrii, I hope you won't mind if I redo/resend this and the next cleanup?

The next one only updates the comment above uprobe_write_opcode(), but
it would be nice to explain mmap_write_lock() in register_for_each_vma().

Oleg.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux