Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2022 13:31:14 -0600
From:      Scott Long <scottl@samsco.org>
To:        Mark Johnston <markj@freebsd.org>
Cc:        julien@perdition.city, scsi@freebsd.org
Subject:   Re: [Bug 264848] mpr0: mpr_user_pass_thru: user reply buffer (64) smaller than returned buffer (68)
Message-ID:  <718DF862-B883-4F16-8FB7-8739C5A10095@samsco.org>
In-Reply-To: <YsRptsx1APHdEExO@nuc>
References:  <YsRptsx1APHdEExO@nuc>

next in thread | previous in thread | raw e-mail | index | archive | help
Your patch is better than what was originally there.  However, i made the or=
iginal test simplistic and specific because when the msgVer changes in the f=
irmware, unknown parts of the API are also changing, and the software should=
 be aware of those changes, rather than blindly accepting them.  In essence,=
 this was meant to be a reminder to obtain new specs and adapt code whenever=
 future changes happened.

Scott

> On Jul 5, 2022, at 10:41 AM, Mark Johnston <markj@freebsd.org> wrote:
>=20
> =EF=BB=BFOn Tue, Jul 05, 2022 at 08:42:20AM -0600, Scott Long wrote:
>> I=E2=80=99ve lost my bugzilla password, and it seems that the =E2=80=9CFo=
rgot Password=E2=80=9D functionality doesn=E2=80=99t work.
>=20
> I think it works differently for @freebsd.org accounts, you have to
> reset your cluster password:
> https://docs.freebsd.org/en/articles/committers-guide/#kerberos-ldap
>=20
>> Anyways...
>>=20
>> The problems is here in mps_get_iocfacts()
>>=20
>>        snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%d.msg_version",
>>            is_mps ? "mps" : "mpr", mps_unit);
>>=20
>>        factslen =3D sizeof(MPI2_IOC_FACTS_REPLY);
>>        len =3D sizeof(msgver);
>>        error =3D sysctlbyname(sysctlname, msgver, &len, NULL, 0);
>>        if (error =3D=3D 0) {
>>                if (strncmp(msgver, "2.6", sizeof(msgver)) =3D=3D 0)
>>                        factslen +=3D 4;
>>        }
>>=20
>> I haven=E2=80=99t been keeping track, but I=E2=80=99ll guess that msgver h=
as numerically advanced past =E2=80=9C2.6=E2=80=9D for this system.
>=20
> Thanks, that makes perfect sense.  I attached a patch to the PR but
> can't test it myself.
>=20
> Julian, if you're able to test patches, could you please try the one in
> the PR and confirm that the warnings stop appearing?  It'd also be
> useful to see the value of the dev.mpr.0.msg_version sysctl.
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?718DF862-B883-4F16-8FB7-8739C5A10095>