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:   Fri, 13 Aug 2021 16:00:10 +0100
From:   Will Deacon <will@...nel.org>
To:     Gabriel Krisman Bertazi <krisman@...labora.com>
Cc:     shuah@...nel.org, linux-kernel@...r.kernel.org,
        peterz@...radead.org, luto@...nel.org,
        linux-kselftest@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH v2] selftest: Add test for Soft-Dirty PTE bit

On Thu, Jun 03, 2021 at 11:15:18AM -0400, Gabriel Krisman Bertazi wrote:
> This introduces three tests:
> 
> 1) Sanity check soft dirty basic semantics: allocate area, clean, dirty,
> check if the SD bit flipped.
> 
> 2) Check VMA reuse: validate the VM_SOFTDIRTY usage
> 
> 3) Check soft-dirty on huge pages
> 
> This was motivated by Will Deacon's fix commit 912efa17e512 ("mm: proc:
> Invalidate TLB after clearing soft-dirty page state"). I was tracking the
> same issue that he fixed, and this test would have caught it.
> 
> Cc: Will Deacon <will@...nel.org>
> Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com>
> 
> --
> Changes since V1:
>   - Fix last minute build break with page_size
> ---
>  tools/testing/selftests/Makefile              |   1 +
>  tools/testing/selftests/soft-dirty/.gitignore |   1 +
>  tools/testing/selftests/soft-dirty/Makefile   |   9 +
>  .../testing/selftests/soft-dirty/soft-dirty.c | 254 ++++++++++++++++++
>  4 files changed, 265 insertions(+)
>  create mode 100644 tools/testing/selftests/soft-dirty/.gitignore
>  create mode 100644 tools/testing/selftests/soft-dirty/Makefile
>  create mode 100644 tools/testing/selftests/soft-dirty/soft-dirty.c

Although I think adding a test for this is great (and I certainly wouldn't
want to get in the way of that; quite the opposite), I notice that we
already have test_softdirty() in selftests/vm/madv_populate.c. Would we be
better off extending that test instead of introducing another one?

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ