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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c66e21b-c782-4ed5-b89d-0d7412ef3c85@redhat.com>
Date: Mon, 15 Sep 2025 15:52:58 +0200
From: David Hildenbrand <david@...hat.com>
To: Chunyan Zhang <zhangchunyan@...as.ac.cn>,
 linux-riscv@...ts.infradead.org, linux-fsdevel@...r.kernel.org,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
 Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
 Alexandre Ghiti <alex@...ti.fr>, Deepak Gupta <debug@...osinc.com>,
 Ved Shanbhogue <ved@...osinc.com>, Alexander Viro <viro@...iv.linux.org.uk>,
 Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
 Andrew Morton <akpm@...ux-foundation.org>, Peter Xu <peterx@...hat.com>,
 Arnd Bergmann <arnd@...db.de>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 "Liam R . Howlett" <Liam.Howlett@...cle.com>,
 Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
 Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
 Axel Rasmussen <axelrasmussen@...gle.com>, Yuanchu Xie <yuanchu@...gle.com>,
 Chunyan Zhang <zhang.lyra@...il.com>
Subject: Re: [PATCH V12 1/5] mm: softdirty: Add pgtable_supports_soft_dirty()

On 15.09.25 12:13, Chunyan Zhang wrote:
> Some platforms can customize the PTE PMD entry soft-dirty bit making it
> unavailable even if the architecture provides the resource.
> 
> Add an API which architectures can define their specific implementations
> to detect if soft-dirty bit is available on which device the kernel is
> running.

You should probably mention that we are removing "ifdef 
CONFIG_MEM_SOFT_DIRTY" in favor of pgtable_supports_soft_dirty() checks 
that defaults to IS_ENABLED(CONFIG_MEM_SOFT_DIRTY) if not overriden by 
the arch -> no change in behavior expected.

Then you should mention that we make sure to never set VM_SOFTDIRTY if 
!pgtable_supports_soft_dirty(), so we will never run into VM_SOFTDIRTY 
checks.

> 
> Signed-off-by: Chunyan Zhang <zhangchunyan@...as.ac.cn>
> ---
>   fs/proc/task_mmu.c      | 15 ++++++---------
>   include/linux/mm.h      |  3 +++
>   include/linux/pgtable.h | 12 ++++++++++++
>   mm/debug_vm_pgtable.c   | 10 +++++-----
>   mm/huge_memory.c        | 13 +++++++------
>   mm/internal.h           |  2 +-
>   mm/mmap.c               |  6 ++++--
>   mm/mremap.c             | 13 +++++++------
>   mm/userfaultfd.c        | 10 ++++------
>   mm/vma.c                |  6 ++++--
>   mm/vma_exec.c           |  5 ++++-
>   11 files changed, 57 insertions(+), 38 deletions(-)
> 

Good! All relevant CONFIG_MEM_SOFT_DIRTY occurrences seem to be gone 
now, which is nice.

Nothing jumped at me, hoping this makes cross-compilers happy.

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ