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



The following reply was made to PR bin/56471; it has been noted by GNATS.

From: Jason Thorpe <thorpej%me.com@localhost>
To: Martin Husemann <martin%duskware.de@localhost>
Cc: gnats-bugs%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/56471: ntpd dies at startup on macppc/current, sshd randomly
 dies
Date: Sat, 30 Oct 2021 05:48:48 -0700

 > On Oct 30, 2021, at 5:42 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
 >=20
 >        /*
 >         * Make sure SRR1 hasn't been maliciously tampered with. =20
 >         */    =20
 >        if (!PSL_USEROK_P(sc.sc_frame.srr1))
 >                return (EINVAL);
 >=20
 > I=E2=80=99m pretty sure this is what is tripping in the failure case.
 
 It=E2=80=99s 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 =3D (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