Re: unprivileged use of MSR_SE

2008-03-20 Thread Roland McGrath
> No and no. Good and good! > On ppc32 there is a sys_debug_setcontext system call that is there to > allow a process to debug itself. It does a setcontext and optionally > sets the MSR_SE or MSR_BE bit. We don't have it on ppc64 for some > reason (we should add it). Wacky. I only looked in s

Re: unprivileged use of MSR_SE

2008-03-19 Thread Paul Mackerras
Roland McGrath writes: > I'd like to clean this up for powerpc too. If there is no way at all for > user-mode to set MSR_SE, then it doesn't much matter whether it shows up > when ptrace reads it--ptrace just needs to ignore attempts to set it. So > if there's no reason not to, what I would do i

Re: unprivileged use of MSR_SE

2008-03-19 Thread Paul Mackerras
Roland McGrath writes: > Are there any powerpc instructions that can read or change the MSR > explicitly from user mode? Any that can see or affect the MSR_SE bit? No and no. > e.g. x86 has pushf/popf unprivileged instructions, with which a user > program can both see the single-step flag set,

unprivileged use of MSR_SE

2008-03-19 Thread Roland McGrath
Are there any powerpc instructions that can read or change the MSR explicitly from user mode? Any that can see or affect the MSR_SE bit? e.g. x86 has pushf/popf unprivileged instructions, with which a user program can both see the single-step flag set, and enable single-step for its own next inst