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] [day] [month] [year] [list]
Message-ID: <aWDrwIKamzVQxVOQ@willie-the-truck>
Date: Fri, 9 Jan 2026 11:51:28 +0000
From: Will Deacon <will@...nel.org>
To: "Huang, Ying" <ying.huang@...ux.alibaba.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
	Jianpeng Chang <jianpeng.chang.cn@...driver.com>, ardb@...nel.org,
	anshuman.khandual@....com, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [v3 PATCH] arm64: mm: Fix kexec failure after
 pte_mkwrite_novma() change

On Tue, Jan 06, 2026 at 09:30:23PM +0800, Huang, Ying wrote:
> Catalin Marinas <catalin.marinas@....com> writes:
> > diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h
> > index 161e8660eddd..113c257d19c4 100644
> > --- a/arch/arm64/include/asm/pgtable-prot.h
> > +++ b/arch/arm64/include/asm/pgtable-prot.h
> > @@ -50,11 +50,11 @@
> >
> >  #define _PAGE_DEFAULT		(_PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL))
> >
> > -#define _PAGE_KERNEL		(PROT_NORMAL)
> > -#define _PAGE_KERNEL_RO		((PROT_NORMAL & ~PTE_WRITE) | PTE_RDONLY)
> > -#define _PAGE_KERNEL_ROX	((PROT_NORMAL & ~(PTE_WRITE | PTE_PXN)) | PTE_RDONLY)
> > -#define _PAGE_KERNEL_EXEC	(PROT_NORMAL & ~PTE_PXN)
> > -#define _PAGE_KERNEL_EXEC_CONT	((PROT_NORMAL & ~PTE_PXN) | PTE_CONT)
> > +#define _PAGE_KERNEL		(PROT_NORMAL | PTE_DIRTY)
> > +#define _PAGE_KERNEL_RO		((PROT_NORMAL & ~PTE_WRITE) | PTE_RDONLY | PTE_DIRTY)
> > +#define _PAGE_KERNEL_ROX	((PROT_NORMAL & ~(PTE_WRITE | PTE_PXN)) | PTE_RDONLY | PTE_DIRTY)
> 
> IMHO, it appears not absolutely natural to make read-only kernel mapping
> dirty unconditionally.  However it should work.  I have no strong
> opinions here too.

So I think that's what we *used* to do and it's also what some other
architectures (notably, 32-bit ARM) continue to do. In which case, I
think I'd prefer to follow the tried-and-tested approach of marking all
kernel mappings as dirty unless there's a technical downside of doing
that.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ