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:   Wed, 2 Feb 2022 21:11:05 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Mike Kravetz <mike.kravetz@...cle.com>
Cc:     Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Mina Almasry <almasrymina@...gle.com>,
        Yosry Ahmed <yosryahmed@...gle.com>,
        Shuah Khan <shuah@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] selftests/vm: cleanup hugetlb file after mremap test

On Tue, Feb 1, 2022 at 11:35 AM Mike Kravetz <mike.kravetz@...cle.com> wrote:
>
> The hugepage-mremap test will create a file in a hugetlb filesystem.
> In a default 'run_vmtests' run, the file will contain all the hugetlb
> pages.  After the test, the file remains and there are no free hugetlb
> pages for subsequent tests. This causes those hugetlb tests to fail.
>
> Change hugepage-mremap to take the name of the hugetlb file as an
> argument.  Unlink the file within the test, and just to be sure remove
> the file in the run_vmtests script.
>
> Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>
> ---
[...]
> diff --git a/tools/testing/selftests/vm/run_vmtests.sh b/tools/testing/selftests/vm/run_vmtests.sh
> index e09040a3dc08..e10d50e0b8e8 100755
> --- a/tools/testing/selftests/vm/run_vmtests.sh
> +++ b/tools/testing/selftests/vm/run_vmtests.sh
> @@ -111,13 +111,14 @@ fi
>  echo "-----------------------"
>  echo "running hugepage-mremap"
>  echo "-----------------------"
> -./hugepage-mremap 256
> +./hugepage-mremap $mnt/huge_mremap
>  if [ $? -ne 0 ]; then
>         echo "[FAIL]"
>         exitcode=1
>  else
>         echo "[PASS]"
>  fi
> +rm -f $mnt/huge_mremap
>

A little strange (since file creation and deletion are not in the same place).
I know $mnt/huge_mremap is created in hugepage-mremap. But I think
hugepage-mremap should do the housekeeping instead of deleting the file
here. Or we can create the file before doing the test. Like:

 + touch $mnt/huge_mremap
 -./hugepage-mremap 256
 +./hugepage-mremap $mnt/huge_mremap
 +rm -f $mnt/huge_mremap

Otherwise LGTM.

Reviewed-by: Muchun Song <songmuchun@...edance.com>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ