From 3a0a38467b6adac0dc215db4149fa2a119c4bcfd Mon Sep 17 00:00:00 2001 From: Matiq Date: Sun, 23 Aug 2026 22:11:33 +0300 Subject: [PATCH] =?UTF-8?q?23d:=20BREAKTHROUGH=20=E2=80=94=20live=20kernel?= =?UTF-8?q?=20captured=20via=20SIGSTOP=20sampling=20of=20offline=20render?= =?UTF-8?q?=20(rendersnap.py);=20bands[]=20input=20to=20DESIGN=20is=20the?= =?UTF-8?q?=20raw=20per-frame=20signal=20spectrum=20(Hann=20lobes=20at=20t?= =?UTF-8?q?one=20bins=20only!),=20captured=20FIR=20shows=20skirt=20cut=20d?= =?UTF-8?q?eeper=20than=20center=20exactly=20as=20real=20output=20(0.473@2?= =?UTF-8?q?000=20vs=200.524@500)=20despite=20R-curve=20claiming=20otherwis?= =?UTF-8?q?e;=20am/res=20structure=20confirmed=20with=20twin=20template=20?= =?UTF-8?q?as=20divider;=20recipe=20for=20exact=20ops=20formula=20next=20r?= =?UTF-8?q?ound?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handoff/NOTES_LEVEL.md | 40 +++++++++ scripts/rendersnap.py | 192 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 232 insertions(+) create mode 100644 scripts/rendersnap.py diff --git a/handoff/NOTES_LEVEL.md b/handoff/NOTES_LEVEL.md index 1752356..94971c9 100644 --- a/handoff/NOTES_LEVEL.md +++ b/handoff/NOTES_LEVEL.md @@ -2287,3 +2287,43 @@ DESIGN ≠ захваченные кривые (768/788/7f8 — возможно ПОЯВЛЕНИЯ pid (ppid=reaper, comm ещё 'wine'), INT3 на 0x1802a24c0/0x1802fa420, CONT, дамп rcx/rdx на хите (скрипт fnall.py готов, нужен только ранний захват — нынешний finder по maps опаздывает на init-бурст <5 мс). + +## ============ UPDATE 2026-08-23h (23d): ПРОРЫВ — ЖИВОЙ КЕРНЕЛ СНЯТ, bands[] = СПЕКТР СИГНАЛА ============ + +Маршрут A удался БЕЗ ptrace и БЕЗ аудио-девайса: **SIGSTOP-семплирование +офлайн-рендера** (`-renderproject`; обработка back-to-back ⇒ случайные остановки +попадают внутрь конвейера). scripts/rendersnap.py: find-loop ctx (vtable-маркер +0x1824AC210 / float 48000+ sens; ctx=0x2370040 стабилен и в рендере), +затем STOP→читаем все слоты→CONT c детекцией изменений. 24 фазы за прогон. + +### Решающие факты из phase-снапов (dual q=0.5) +1. **bands[0] @ctx+0x540678 = АМПЛИТУДНЫЙ СПЕКТР ТЕКУЩЕГО ФРЕЙМА**: + ненулевые группы ТОЛЬКО вокруг тонов (бины 41–45 и 168–173, Hann-лепестки; + band[43]=7.65, band[171]=9.91), между ними нули. Это вход DESIGN, НЕ шаблон + маски и НЕ пост-детекторная кривая! +2. scratch@540628 ≈ log(bands)·k (после ops значения −0.66@43, −0.76@171). +3. Живой FIR@668 (комплексные пары): mag(43)=0.524 (−5.61 дБ), mag(171)=0.473 + (**−6.51 дБ**) — скайрт режется ГЛУБЖЕ центра, КАК В РЕАЛЕ (+1.5 дБ), + хотя кривая R@7f8 утверждает обратное (R171=1.41 1 else '/home/m/soothe-bt/dual_b1q_0.5.rpp' + nattempts = int(sys.argv[2]) if len(sys.argv) > 2 else 300 + os.makedirs(OUT, exist_ok=True) + subprocess.run("pkill -9 -x reaper; pkill -9 -f '[y]abridge'; sleep 1", shell=True) + wav = rpp.replace('.rpp', '.wav') + if os.path.exists(wav): + os.remove(wav) + proc = subprocess.Popen(['/usr/bin/reaper', '-nosplash', '-ignoreerrors', + '-renderproject', rpp], + stdout=open('/dev/null', 'w'), stderr=subprocess.STDOUT) + host = None + t0 = time.time() + while time.time() - t0 < 30 and not host: + host = find_host() + time.sleep(0.001) + if not host: + print('NO HOST') + return 1 + print('host %d at %.3fs' % (host, time.time() - t0), flush=True) + + fd = os.open(f'/proc/{host}/mem', os.O_RDONLY) + + def rd(a, n): + try: + return os.pread(fd, n, a) + except OSError: + return None + + ctx = None + vt = struct.pack('= 0: + cand = a + j + sb = rd(cand + 0x540870, 4) + if sb and struct.unpack(' 100: + return cand + j = d.find(vt, j + 1) + j = d.find(m48) + while j >= 0: + cand = a + j - 0x24 + sb = rd(cand + 0x540870, 4) + if sb and struct.unpack(' 100: + return cand + j = d.find(m48, j + 1) + a += CH + return None + + # find-loop: stop-scan-resume until instance exists (render lasts ~0.5s) + while ctx is None and time.time() - t0 < 25: + try: + os.kill(host, signal.SIGSTOP) + except ProcessLookupError: + break + try: + ctx = scan_ctx() + finally: + if ctx is None: + try: + os.kill(host, signal.SIGCONT) + except ProcessLookupError: + break + if ctx is None: + time.sleep(0.004) + print('ctx %#x' % ctx if ctx else 'NO CTX', flush=True) + if not ctx: + return 1 + print('ctx %#x' % ctx if ctx else 'NO CTX', flush=True) + if not ctx: + return 1 + + hits = saved = 0 + rng = np.random.default_rng(3) + prev_sig = None + phases = [] + while True: + try: + os.kill(host, signal.SIGSTOP) + except ProcessLookupError: + break + try: + pb = rd(ctx + 0x540668, 8) + if not pb: + continue + p = struct.unpack(' %s' % (phase, fn), flush=True) + if saved >= 24: + break + finally: + try: + os.kill(host, signal.SIGCONT) + except ProcessLookupError: + pass + time.sleep(float(rng.uniform(0.001, 0.01))) + try: + os.kill(host, 0) + except ProcessLookupError: + print('host exited at %.2fs' % (time.time() - t0), flush=True) + break + print('phases=%d' % saved) + os.close(fd) + proc.kill() + return 0 + + +if __name__ == '__main__': + sys.exit(main())