i updated aux/cpuid to allow one to specify a mach on
which to run cpuid.  unfortunately, /proc/%d/ctl doesn't
really guarentee when target will be running on the
requested mach.  as a defense, sleep(1) is called
after wiring, but i'm not convinced that sleep must always
sched and thus potentially could return still on the wrong
mach.  and there is no way for a proc to request its current
mach number to verifiy that it has been wired.  (unless you
count picking through the binary /proc/%d/proc structure,
which seems too messy to count.)

perhaps this is all just paranoia, but in order to get /dev/reboot
working reliably (ie. in a loop for more than 10 minutes),
loops like this were required:

        for(;;){
                procwired(up, n);
                sched();
                if(m->machno == n)
                        break;
        }

perhaps a call from user space solves all these problems, but
/dev/reboot is esentially a call from user space, so if it does,
why that could be is not currently clear to me.

perhaps it would make sense to add /proc/%d/mach or even
/dev/machno or even /dev/wire which would be in a position
to guarentee wiring.

- erik

Reply via email to