From nobody Tue Sep 26 17:56:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rw6rX3RHbz4vSyK for ; Tue, 26 Sep 2023 17:57:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6rX1WrWz3GBY for ; Tue, 26 Sep 2023 17:57:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9a645e54806so1140619166b.0 for ; Tue, 26 Sep 2023 10:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1695751017; x=1696355817; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cBMuheZ1kGqRliI/ewBv0uIthpnoYVT4Hmk5fkEV+DE=; b=XnNmSkb5mAqslnC9H2ELvNwx62VUquRD9QmpoVpO0cVPi8mDXj3sZAEWhE7Gxewl0x dc7TWJvU7Fm2acFuVHpEG26HnW2hGiglmDJ7XdhAGVhLwfa8/NM4uE58aWwaAZlpz42U XBh8ogIvJiO2YWtzk57xntM1msF5fn6vOrUU/6AUwWWKCyZv1DcPSySnyGFyahLc7JYy XDX5xO49Kq6a64EGX5LZ2sifHl8/pURFqCSZ9WrXP5OHsgUgcTPIJgQR0pvz0hepj/VU QxvL6PBEPyqcIKK3rsAUbW6DRpQGm2TRR4t8AfmDlKz63xP31MDGttf0qVUTXs8QZHVe n3Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695751017; x=1696355817; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cBMuheZ1kGqRliI/ewBv0uIthpnoYVT4Hmk5fkEV+DE=; b=mfwojwg/YOYpWAYEo2ypMISV5kn9kS/0R5o+HopdSKWD+96PVintTbM1dntMp2gI4T rz8d2YJZJA6Y4CURzGNqitdWIYRP5yo2EPs/o2QNZ/rpaUR+p3S1DSp7jbxG0Z+aolfU 2tEebecTEEFDO+HenfyBOT3urPyztFEFCPavvegPgIvl4Hz/VQ+e1Gv9DIZb0nzy9+3e K4fN7z0XI/ZcbaR6piVqsT3cQRtb+eCeqagMQJgVftyGsoHnacDshag4esSVFkrpIUFg DKfafL78z0SPtMAJHcCwIK9HYyAZ25oQWsYPdD+culfHE9b++5kQSe2BaDMWs2qtrmgV 45CQ== X-Gm-Message-State: AOJu0Yz/+jQJOv5nVrBYaD7xDuWEgrEc6K2WEEhzVYfB8CVvrQ0lu+c7 RC/uoJnW0fe09jqkglFkXctOAgZUceV1tSnVvPfHig== X-Google-Smtp-Source: AGHT+IHFc6PB2i3ds44SaiLtQpUexUKr8x8S1VOLeXWs9RodDS3g76OPV39ZwsePcC6tK38qm1/0KrORfL5gYh7uTrY= X-Received: by 2002:a17:906:5a70:b0:9a2:185b:5375 with SMTP id my48-20020a1709065a7000b009a2185b5375mr9790120ejc.18.1695751017213; Tue, 26 Sep 2023 10:56:57 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> In-Reply-To: From: Warner Losh Date: Tue, 26 Sep 2023 11:56:45 -0600 Message-ID: Subject: Re: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag To: Jessica Clarke Cc: Ravi Pokala , Mateusz Guzik , src-committers , "" , "" Content-Type: multipart/alternative; boundary="00000000000002461d060646cd51" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Rw6rX1WrWz3GBY --00000000000002461d060646cd51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 26, 2023 at 11:34=E2=80=AFAM Jessica Clarke wrote: > On 26 Sep 2023, at 18:32, Ravi Pokala wrote: > > > > In that case, an updated comment seems appropriate, so it=E2=80=99s not= removed > again. > > https://reviews.freebsd.org/D41984 Jessica beat me to it. I have a back out and this commit queued up. I've just updated the comment. I'm not at all happy with it yet. The details are in the commit message, but the tl;dr is that while we do write the version to the end of the dumps, savecore doesn't preserve that when writing vmcore.X, so to identify what kernel a dump is from reliably, one must use the SCCS ID tags. Trying to find other strings to get this data is not as reliable. The real fix for this issue with the vmcore.X format is to write ELF core dumps, a feature vaguely planned for 15, where we can save this data in a way that can be extracted with scripts. Warner > > > -Ravi (rpokala@) > > > > From: on behalf of Warner Losh < > imp@bsdimp.com> > > Date: Tuesday, September 26, 2023 at 07:51 > > To: Mateusz Guzik > > Cc: src-committers , "< > dev-commits-src-all@freebsd.org>" , "< > dev-commits-src-main@freebsd.org>" > > Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs > tag > > > > Can you put this back? It is still useful. I have automated scripts > that look for this pattern to find the version of a core dump. There are = no > other ways that are as reliable to find this data. Some other heuristics > exist, but my experience with snagging data from maybe a thousand core > dumps from $WORK's network found issues in all the alternatives. It's why= I > didn't whack it already. Even though the text says SCCS which is prehisto= ry > for this project, it's still in use today. > > Warner > > > > On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: > >> > >> > >> The branch main has been updated by mjg: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c= 5fd417723 > >> > >> commit e6dc6a27230f836a131118326731b7c5fd417723 > >> Author: Mateusz Guzik > >> AuthorDate: 2023-09-26 14:36:51 +0000 > >> Commit: Mateusz Guzik > >> CommitDate: 2023-09-26 14:36:51 +0000 > >> > >> sys/conf/newvers.sh: whack sccs tag > >> > >> In the same spirit as removing cvs $FreeBSD$ tags. > >> > >> Sponsored by: Rubicon Communications, LLC ("Netgate") > >> --- > >> sys/conf/newvers.sh | 2 -- > >> 1 file changed, 2 deletions(-) > >> > >> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh > >> index 73fd6857d307..18b1817ca287 100644 > >> --- a/sys/conf/newvers.sh > >> +++ b/sys/conf/newvers.sh > >> @@ -311,11 +311,9 @@ fi > >> > >> vers_content_new=3D$(cat << EOF > >> $COPYRIGHT > >> -#define SCCSSTR "@(#)${VERINFO}" > >> #define VERSTR "${VERSTR}" > >> #define RELSTR "${RELEASE}" > >> > >> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D SCCSSTR; > >> char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D VERSTR; > >> char compiler_version[] =3D "${compiler_v}"; > >> char ostype[] =3D "${TYPE}"; > > --00000000000002461d060646cd51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Sep 26, 2023 at 11:34=E2=80= =AFAM Jessica Clarke <jrtc27@freeb= sd.org> wrote:
On 26 Sep 2023, at 18:32, Ravi Pokala <rpokala@freebsd.org> wrote:
>
> In that case, an updated comment seems appropriate, so it=E2=80=99s no= t removed again.

https://reviews.freebsd.org/D41984

=
Jessica beat me to it. I have a back out and this commit queued up. I&= #39;ve just
updated the comment. I'm not at all happy with it= yet.

The details are in the commit message, but t= he tl;dr is that while we do write
the version to the end of the = dumps, savecore doesn't preserve that when
writing vmcore.X, = so to identify what kernel a dump is from reliably, one
must use = the SCCS ID tags. Trying to find other strings to get this data is
not as reliable.

The real fix for this issue wit= h the vmcore.X format is to write ELF core
dumps, a feature vague= ly planned for 15, where we can save this data
in a way that can = be extracted with scripts.

Warner
=C2=A0=

>=C2=A0 -Ravi (rpokala@)
>
> From: <owner-src-committers@freebsd.org> on behalf of Warner Lo= sh <imp@bsdimp.com>
> Date: Tuesday, September 26, 2023 at 07:51
> To: Mateusz Guzik <
mjg@freebsd.org>
> Cc: src-committers <src-committers@freebsd.org>, "<dev-commits-src-al= l@freebsd.org>" <dev-commits-src-all@freebsd.org>, "&l= t;dev= -commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org= >
> Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack scc= s tag
>
>=C2=A0 Can you put this back? It is still useful. I have automated scri= pts that look for this pattern to find the version of a core dump. There ar= e no other ways that are as reliable to find this data. Some other heuristi= cs exist, but my experience with snagging data from maybe a thousand core d= umps from $WORK's network found issues in all the alternatives. It'= s why I didn't whack it already. Even though the text says SCCS which i= s prehistory for this project, it's still in use today.
>=C2=A0 Warner
>
> On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik <mjg@freebsd.org> wrote:
>>
>>
>> The branch main has been updated by mjg:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c5fd417= 723
>>
>> commit e6dc6a27230f836a131118326731b7c5fd417723
>> Author:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org> >> AuthorDate: 2023-09-26 14:36:51 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org> >> CommitDate: 2023-09-26 14:36:51 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0sys/conf/newvers.sh: whack sccs tag
>>
>>=C2=A0 =C2=A0 =C2=A0In the same spirit as removing cvs $FreeBSD$ ta= gs.
>>
>>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Rubicon Communication= s, LLC ("Netgate")
>> ---
>>=C2=A0 sys/conf/newvers.sh | 2 --
>>=C2=A0 1 file changed, 2 deletions(-)
>>
>> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
>> index 73fd6857d307..18b1817ca287 100644
>> --- a/sys/conf/newvers.sh
>> +++ b/sys/conf/newvers.sh
>> @@ -311,11 +311,9 @@ fi
>>
>>=C2=A0 vers_content_new=3D$(cat << EOF
>>=C2=A0 $COPYRIGHT
>> -#define SCCSSTR "@(#)${VERINFO}"
>>=C2=A0 #define VERSTR "${VERSTR}"
>>=C2=A0 #define RELSTR "${RELEASE}"
>>
>> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D S= CCSSTR;
>>=C2=A0 char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256]= =3D VERSTR;
>>=C2=A0 char compiler_version[] =3D "${compiler_v}";
>>=C2=A0 char ostype[] =3D "${TYPE}";

--00000000000002461d060646cd51--