NetBSD-Bugs archive

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

Re: bin/56471: ntpd dies at startup on macppc/current, sshd randomly dies



> On Oct 30, 2021, at 5:42 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
> 
>        /*
>         * Make sure SRR1 hasn't been maliciously tampered with.  
>         */     
>        if (!PSL_USEROK_P(sc.sc_frame.srr1))
>                return (EINVAL);
> 
> I’m pretty sure this is what is tripping in the failure case.

It’s worth noting that the siginfo case, which was always being used until very recently, simply does this:

                /*
                 * Accept all user-settable bits without complaint;
                 * userland should not need to know the machine-specific
                 * MSR value.
                 */
                tf->tf_srr1 = (gr[_REG_MSR] & PSL_USERMOD) | PSL_USERSET;

I.e. does no checking, and simply forces it to what it should be (modulo accepting the user-settable bits, which in the OEA case are basically FP modes and single-stepping).

-- thorpej



Home | Main Index | Thread Index | Old Index