svn commit: r360944 - in head: sys/amd64/amd64 sys/arm/arm sys/arm64/arm64 sys/fs/fuse sys/fs/unionfs sys/i386/i386 sys/kern sys/mips/mips sys/powerpc/powerpc sys/riscv/riscv sys/sys tools/coccinelle

Cy Schubert Cy.Schubert at cschubert.com
Tue May 12 05:37:38 UTC 2020


Thank you Conrad.


-- 
Cheers,
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX:  <cy at FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy at nwtime.org>    Web:  https://nwtime.org

	The need of the many outweighs the greed of the few.


In message <CAG6CVpV0uCaVyeVEv6EJ3b-h8p9Q=i3XE2Q8beMCisbuHW4=SA at mail.gmail.c
om>
, Conrad Meyer writes:
> --000000000000a6fe4405a56be1bb
> Content-Type: text/plain; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
> Thanks Cy. I=E2=80=99ll revert it when I=E2=80=99m back at a computer.
>
> Best,
> Conrad
>
> On Mon, May 11, 2020 at 20:28 Cy Schubert <Cy.Schubert at cschubert.com> wrote=
> :
>
> > In message <202005112257.04BMvMx2096445 at repo.freebsd.org>, Conrad Meyer
> > writes:
> > > Author: cem
> > > Date: Mon May 11 22:57:21 2020
> > > New Revision: 360944
> > > URL: https://svnweb.freebsd.org/changeset/base/360944
> > >
> > > Log:
> > >   copystr(9): Move to deprecate [2/2]
> > >
> > >   Unlike the other copy*() functions, it does not serve to copy from on=
> e
> > >   address space to another or protect against potential faults.  It's
> > just
> > >   an older incarnation of the now-more-common strlcpy().
> > >
> > >   Add a coccinelle script to tools/ which can be used to mechanically
> > >   convert existing instances where replacement with strlcpy is trivial.
> > >   In the two cases which matched, fuse_vfsops.c and union_vfsops.c, the
> > >   code was further refactored manually to simplify.
> > >
> > >   Replace the declaration of copystr() in systm.h with a small macro
> > >   wrapper around strlcpy.
> > >
> > >   Remove N redundant MI implementations of copystr.  For MIPS, this
> > >   entailed inlining the assembler copystr into the only consumer,
> > >   copyinstr, and making the latter a leaf function.
> > >
> > >   Reviewed by:        jhb
> > >   Differential Revision:      https://reviews.freebsd.org/D24672
> > >
> > > Added:
> > >   head/tools/coccinelle/
> > >   head/tools/coccinelle/copystr9.cocci   (contents, props changed)
> > > Deleted:
> > >   head/sys/arm64/arm64/copystr.c
> > >   head/sys/powerpc/powerpc/copystr.c
> > >   head/sys/riscv/riscv/copystr.c
> > > Modified:
> > >   head/sys/amd64/amd64/support.S
> > >   head/sys/arm/arm/copystr.S
> > >   head/sys/fs/fuse/fuse_vfsops.c
> > >   head/sys/fs/unionfs/union_vfsops.c
> > >   head/sys/i386/i386/support.s
> > >   head/sys/kern/subr_csan.c
> > >   head/sys/mips/mips/support.S
> > >   head/sys/sys/systm.h
> > >
> >
> > Hi Conrad,
> >
> > This is causing a failure to boot with geom_mirror:
> >
> > GEOM_MIRROR: Device mirror/gm0 launched (2/2).
> > GEOM_MIRROR: Device mirror/gm1 launched (2/2).
> > GEOM_MIRROR: Device mirror/gm2 launched (2/2).
> > GEOM_MIRROR: Device mirror/gm3 launched (2/2).
> > mountroot: waiting for device /dev/mirror/gm0a...
> > Mounting from ufs:/dev/mirror/gm0a failed with error 2; retrying for 3
> > more
> > seconds
> > exec /sbin/init: error 20
> > exec /sbin/init.bak: error 20
> > exec /rescue/init: error 20
> > init: not found in path /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/ini=
> t
> > panic: no init
> > cpuid =3D 1
> > time =3D 1589225852
> > KDB: stack backtrace:
> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
> > 0xfffffe004df51ba0
> > vpanic() at vpanic+0x182/frame 0xfffffe004df51bf0
> > panic() at panic+0x43/frame 0xfffffe004df51c50
> > start_init() at start_init+0x23c/frame 0xfffffe004df51cf0
> > fork_exit() at fork_exit+0x7e/frame 0xfffffe004df51d30
> > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe004df51d30
> > --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 ---
> > Uptime: 9s
> > acpi0: reset failed - timeout
> > Automatic reboot in 15 seconds - press a key on the console to abort
> > --> Press a key on the console to reboot,
> > --> or switch off the system now.
> > Rebooting...
> > cpu_reset: Restarting BSP
> > cpu_reset_proxy: Stopped CPU 1
> >
> >
> > Anticipating you might ask if r360941 is the problem. It is not. Revertin=
> g
> > this r360944 (not r360941) resolves the boot problem. System is amd64.
> >
> >
> > --
> > Cheers,
> > Cy Schubert <Cy.Schubert at cschubert.com>
> > FreeBSD UNIX:  <cy at FreeBSD.org>   Web:  https://FreeBSD.org
> > NTP:           <cy at nwtime.org>    Web:  https://nwtime.org
> >
> >         The need of the many outweighs the greed of the few.
> >
> >
> >
>
> --000000000000a6fe4405a56be1bb
> Content-Type: text/html; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
> <div><div dir=3D"auto">Thanks Cy. I=E2=80=99ll revert it when I=E2=80=99m b=
> ack at a computer.</div></div><div dir=3D"auto"><br></div><div dir=3D"auto"=
> >Best,</div><div dir=3D"auto">Conrad=C2=A0</div><div><br><div class=3D"gmai=
> l_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, May 11, 2020 at 20:2=
> 8 Cy Schubert <<a href=3D"mailto:Cy.Schubert at cschubert.com">Cy.Schubert@=
> cschubert.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" sty=
> le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In mes=
> sage <<a href=3D"mailto:202005112257.04BMvMx2096445 at repo.freebsd.org" ta=
> rget=3D"_blank">202005112257.04BMvMx2096445 at repo.freebsd.org</a>>, Conra=
> d Meyer <br>
> writes:<br>
> > Author: cem<br>
> > Date: Mon May 11 22:57:21 2020<br>
> > New Revision: 360944<br>
> > URL: <a href=3D"https://svnweb.freebsd.org/changeset/base/360944" rel=
> =3D"noreferrer" target=3D"_blank">https://svnweb.freebsd.org/changeset/base=
> /360944</a><br>
> ><br>
> > Log:<br>
> >=C2=A0 =C2=A0copystr(9): Move to deprecate [2/2]<br>
> >=C2=A0 =C2=A0<br>
> >=C2=A0 =C2=A0Unlike the other copy*() functions, it does not serve to c=
> opy from one<br>
> >=C2=A0 =C2=A0address space to another or protect against potential faul=
> ts.=C2=A0 It's just<br>
> >=C2=A0 =C2=A0an older incarnation of the now-more-common strlcpy().<br>
> >=C2=A0 =C2=A0<br>
> >=C2=A0 =C2=A0Add a coccinelle script to tools/ which can be used to mec=
> hanically<br>
> >=C2=A0 =C2=A0convert existing instances where replacement with strlcpy =
> is trivial.<br>
> >=C2=A0 =C2=A0In the two cases which matched, fuse_vfsops.c and union_vf=
> sops.c, the<br>
> >=C2=A0 =C2=A0code was further refactored manually to simplify.<br>
> >=C2=A0 =C2=A0<br>
> >=C2=A0 =C2=A0Replace the declaration of copystr() in systm.h with a sma=
> ll macro<br>
> >=C2=A0 =C2=A0wrapper around strlcpy.<br>
> >=C2=A0 =C2=A0<br>
> >=C2=A0 =C2=A0Remove N redundant MI implementations of copystr.=C2=A0 Fo=
> r MIPS, this<br>
> >=C2=A0 =C2=A0entailed inlining the assembler copystr into the only cons=
> umer,<br>
> >=C2=A0 =C2=A0copyinstr, and making the latter a leaf function.<br>
> >=C2=A0 =C2=A0<br>
> >=C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 jhb<br>
> >=C2=A0 =C2=A0Differential Revision:=C2=A0 =C2=A0 =C2=A0 <a href=3D"http=
> s://reviews.freebsd.org/D24672" rel=3D"noreferrer" target=3D"_blank">https:=
> //reviews.freebsd.org/D24672</a><br>
> ><br>
> > Added:<br>
> >=C2=A0 =C2=A0head/tools/coccinelle/<br>
> >=C2=A0 =C2=A0head/tools/coccinelle/copystr9.cocci=C2=A0 =C2=A0(contents=
> , props changed)<br>
> > Deleted:<br>
> >=C2=A0 =C2=A0head/sys/arm64/arm64/copystr.c<br>
> >=C2=A0 =C2=A0head/sys/powerpc/powerpc/copystr.c<br>
> >=C2=A0 =C2=A0head/sys/riscv/riscv/copystr.c<br>
> > Modified:<br>
> >=C2=A0 =C2=A0head/sys/amd64/amd64/support.S<br>
> >=C2=A0 =C2=A0head/sys/arm/arm/copystr.S<br>
> >=C2=A0 =C2=A0head/sys/fs/fuse/fuse_vfsops.c<br>
> >=C2=A0 =C2=A0head/sys/fs/unionfs/union_vfsops.c<br>
> >=C2=A0 =C2=A0head/sys/i386/i386/support.s<br>
> >=C2=A0 =C2=A0head/sys/kern/subr_csan.c<br>
> >=C2=A0 =C2=A0head/sys/mips/mips/support.S<br>
> >=C2=A0 =C2=A0head/sys/sys/systm.h<br>
> ><br>
> <br>
> Hi Conrad,<br>
> <br>
> This is causing a failure to boot with geom_mirror:<br>
> <br>
> GEOM_MIRROR: Device mirror/gm0 launched (2/2).<br>
> GEOM_MIRROR: Device mirror/gm1 launched (2/2).<br>
> GEOM_MIRROR: Device mirror/gm2 launched (2/2).<br>
> GEOM_MIRROR: Device mirror/gm3 launched (2/2).<br>
> mountroot: waiting for device /dev/mirror/gm0a...<br>
> Mounting from ufs:/dev/mirror/gm0a failed with error 2; retrying for 3 more=
>  <br>
> seconds<br>
> exec /sbin/init: error 20<br>
> exec /sbin/init.bak: error 20<br>
> exec /rescue/init: error 20<br>
> init: not found in path /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init<=
> br>
> panic: no init<br>
> cpuid =3D 1<br>
> time =3D 1589225852<br>
> KDB: stack backtrace:<br>
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame <br>
> 0xfffffe004df51ba0<br>
> vpanic() at vpanic+0x182/frame 0xfffffe004df51bf0<br>
> panic() at panic+0x43/frame 0xfffffe004df51c50<br>
> start_init() at start_init+0x23c/frame 0xfffffe004df51cf0<br>
> fork_exit() at fork_exit+0x7e/frame 0xfffffe004df51d30<br>
> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe004df51d30<br>
> --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 ---<br>
> Uptime: 9s<br>
> acpi0: reset failed - timeout<br>
> Automatic reboot in 15 seconds - press a key on the console to abort<br>
> --> Press a key on the console to reboot,<br>
> --> or switch off the system now.<br>
> Rebooting...<br>
> cpu_reset: Restarting BSP<br>
> cpu_reset_proxy: Stopped CPU 1<br>
> <br>
> <br>
> Anticipating you might ask if r360941 is the problem. It is not. Reverting =
> <br>
> this r360944 (not r360941) resolves the boot problem. System is amd64.<br>
> <br>
> <br>
> -- <br>
> Cheers,<br>
> Cy Schubert <<a href=3D"mailto:Cy.Schubert at cschubert.com" target=3D"_bla=
> nk">Cy.Schubert at cschubert.com</a>><br>
> FreeBSD UNIX:=C2=A0 <cy at FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 <a href=
> =3D"https://FreeBSD.org" rel=3D"noreferrer" target=3D"_blank">https://FreeB=
> SD.org</a><br>
> NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<<a href=3D"mailto:cy at nwtim=
> e.org" target=3D"_blank">cy at nwtime.org</a>>=C2=A0 =C2=A0 Web:=C2=A0 <a h=
> ref=3D"https://nwtime.org" rel=3D"noreferrer" target=3D"_blank">https://nwt=
> ime.org</a><br>
> <br>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 The need of the many outweighs the greed of the=
>  few.<br>
> <br>
> <br>
> </blockquote></div></div>
>
> --000000000000a6fe4405a56be1bb--




More information about the svn-src-head mailing list