From 6d99e00e825dbfc2e338b682ec22be1df70c626e Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 26 Nov 2026 05:01:14 -0500 Subject: [PATCH 1/2] iommu/apple-dart: undo a paging attach that fails part way apple_dart_attach_dev_paging_unguarded() programs a device's stream maps one at a time. When one fails, for example on a TLB invalidate that times out after the new tables are installed, that stream map and the ones before it kept translating through the new domain's tables. Only a managed DART's streams were taken back out of the domain. The IOMMU core keeps a device whose attach failed on its old domain, and may free the new domain and its tables as soon as the attach returns. On failure, put each stream map the attach reached back on the old domain: bypass for the identity domain, the old tables for a paging domain of this driver. Block it when there is no old domain (a first attach), for the blocked or a DCP domain, and when putting the old domain back fails. Quarantine a managed DART. Take the device's streams out of the failed domain on every DART, except a locked stream the attach reached: apple_dart_domain_free() still has to unmap its firmware root before it frees the tables. tools/asahi/apple-dart-attach-undo-tests.py runs the production attach against a modelled DART, fails it at each stream map from every kind of old domain, and checks where each stream ends up; the previous code fails 11 of its 14 cases. The same undo was first proposed in #2991, together with other changes. Signed-off-by: DjDeveloperr --- drivers/iommu/apple-dart.c | 83 +++++- tools/asahi/apple-dart-attach-undo-tests.py | 309 ++++++++++++++++++++ tools/asahi/run-host-tests.py | 4 + 3 files changed, 393 insertions(+), 3 deletions(-) create mode 100755 tools/asahi/apple-dart-attach-undo-tests.py diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index dc0b0a15d163c..e3d5db3630e96 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -3825,11 +3825,83 @@ static int apple_dart_domain_add_streams(struct apple_dart_domain *domain, true); } +/* + * Undo a paging attach that failed after it programmed the first @reached of + * the device's stream maps (the failing one included) with @domain's tables. + * The IOMMU core keeps a device whose attach failed on @old and may free + * @domain at once, so none of these streams may go on translating through + * it. Each goes back to @old where that is the identity domain or a paging + * domain of this driver, and is blocked otherwise (a first attach has no + * @old) or when putting @old back fails. A managed DART is quarantined. A + * locked DART keeps the firmware's roots; apple_dart_domain_free() unmaps + * them before it frees @domain's tables. + */ +static void apple_dart_attach_paging_undo(struct iommu_domain *domain, + struct apple_dart_master_cfg *cfg, + int reached, struct iommu_domain *old) +{ + struct apple_dart_domain *old_paging = NULL; + struct apple_dart_stream_map *stream_map; + int i; + + if (old && old != domain && old->ops == domain->ops) { + old_paging = to_dart_domain(old); + if (!old_paging->finalized || !old_paging->pgtbl_ops || old_paging->dcp) + old_paging = NULL; + } + + for_each_stream_map(i, cfg, stream_map) { + struct apple_dart *dart = stream_map->dart; + + if (i >= reached) + break; + if (dart->managed_sids) { + apple_dart_managed_quarantine(dart); + continue; + } + if (dart->locked) + continue; + if (old && old->type == IOMMU_DOMAIN_IDENTITY && dart->supports_bypass && + !dart->retained_mtp) { + apple_dart_hw_enable_bypass(stream_map); + continue; + } + if (old_paging && !apple_dart_setup_translation(old_paging, stream_map)) + continue; + apple_dart_hw_disable_dma(stream_map); + } +} + +/* + * Take a failed attach's streams back out of @domain's stream maps, on every + * DART, so that @domain's invalidations and apple_dart_domain_free() no + * longer count them. A locked stream the attach reached stays: its firmware + * root may name @domain's tables, and apple_dart_domain_free() must unmap it + * before it frees them. + */ +static void apple_dart_attach_paging_drop_streams(struct apple_dart_domain *domain, + struct apple_dart_master_cfg *cfg, + int reached) +{ + struct apple_dart_stream_map *stream_map; + int i, j; + + for_each_stream_map(i, cfg, stream_map) { + struct apple_dart *dart = stream_map->dart; + + if (dart->locked && !dart->managed_sids && i < reached) + continue; + for (j = 0; j < BITS_TO_LONGS(dart->num_streams); j++) + atomic_long_and(~stream_map->sidmap[j], + &domain->stream_maps[i].sidmap[j]); + } +} + static int apple_dart_attach_dev_paging_unguarded(struct iommu_domain *domain, struct device *dev, struct iommu_domain *old) { - int ret, i; + int ret, i, reached = 0; struct apple_dart_stream_map *stream_map; struct apple_dart_master_cfg *cfg = dev_iommu_priv_get(dev); struct apple_dart_domain *dart_domain = to_dart_domain(domain); @@ -3856,6 +3928,8 @@ static int apple_dart_attach_dev_paging_unguarded(struct iommu_domain *domain, streams_added = true; for_each_stream_map(i, cfg, stream_map) { + /* From here this stream map may name @domain's tables. */ + reached = i + 1; if (stream_map->dart->managed_sids) { struct apple_dart *dart = stream_map->dart; unsigned long flags; @@ -3882,8 +3956,11 @@ static int apple_dart_attach_dev_paging_unguarded(struct iommu_domain *domain, } err: - if (ret && streams_added && cfg->stream_maps[0].dart->managed_sids) - apple_dart_mod_streams(dart_domain->stream_maps, cfg->stream_maps, false); + if (ret) { + apple_dart_attach_paging_undo(domain, cfg, reached, old); + if (streams_added) + apple_dart_attach_paging_drop_streams(dart_domain, cfg, reached); + } for_each_stream_map(i, cfg, stream_map) pm_runtime_put(stream_map->dart->dev); return ret; diff --git a/tools/asahi/apple-dart-attach-undo-tests.py b/tools/asahi/apple-dart-attach-undo-tests.py new file mode 100755 index 0000000000000..6db1c331d40e6 --- /dev/null +++ b/tools/asahi/apple-dart-attach-undo-tests.py @@ -0,0 +1,309 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-only +"""Run the production DART paging attach against a modelled DART, and fail it part way. + +The model records, for each of a device's stream maps, what the hardware +translates through: a domain's page tables, bypass, or nothing (blocked). The +attach is made to fail at a chosen stream map, the way a TLB invalidate that +times out fails it after the new tables are already installed. Whatever the +domain the device was on before (none, identity, blocked, paging, DCP), no +stream may be left on the failed domain's tables, since the IOMMU core may +free them as soon as the attach returns. The failed device's streams must +also leave the failed domain's stream maps, except a locked stream the attach +reached, whose firmware root the domain still has to unmap when it is freed. + +--ref tests drivers/iommu/apple-dart.c of an older revision instead. +""" +from pathlib import Path +import argparse +import re +import subprocess +import sys +import tempfile + +ROOT = Path(__file__).resolve().parents[2] +FUNCTIONS = ('apple_dart_mod_streams', 'apple_dart_domain_add_streams', + 'apple_dart_attach_paging_undo', 'apple_dart_attach_paging_drop_streams', + 'apple_dart_attach_dev_paging_unguarded') +# Revisions before the undo have only the attach and the stream helpers. +OPTIONAL = {'apple_dart_attach_paging_undo', 'apple_dart_attach_paging_drop_streams'} + +PRELUDE = r''' +#include +#include +#include +#include +#include +#define MAX_DARTS_PER_DEVICE 2 +#define DART_MAX_STREAMS 64 +#define BITS_PER_LONG 64 +#define BITS_TO_LONGS(n) (((n) + BITS_PER_LONG - 1) / BITS_PER_LONG) +#define DECLARE_BITMAP(name, n) unsigned long name[BITS_TO_LONGS(n)] +#define BIT(n) (1UL << (n)) +#define WARN_ON(x) ({ bool w_ = !!(x); w_; }) +#define container_of(p, t, m) ((t *)((char *)(p) - offsetof(t, m))) +typedef struct { long counter; } atomic_long_t; +#define atomic_long_or(v, p) ((p)->counter |= (long)(v)) +#define atomic_long_and(v, p) ((p)->counter &= (long)(v)) +#define atomic_long_read(p) ((p)->counter) +#define spin_lock_irqsave(l, f) ((void)(l), (f) = 0) +#define spin_unlock_irqrestore(l, f) ((void)(l), (void)(f)) +enum { IOMMU_DOMAIN_BLOCKED, IOMMU_DOMAIN_IDENTITY, IOMMU_DOMAIN_DMA }; + +struct device { int unused; }; +struct iommu_domain { int type; const void *ops; }; +struct apple_dart { + int num_streams; + unsigned long managed_sids; + int managed_lock; + bool managed_failed, locked, live_mtp, retained_mtp, supports_bypass; + struct device *dev; +}; +struct apple_dart_stream_map { struct apple_dart *dart; DECLARE_BITMAP(sidmap, DART_MAX_STREAMS); }; +struct apple_dart_atomic_stream_map { + struct apple_dart *dart; + atomic_long_t sidmap[BITS_TO_LONGS(DART_MAX_STREAMS)]; +}; +struct apple_dart_master_cfg { struct apple_dart_stream_map stream_maps[MAX_DARTS_PER_DEVICE]; }; +struct apple_dart_domain { + void *pgtbl_ops; + void *dcp; + bool finalized; + struct apple_dart_atomic_stream_map stream_maps[MAX_DARTS_PER_DEVICE]; + struct iommu_domain domain; +}; +#define for_each_stream_map(i, base, stream_map) \ + for (i = 0, stream_map = &(base)->stream_maps[0]; \ + i < MAX_DARTS_PER_DEVICE && stream_map->dart; \ + stream_map = &(base)->stream_maps[++i]) + +static struct apple_dart_domain *to_dart_domain(struct iommu_domain *dom) +{ + return container_of(dom, struct apple_dart_domain, domain); +} + +/* What each of the device's stream maps translates through. */ +static const char BYPASS[] = "bypass", BLOCKED[] = "blocked", UNTOUCHED[] = "untouched"; +static const void *state[MAX_DARTS_PER_DEVICE]; +static bool quarantined[MAX_DARTS_PER_DEVICE]; +static struct apple_dart_master_cfg cfg; +static struct apple_dart_domain *fail_domain[MAX_DARTS_PER_DEVICE]; +static int finalize_ret, pm_count; + +static int idx_of_map(struct apple_dart_stream_map *s) { return (int)(s - cfg.stream_maps); } +static int idx_of_dart(struct apple_dart *d) +{ + for (int i = 0; i < MAX_DARTS_PER_DEVICE; i++) + if (cfg.stream_maps[i].dart == d) + return i; + return -1; +} +static void *dev_iommu_priv_get(struct device *dev) { (void)dev; return &cfg; } +static int pm_runtime_get_sync(struct device *dev) { (void)dev; pm_count++; return 0; } +static void pm_runtime_put(struct device *dev) { (void)dev; pm_count--; } +static int apple_dart_finalize_domain(struct apple_dart_domain *d, struct apple_dart_master_cfg *c) +{ (void)c; if (!finalize_ret) d->finalized = true; return finalize_ret; } +/* The tables go in first; the invalidate after them is what fails. */ +static int apple_dart_setup_translation(struct apple_dart_domain *d, struct apple_dart_stream_map *s) +{ int i = idx_of_map(s); state[i] = d; return fail_domain[i] == d ? -ETIMEDOUT : 0; } +static int apple_dart_setup_translation_locked(struct apple_dart_domain *d, + struct apple_dart_stream_map *s) +{ int i = idx_of_map(s); state[i] = d; return fail_domain[i] == d ? -ETIMEDOUT : 0; } +static void apple_dart_hw_enable_bypass(struct apple_dart_stream_map *s) { state[idx_of_map(s)] = BYPASS; } +static void apple_dart_hw_disable_dma(struct apple_dart_stream_map *s) { state[idx_of_map(s)] = BLOCKED; } +static void apple_dart_managed_quarantine_locked(struct apple_dart *d) +{ int i = idx_of_dart(d); d->managed_failed = true; quarantined[i] = true; state[i] = BLOCKED; } +static void apple_dart_managed_quarantine(struct apple_dart *d) { apple_dart_managed_quarantine_locked(d); } +''' + +MAIN = r''' +static int failures, cases; +#define CHECK(c, ...) do { if (!(c)) { failures++; printf("FAIL line %d: %s: ", __LINE__, name); \ + printf(__VA_ARGS__); printf("\n"); } } while (0) + +static const int paging_ops, identity_ops, blocked_ops; +static struct apple_dart darts[MAX_DARTS_PER_DEVICE]; +static struct device dart_dev; +static struct apple_dart_domain new_dom, old_dom; +static struct iommu_domain identity = { IOMMU_DOMAIN_IDENTITY, &identity_ops }; +static struct iommu_domain blocked = { IOMMU_DOMAIN_BLOCKED, &blocked_ops }; +/* Device stream 1 on the first DART, 2 on the second; another device has stream 5. */ +#define DEV_SIDS(i) BIT((i) + 1) +#define OTHER_SID BIT(5) + +static void setup(int n) +{ + memset(darts, 0, sizeof(darts)); memset(&cfg, 0, sizeof(cfg)); + memset(&new_dom, 0, sizeof(new_dom)); memset(&old_dom, 0, sizeof(old_dom)); + memset(fail_domain, 0, sizeof(fail_domain)); memset(quarantined, 0, sizeof(quarantined)); + finalize_ret = pm_count = 0; + new_dom.pgtbl_ops = old_dom.pgtbl_ops = &new_dom; + new_dom.domain = (struct iommu_domain){ IOMMU_DOMAIN_DMA, &paging_ops }; + old_dom.domain = (struct iommu_domain){ IOMMU_DOMAIN_DMA, &paging_ops }; + old_dom.finalized = true; + for (int i = 0; i < n; i++) { + darts[i].num_streams = 16; darts[i].dev = &dart_dev; darts[i].supports_bypass = true; + cfg.stream_maps[i].dart = &darts[i]; cfg.stream_maps[i].sidmap[0] = DEV_SIDS(i); + new_dom.stream_maps[i].dart = old_dom.stream_maps[i].dart = &darts[i]; + new_dom.stream_maps[i].sidmap[0].counter = OTHER_SID; + state[i] = UNTOUCHED; + } +} + +static const char *show(const void *s) +{ + return s == &new_dom ? "the failed domain" : s == &old_dom ? "the old domain" : (const char *)s; +} + +/* No stream may be left on the failed domain's tables; reached ones go back or are blocked. */ +static void check_failed(const char *name, int ret, int n, const void *want[]) +{ + CHECK(ret, "the attach reported success"); + CHECK(pm_count == 0, "runtime PM unbalanced by %d", pm_count); + for (int i = 0; i < n; i++) + CHECK(state[i] == want[i], "stream map %d is on %s, expected %s", i, show(state[i]), + show(want[i])); +} + +/* The failed device's streams leave the domain; another device's stay. */ +static void check_dropped(const char *name, int n, unsigned long keep) +{ + for (int i = 0; i < n; i++) { + long map = atomic_long_read(&new_dom.stream_maps[i].sidmap[0]); + bool kept = keep & BIT(i); + + CHECK(!!(map & DEV_SIDS(i)) == kept, "stream map %d: the device's stream %s the domain", + i, kept ? "left" : "is still in"); + CHECK(map & OTHER_SID, "stream map %d: another device's stream left the domain", i); + } +} + +static int attach(struct iommu_domain *old) +{ + return apple_dart_attach_dev_paging_unguarded(&new_dom.domain, &dart_dev, old); +} + +int main(void) +{ + const char *name; + int ret; + + name = "first attach, second stream fails"; + setup(2); fail_domain[1] = &new_dom; ret = attach(NULL); + check_failed(name, ret, 2, (const void *[]){ BLOCKED, BLOCKED }); check_dropped(name, 2, 0); cases++; + + name = "first attach, only stream fails"; + setup(1); fail_domain[0] = &new_dom; ret = attach(NULL); + check_failed(name, ret, 1, (const void *[]){ BLOCKED }); check_dropped(name, 1, 0); cases++; + + name = "from identity"; + setup(2); state[0] = state[1] = BYPASS; fail_domain[1] = &new_dom; ret = attach(&identity); + check_failed(name, ret, 2, (const void *[]){ BYPASS, BYPASS }); check_dropped(name, 2, 0); cases++; + + name = "from identity, retained MTP stream"; + setup(2); darts[0].retained_mtp = true; fail_domain[1] = &new_dom; ret = attach(&identity); + check_failed(name, ret, 2, (const void *[]){ BLOCKED, BYPASS }); cases++; + + name = "from blocked"; + setup(2); state[0] = state[1] = BLOCKED; fail_domain[1] = &new_dom; ret = attach(&blocked); + check_failed(name, ret, 2, (const void *[]){ BLOCKED, BLOCKED }); check_dropped(name, 2, 0); cases++; + + name = "from a paging domain"; + setup(2); state[0] = state[1] = &old_dom; fail_domain[1] = &new_dom; ret = attach(&old_dom.domain); + check_failed(name, ret, 2, (const void *[]){ &old_dom, &old_dom }); check_dropped(name, 2, 0); cases++; + + name = "from a paging domain, first stream fails, second not reached"; + setup(2); state[0] = state[1] = &old_dom; fail_domain[0] = &new_dom; ret = attach(&old_dom.domain); + check_failed(name, ret, 2, (const void *[]){ &old_dom, &old_dom }); check_dropped(name, 2, 0); cases++; + + name = "from a paging domain that cannot be put back"; + setup(2); state[0] = state[1] = &old_dom; fail_domain[1] = &new_dom; fail_domain[0] = &old_dom; + ret = attach(&old_dom.domain); + check_failed(name, ret, 2, (const void *[]){ BLOCKED, &old_dom }); cases++; + + name = "from a DCP domain"; + setup(2); old_dom.dcp = &old_dom; fail_domain[1] = &new_dom; ret = attach(&old_dom.domain); + check_failed(name, ret, 2, (const void *[]){ BLOCKED, BLOCKED }); cases++; + + name = "locked stream reached, second stream fails"; + setup(2); darts[0].locked = true; fail_domain[1] = &new_dom; ret = attach(NULL); + /* The locked root is unmapped when the domain is freed, so it stays in the domain. */ + check_failed(name, ret, 2, (const void *[]){ &new_dom, BLOCKED }); check_dropped(name, 2, BIT(0)); cases++; + + name = "managed DART fails"; + setup(1); darts[0].managed_sids = BIT(1) | BIT(2); fail_domain[0] = &new_dom; ret = attach(NULL); + check_failed(name, ret, 1, (const void *[]){ BLOCKED }); check_dropped(name, 1, 0); + CHECK(quarantined[0], "the managed DART was not quarantined"); cases++; + + name = "managed DART reached, second stream fails"; + setup(2); darts[0].managed_sids = BIT(1) | BIT(2); fail_domain[1] = &new_dom; ret = attach(NULL); + check_failed(name, ret, 2, (const void *[]){ BLOCKED, BLOCKED }); check_dropped(name, 2, 0); + CHECK(quarantined[0], "the managed DART was not quarantined"); cases++; + + name = "domain not finalized"; + setup(2); finalize_ret = -EINVAL; ret = attach(NULL); + check_failed(name, ret, 2, (const void *[]){ UNTOUCHED, UNTOUCHED }); check_dropped(name, 2, 0); cases++; + + name = "success"; + setup(2); state[0] = state[1] = &old_dom; ret = attach(&old_dom.domain); + CHECK(!ret, "the attach failed: %d", ret); CHECK(pm_count == 0, "runtime PM unbalanced"); + CHECK(state[0] == &new_dom && state[1] == &new_dom, "not every stream is on the new domain"); + check_dropped(name, 2, BIT(0) | BIT(1)); cases++; + + if (failures) + return 1; + printf("%d paging attach undo cases PASS\n", cases); + return 0; +} +''' + + +def function(text, name): + # A definition: 'static', its type (maybe on a line of its own), the name. + match = re.search(r'^static[^;{}()]*?\b' + re.escape(name) + r'\([^;{}]*\)\s*\{', text, re.M) + if not match: + return None + start = text.index('{', match.start()) + depth = 1 + end = start + 1 + while depth: + depth += (text[end] == '{') - (text[end] == '}') + end += 1 + return text[match.start():end] + + +def main(): + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser.add_argument('--source', type=Path, help='an apple-dart.c to test (default: this tree)') + parser.add_argument('--ref', help='test drivers/iommu/apple-dart.c of this revision instead') + args = parser.parse_args() + if args.ref: + text = subprocess.check_output(['git', '-C', str(ROOT), 'show', + args.ref + ':drivers/iommu/apple-dart.c'], text=True) + else: + text = (args.source or ROOT / 'drivers/iommu/apple-dart.c').read_text() + + bodies = [] + for name in FUNCTIONS: + body = function(text, name) + if body is None and name not in OPTIONAL: + print(f'FAIL line 0: {name} is missing') + sys.exit(1) + if body: + bodies.append(body) + + with tempfile.TemporaryDirectory(prefix='dart-attach-undo-') as tmp: + source = Path(tmp) / 'production.c' + binary = Path(tmp) / 'production' + source.write_text(PRELUDE + '\n'.join(bodies) + MAIN) + subprocess.run(['cc', '-std=gnu11', '-O1', '-g', '-Wall', '-Werror', '-Wno-unused-function', + '-fsanitize=address,undefined', '-fno-omit-frame-pointer', + str(source), '-o', str(binary)], check=True) + run = subprocess.run([str(binary)], capture_output=True, text=True) + sys.stdout.write(run.stdout) + sys.stdout.write(run.stderr) + sys.exit(1 if run.returncode else 0) + + +if __name__ == '__main__': + main() diff --git a/tools/asahi/run-host-tests.py b/tools/asahi/run-host-tests.py index a3c33382e0fb1..c55df81611c7b 100755 --- a/tools/asahi/run-host-tests.py +++ b/tools/asahi/run-host-tests.py @@ -140,6 +140,10 @@ def mutations(flag, names, base, expect=KILL): 'no-t6050-wake-restore'), out()), 'apple-m4-pmu-tests.py': [([], PASS)] + mutations('--mutation', ('m1-layout', 'cycles-anywhere', 'expose-8-9', 'flags-in-event'), []), + # 255761f1d55f leaves streams on a domain whose paging attach failed part way. + 'apple-dart-attach-undo-tests.py': [([], PASS), + (['--ref', '255761f1d55f8dcf3e2c24d17095439237ad6f72'], + KILL)], 'apple-dart-dapf-tests.py': [(out(), PASS)] + mutations('--mutation', ('missing-guard', 'ignore-replay', 'ignore-orphan'), out()), 'apple-dart-fw-tests.py': [(out(), PASS)], From d29e5482577389798bce429d45cb55232d44502e Mon Sep 17 00:00:00 2001 From: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Date: Sun, 29 Nov 2026 13:23:12 +1100 Subject: [PATCH 2/2] selftests: apple: bcm4377-radio-sids: extract the attach undo helpers apple_dart_attach_dev_paging_unguarded() now calls apple_dart_attach_paging_undo() and apple_dart_attach_paging_drop_streams(), which the harness did not extract, so host-tests failed with an implicit function declaration. Add both to the definition list, with the iommu_domain ops/type and apple_dart_domain finalized stub fields the undo helper reads. Signed-off-by: Ryan Murray --- tools/testing/selftests/drivers/apple/bcm4377-radio-sids.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/drivers/apple/bcm4377-radio-sids.py b/tools/testing/selftests/drivers/apple/bcm4377-radio-sids.py index bf0ffb0b06e98..1f95617c5a2eb 100755 --- a/tools/testing/selftests/drivers/apple/bcm4377-radio-sids.py +++ b/tools/testing/selftests/drivers/apple/bcm4377-radio-sids.py @@ -241,13 +241,14 @@ def main(): } struct io_pgtable { struct io_pgtable_cfg cfg; }; #define io_pgtable_ops_to_pgtable(p) (p) -struct iommu_domain { int unused; }; +struct iommu_domain { const void *ops; int type; }; struct apple_dart_domain { struct iommu_domain domain; struct io_pgtable *pgtbl_ops; struct apple_dart_atomic_stream_map stream_maps[2]; void *dcp; u64 dma_offset; + bool finalized; }; static struct apple_dart_domain *to_dart_domain(struct iommu_domain *p) { return (struct apple_dart_domain *)p; } @@ -409,6 +410,8 @@ def main(): 'apple_dart_mod_streams(', 'static int apple_dart_domain_add_streams(', 'apple_dart_setup_translation(', + 'static void apple_dart_attach_paging_undo(', + 'static void apple_dart_attach_paging_drop_streams(', 'static int apple_dart_attach_dev_paging_unguarded(', 'static int apple_dart_attach_dev_paging_v27(', 'static int apple_dart_attach_dev_paging(',