no idea on the real problem, but to answer why you might get strange returns from copyin/copyout().
these can trigger page faults, which in turn can trigger paging (in this case, most likely from swap.) the result of that is eventually handed back to copyout(), so you kind of have to read much of uvm and the platform pmap, plus IO code, to see all the potential places an error might be generated. that said, i've never seen EINVAL before. .mrg.
