From: Will Deacon <will@kernel.org>
To: Dev Jain <dev.jain@arm.com>
Cc: catalin.marinas@arm.com, anshuman.khandual@arm.com,
quic_zhenhuah@quicinc.com, ryan.roberts@arm.com,
kevin.brodsky@arm.com, yangyicong@hisilicon.com,
joey.gouly@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, david@redhat.com,
mark.rutland@arm.com, urezki@gmail.com, jthoughton@google.com
Subject: Re: [RESEND PATCH v5] arm64: Enable vmalloc-huge with ptdump
Date: Wed, 17 Sep 2025 16:43:00 +0100 [thread overview]
Message-ID: <aMrXBArFNLTdwWs3@willie-the-truck> (raw)
In-Reply-To: <aMk8QhkumtEoPVTh@willie-the-truck>
On Tue, Sep 16, 2025 at 11:30:26AM +0100, Will Deacon wrote:
> I'm currently trying to put together a litmus test with James (cc'd) so
> maybe we can help you out with that part.
Here's what we came up with. There's not a good way to express the IPI
from kick_all_cpus_sync() but it turns out that the ISB from the TLB
invalidation is sufficient anyway. Does it make sense to you?
AArch64 ptdump
Variant=Ifetch
{
uint64_t pud=0xa110c;
uint64_t pmd;
0:X0=label:"P1:L0"; 0:X1=instr:"NOP"; 0:X2=lock; 0:X3=pud; 0:X4=pmd;
1:X1=0xdead; 1:X2=lock; 1:X3=pud; 1:X4=pmd;
}
P0 | P1 ;
(* static_key_enable *) | (* pud_free_pmd_page *) ;
STR W1, [X0] | LDR X9, [X3] ;
DC CVAU,X0 | STR XZR, [X3] ;
DSB ISH | DSB ISH ;
IC IVAU,X0 | ISB ;
DSB ISH | ;
ISB | (* static key *) ;
| L0: ;
(* mmap_lock *) | B out1 ;
Lwlock: | ;
MOV W7, #1 | (* mmap_lock *) ;
SWPA W7, W8, [X2] | Lrlock: ;
| MOV W7, #1 ;
| SWPA W7, W8, [X2] ;
(* walk pgtable *) | ;
LDR X9, [X3] | (* mmap_unlock *) ;
CBZ X9, out0 | STLR WZR, [X2] ;
EOR X10, X9, X9 | ;
LDR X11, [X4, X10] | out1: ;
| EOR X10, X9, X9 ;
out0: | STR X1, [X4, X10] ;
exists (0:X8=0 /\ 1:X8=0 /\ (* Lock acquisitions succeed *)
0:X9=0xa110c /\ (* P0 sees the valid PUD ...*)
0:X11=0xdead) (* ... but the freed PMD *)
Will
next prev parent reply other threads:[~2025-09-17 15:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 16:18 [RESEND PATCH v5] arm64: Enable vmalloc-huge with ptdump Dev Jain
2025-07-24 5:50 ` Anshuman Khandual
2025-07-24 7:20 ` Dev Jain
2025-07-30 17:00 ` Catalin Marinas
2025-07-30 18:29 ` Ryan Roberts
2025-07-31 4:30 ` Dev Jain
2025-07-31 11:38 ` Catalin Marinas
2025-07-31 7:12 ` Dev Jain
2025-07-31 17:06 ` Catalin Marinas
2025-08-01 12:15 ` Dev Jain
2025-08-01 15:48 ` Catalin Marinas
2025-09-16 10:30 ` Will Deacon
2025-09-17 15:43 ` Will Deacon [this message]
2025-09-19 7:27 ` Will Deacon
2025-09-19 7:46 ` Dev Jain
2025-09-19 10:28 ` Dev Jain
2025-09-19 10:59 ` Will Deacon
2025-09-19 12:14 ` Dev Jain
2025-09-19 12:26 ` Will Deacon
2025-09-19 7:53 ` Dev Jain
2025-09-19 8:11 ` Ryan Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aMrXBArFNLTdwWs3@willie-the-truck \
--to=will@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=joey.gouly@arm.com \
--cc=jthoughton@google.com \
--cc=kevin.brodsky@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=quic_zhenhuah@quicinc.com \
--cc=ryan.roberts@arm.com \
--cc=urezki@gmail.com \
--cc=yangyicong@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox