23c: negative feasibility — symmetric log-domain convolution cannot reproduce dual skirt geometry (best 0.94dB err at absurd 324-bin width); narrows mechanism to non-symmetric ops / true bands[] input / temporal coupling; capture recipe for DESIGN-input dump documented
This commit is contained in:
+29
-4
@@ -13,6 +13,7 @@ import json
|
||||
import os
|
||||
import signal
|
||||
import struct
|
||||
import numpy as np
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
@@ -51,14 +52,23 @@ def pt(req, pid, addr=0, data=0):
|
||||
|
||||
|
||||
def find_host():
|
||||
# fastest signal: any non-reaper child of a reaper process
|
||||
reapers = []
|
||||
for p in glob.glob('/proc/[0-9]*'):
|
||||
try:
|
||||
cmd = open(f'/proc/{p}/cmdline', 'rb').read()
|
||||
if b'reaper' in cmd and b'yabridge' not in cmd:
|
||||
reapers.append(int(os.path.basename(p)))
|
||||
except Exception:
|
||||
continue
|
||||
for p in glob.glob('/proc/[0-9]*'):
|
||||
pid = int(os.path.basename(p))
|
||||
try:
|
||||
cmd = open(f'/proc/{pid}/cmdline', 'rb').read().replace(b'\0', b' ').decode('utf8', 'replace')
|
||||
maps = open(f'/proc/{pid}/maps').read()
|
||||
st = open(f'/proc/{pid}/stat').read().split()
|
||||
ppid = int(st[3])
|
||||
except Exception:
|
||||
continue
|
||||
if 'soothe2' in maps and 'reaper' not in cmd:
|
||||
if ppid in reapers and pid not in reapers:
|
||||
return pid
|
||||
return None
|
||||
|
||||
@@ -176,7 +186,22 @@ def main():
|
||||
rec = dict(ctx=regs.rcx, a2=regs.rdx, cnt=regs.r8 & 0xffffffff,
|
||||
r9=regs.r9 & 0xffffffff, ret=ret,
|
||||
rbx=regs.rbx, r12=regs.r12, r13=regs.r13,
|
||||
r14=regs.r14, r15=regs.r15, rsp=regs.rsp, tid=pid)
|
||||
r14=regs.r14, r15=regs.r15, rsp=regs.rsp, tid=pid,
|
||||
dump_in=[], dump_out=[], dump_r14=[], dump_rbx=[])
|
||||
# dump arrays referenced by registers (process is stopped)
|
||||
fdm = os.open(f'/proc/{host}/mem', os.O_RDONLY)
|
||||
|
||||
def rdarr(ptr, n=2049):
|
||||
try:
|
||||
b = os.pread(fdm, n * 4, ptr)
|
||||
return np.frombuffer(b, dtype='<f4').astype(np.float32).tolist()
|
||||
except OSError:
|
||||
return []
|
||||
rec['dump_in'] = rdarr(regs.rcx)
|
||||
rec['dump_out'] = rdarr(regs.rdx)
|
||||
if FN != 0x18052dbc0:
|
||||
rec['dump_r14'] = rdarr(regs.r14)
|
||||
os.close(fdm)
|
||||
log.append(rec)
|
||||
hits += 1
|
||||
if hits <= 20:
|
||||
|
||||
Reference in New Issue
Block a user