lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201002171429.GB5473@xz-x1>
Date:   Fri, 2 Oct 2020 13:14:29 -0400
From:   Peter Xu <peterx@...hat.com>
To:     Jason Gunthorpe <jgg@...pe.ca>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Kirill A . Shutemov" <kirill@...temov.name>
Subject: Re: [PATCH] mm: Remove src/dst mm parameter in copy_page_range()

On Fri, Oct 02, 2020 at 08:43:12AM -0300, Jason Gunthorpe wrote:
> > -static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
> > -		   pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma,
> > -		   struct vm_area_struct *new,
> > +static int copy_pte_range(pmd_t *dst_pmd, pmd_t *src_pmd,
> > +		   struct vm_area_struct *vma, struct vm_area_struct *new,
> >  		   unsigned long addr, unsigned long end)
> 
> I link this, my only minor quibble is the mixing of dst/src and new
> language, and then reversing the order in each place. Would read
> better to be consistent:
> 
>   copy_pte_range(dst_vma, dst_pmd, src_vma, src_pmd, addr, end)

I have no strong opinion on the ordering, but I agree the names are clearer.
Considering normally we put the same type of parameters to be together, how
about:

  copy_pte_range(dst_vma, src_vma, dst_pmd, src_pmd, addr, end)

Thanks,

-- 
Peter Xu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ