tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: "Hijacking" a PCU.



On Sat, Dec 15, 2012 at 11:24:09AM -0800, Matt Thomas wrote:
> > There are several problems though:
> > 1) gdb (etc) will find the wrong registers for the lwp.
> 
> Not really since you can't return to user land before surrendering the PCU.

An lwp could easily sleep with a PCU assigned (especially if the FP
regs are being used for copyin/out).

I'm fairly sure there is an expectation of being able to read an lwp's
user-space registers at any time. While they might be stale (eg when the
process is in userspace), I doubt they are expected to be completely wrong.

I'm not sure what effect delayed saving of FP registers has on this.
Possibly the call to retrieve the registers ensures the FP state
is flushed to memory.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index