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]
Date:   Mon, 5 Jun 2023 15:24:50 -0400
From:   Peter Xu <peterx@...hat.com>
To:     John Hubbard <jhubbard@...dia.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...hat.com>,
        Shuah Khan <shuah@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>, linux-mm@...ck.org,
        linux-kselftest@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 10/11] selftests/mm: move uffd* routines from
 vm_util.c to uffd-common.c

On Mon, Jun 05, 2023 at 12:09:56PM -0700, John Hubbard wrote:
> On 6/5/23 08:59, Peter Xu wrote:
> ...
> > > -$(OUTPUT)/uffd-stress: uffd-common.c
> > > -$(OUTPUT)/uffd-unit-tests: uffd-common.c
> > > +$(OUTPUT)/uffd-stress:          uffd-common.c
> > > +$(OUTPUT)/uffd-unit-tests:      uffd-common.c
> > > +$(OUTPUT)/hugepage-mremap:      uffd-common.c
> > > +$(OUTPUT)/write_to_hugetlbfs:   uffd-common.c
> > > +$(OUTPUT)/ksm_functional_tests: uffd-common.c
> > 
> > Sorry, John, I still cannot follow..
> > 
> > As I said before uffd-common.[ch] was for uffd stress/unit tests.  I
> > confess my fault to not have named it uffd-test-common.[ch] already.
> 
> Actually, given that there is nothing *except* test code in this
> directory, I think your original choice of file names is just right.
> 
> > 
> > I think it's fine to keep uffd_*() helpers in vm_util.[ch] for now, until
> > it grows.  Just like if one day we'll have a pagemap.c test we don't
> > necessary need to move pagemap_*() helpers from vm_utils.[ch] into
> > pagemap.[ch].  It just keeps common test helpers.
> > 
> > Can we avoid linking those into other tests in whatever way?  Maybe
> > renaming it to uffd-test-common.[ch] may be cleaner?
> > 
> 
> It sounds like you are suggesting this:
> 
> $(OUTPUT)/uffd-stress:          uffd-common.c uffd-test-common.c
> $(OUTPUT)/uffd-unit-tests:      uffd-common.c uffd-test-common.c
> $(OUTPUT)/hugepage-mremap:      uffd-test-common.c
> $(OUTPUT)/write_to_hugetlbfs:   uffd-test-common.c
> $(OUTPUT)/ksm_functional_tests: uffd-test-common.c
> 
> ...approximately. Do I have that correct? I can arrange it that way
> if you feel it's a better end result. (And it's better than leaving
> uffd*() helpers in vm_utils, imho.)

Yes, as long as we don't link (especially) the uffd test specific globals
into non-uffd test programs I'll have no issue.  Thanks.

-- 
Peter Xu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ