Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2019 09:26:51 -0700
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        "Hartmann, O." <ohartmann@walstatt.org>
Cc:        svn-src-head@freebsd.org, Gary Jennejohn <gljennjohn@gmail.com>, src-committers@freebsd.org, svn-src-all@freebsd.org, Conrad Meyer <cem@FreeBSD.org>
Subject:   Re: svn commit: r353700 - in head: share/man/man4 sys/amd64/conf sys/conf sys/gdb sys/i386/conf sys/kern sys/net sys/sys
Message-ID:  <ACCC37A4-4E6A-4B08-85C6-D37D658A88B4@cschubert.com>
In-Reply-To: <20191018175406.0ff89bbc@hermann.fritz.box>
References:  <201910172133.x9HLX1kl071044@repo.freebsd.org> <20191018122104.389ffb7a@hermann.fritz.box> <20191018140045.31d269b0@ernst.home> <20191018160935.7dda61c4@hermann.fritz.box> <201910181424.x9IEOC9q013885@slippy.cwsent.com> <20191018175406.0ff89bbc@hermann.fritz.box>

next in thread | previous in thread | raw e-mail | index | archive | help
On October 18, 2019 8:54:06 AM PDT, "Hartmann, O=2E" <ohartmann@walstatt=2E=
org> wrote:
>On Fri, 18 Oct 2019 07:24:12 -0700
>Cy Schubert <Cy=2ESchubert@cschubert=2Ecom> wrote:
>
>> In message <20191018160935=2E7dda61c4@hermann=2Efritz=2Ebox>, "Hartmann=
,
>> O=2E" writes:
>> > --Sig_/QDD9BZgeMM6=2ETJkOIciNb32
>> > Content-Type: text/plain; charset=3DUS-ASCII
>> > Content-Transfer-Encoding: quoted-printable
>> >
>> > On Fri, 18 Oct 2019 14:00:45 +0200
>> > Gary Jennejohn <gljennjohn@gmail=2Ecom> wrote:
>> > =20
>> > > On Fri, 18 Oct 2019 12:21:04 +0200
>> > > "Hartmann, O=2E" <ohartmann@walstatt=2Eorg> wrote:
>> > >=3D20 =20
>> > > > On Thu, 17 Oct 2019 21:33:01 +0000 (UTC)
>> > > > Conrad Meyer <cem@FreeBSD=2Eorg> wrote:
>> > > >  =3D20 =20
>> > > > > Author: cem
>> > > > > Date: Thu Oct 17 21:33:01 2019
>> > > > > New Revision: 353700
>> > > > > URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/353700
>> > > > >=3D20
>> > > > > Log:
>> > > > >   Implement NetGDB(4)
>> > > > >  =3D20
>> > > > >   NetGDB(4) is a component of a system using a panic-time
>> > > > > network stack to remotely debug crashed FreeBSD kernels over
>> > > > > the network, instead of traditional serial interfaces=2E
>> > > > >  =3D20
>> > > > >   There are three pieces in the complete NetGDB system=2E
>> > > > >  =3D20
>> > > > >   First, a dedicated proxy server must be running to accept
>> > > > > connections from both NetGDB and gdb(1), and pass
>> > > > > bidirectional traffic between the two protocols=2E
>> > > > >  =3D20
>> > > > >   Second, the NetGDB client is activated much like ordinary
>> > > > > 'gdb' and similarly to 'netdump' in ddb(4) after a panic=2E
>> > > > > Like other debugnet(4) clients (netdump(4)), the network
>> > > > > interface on the route to the proxy server must be online and
>> > > > > support debugnet(4)=2E =3D20
>> > > > >   Finally, the remote (k)gdb(1) uses 'target remote
>> > > > > <proxy>:<port>' (like any other TCP remote) to connect to the
>> > > > > proxy server=2E=3D20
>> > > > >   The NetGDB v1 protocol speaks the literal GDB remote serial
>> > > > > protocol, and uses a 1:1 relationship between GDB packets and
>> > > > > sequences of debugnet packets (fragmented by MTU)=2E  There is
>> > > > > no encryption utilized to keep debugging sessions private, so
>> > > > > this is only appropriate for local segments or trusted
>> > > > > networks=2E =3D20
>> > > > >   Submitted by:	John Reimer <john=2Ereimer AT emc=2Ecom>
>> > > > > (earlier version) Discussed some with:	emaste, markj
>> > > > >   Relnotes:	sure
>> > > > >   Differential Revision:
>> > > > > https://reviews=2Efreebsd=2Eorg/D21568
>> > > > >=3D20
>> > > > > Added:
>> > > > >   head/share/man/man4/netgdb=2E4   (contents, props changed)
>> > > > >   head/sys/gdb/netgdb=2Ec   (contents, props changed)
>> > > > >   head/sys/gdb/netgdb=2Eh   (contents, props changed)
>> > > > > Modified:
>> > > > >   head/share/man/man4/Makefile
>> > > > >   head/share/man/man4/ddb=2E4
>> > > > >   head/sys/amd64/conf/GENERIC
>> > > > >   head/sys/conf/NOTES
>> > > > >   head/sys/conf/files
>> > > > >   head/sys/conf/options
>> > > > >   head/sys/gdb/gdb=2Eh
>> > > > >   head/sys/gdb/gdb_int=2Eh
>> > > > >   head/sys/gdb/gdb_main=2Ec
>> > > > >   head/sys/gdb/gdb_packet=2Ec
>> > > > >   head/sys/i386/conf/GENERIC
>> > > > >   head/sys/kern/subr_kdb=2Ec
>> > > > >   head/sys/net/debugnet=2Ec
>> > > > >   head/sys/net/debugnet=2Eh
>> > > > >   head/sys/net/debugnet_inet=2Ec
>> > > > >   head/sys/net/debugnet_int=2Eh
>> > > > >   head/sys/sys/kdb=2Eh
>> > > > >   head/sys/sys/param=2Eh
>> > > > >=3D20
>> > > > > Modified: head/share/man/man4/Makefile
>> > > > >
>=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D=
3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
>> > > > > =20
>> >
>=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D=
3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
>> >
>=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D=
3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
>> > =3D3D=3D3D=3D3D=3D3D=3D3D =20
>> > > > > --- head/share/man/man4/Makefile	Thu Oct 17 21:25:50
>> > > > > 2019	(r353699) +++ head/share/man/man4/Makefile
>> > > > > Thu Oct 17 21:33:01 2019	(r353700) @@ -307,6 +307,7 @@
>> > > > > MAN=3D3D aac=2E4 \ net80211=2E4 \
>> > > > >  	netdump=2E4 \
>> > > > >  	netfpga10g_nf10bmac=2E4 \
>> > > > > +	netgdb=2E4 \
>> > > > >  	netgraph=2E4 \
>> > > > >  	netintro=2E4 \
>> > > > >  	netmap=2E4 \
>> > > > >    =3D20 =20
>> > > > [=2E=2E=2E]
>> > > >=3D20
>> > > >=3D20
>> > > > Having "nooptions       NETGDB          # netgdb(4) client
>> > > > support" defined in my kernel config file, buildkernel fails
>> > > > with the error shown below=2E
>> > > >=3D20
>> > > > [=2E=2E=2E]
>> > > > --- debugnet=2Eo ---
>> > > > /usr/src/sys/net/debugnet=2Ec:662:4: error: implicit declaration
>> > > > of function 'db_printf' is invalid in C99
>> > > > [-Werror,-Wimplicit-function-declaration] db_printf("%s: Could
>> > > > not get route for that server=2E\n", ^
>> > > > /usr/src/sys/net/debugnet=2Ec:662:4: note: did you mean
>> > > > 'if_printf'? /usr/src/sys/net/if_var=2Eh:679:5: note: 'if_printf'
>> > > > declared here int     if_printf(struct ifnet *, const char *,
>> > > > =2E=2E=2E) __printflike(2, 3); ^ 1 error generated=2E =3D20 =20
>> > >=3D20
>> > > And I also had to add "nooptions NETDUMP" to get the kernel to
>> > > compile and link=2E
>> > >=3D20 =20
>> >
>> > I already had "nooptions NETDUMP" defined=2E =20
>>=20
>>=20
>> This will fix it=2E
>>=20
>> Index: sys/net/debugnet=2Ec
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> --- sys/net/debugnet=2Ec	(revision 353717)
>> +++ sys/net/debugnet=2Ec	(working copy)
>> @@ -659,8 +659,10 @@
>>  		CURVNET_RESTORE();
>> =20
>>  		if (dest_rt =3D=3D NULL) {
>> +#ifdef DDB
>>  			db_printf("%s: Could not get route for that
>> server=2E\n", __func__);
>> +#endif
>>  			error =3D ENOENT;
>>  			goto cleanup;
>>  		}
>>=20
>>=20
>>=20
>
>Doesn't work, either=2E
>The kernel config in question doesn't have any debugging features
>enabled, so nooptions DDB is alos part of the configuration=2E
>buildkernel still fails=2E

Hmm=2E Fixed my firewall build=2E My non-test firewall kernel config has t=
he same nooption=2E

What other options/nooptions and patches are applied to your tree?


--=20
Pardon the typos and autocorrect, small keyboard in use=2E=20
Cy Schubert <Cy=2ESchubert@cschubert=2Ecom>
FreeBSD UNIX: <cy@FreeBSD=2Eorg> Web: https://www=2EFreeBSD=2Eorg

The need of the many outweighs the greed of the few=2E

Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E
From owner-svn-src-all@freebsd.org  Fri Oct 18 16:37:32 2019
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E8E41567AB;
 Fri, 18 Oct 2019 16:37:32 +0000 (UTC)
 (envelope-from ohartmann@walstatt.org)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.22])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "mout.gmx.net",
 Issuer "TeleSec ServerPass Class 2 CA" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 46vsBy5FGdz3Jbm;
 Fri, 18 Oct 2019 16:37:30 +0000 (UTC)
 (envelope-from ohartmann@walstatt.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1571416641;
 bh=7+hvhbC08P7S+3eqQzRfAEWDi83Hd6+hL4fCI/NYg4k=;
 h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References;
 b=XGuvcNonOHeAHnqbX1FeQ0bAj+Uhls0IWHYEH863Jjv7Kzyj6jISndVfUfEBTBPfz
 xYmAg2vBWheXdkUhQ+D9/+TnIh7Fsub0XbkJCuy2YdPvrnnlHFYRUDpkqRwrrQtp89
 iZdnAJPAproQjNGoj0EjtZ6+FONaCiXDZ0+ybLoA=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from hermann.fritz.box ([91.65.85.161]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N33ET-1htUDt32b7-013NTv; Fri, 18
 Oct 2019 18:37:20 +0200
Date: Fri, 18 Oct 2019 18:37:18 +0200
From: "Hartmann, O." <ohartmann@walstatt.org>
To: Cy Schubert <Cy.Schubert@cschubert.com>
Cc: "Hartmann, O." <ohartmann@walstatt.org>, svn-src-head@freebsd.org, Gary
 Jennejohn <gljennjohn@gmail.com>, src-committers@freebsd.org,
 svn-src-all@freebsd.org, Conrad Meyer <cem@FreeBSD.org>
Subject: Re: svn commit: r353700 - in head: share/man/man4 sys/amd64/conf
 sys/conf sys/gdb sys/i386/conf sys/kern sys/net sys/sys
Message-ID: <20191018183718.5e6b3d62@hermann.fritz.box>
In-Reply-To: <ACCC37A4-4E6A-4B08-85C6-D37D658A88B4@cschubert.com>
References: <201910172133.x9HLX1kl071044@repo.freebsd.org>
 <20191018122104.389ffb7a@hermann.fritz.box>
 <20191018140045.31d269b0@ernst.home>
 <20191018160935.7dda61c4@hermann.fritz.box>
 <201910181424.x9IEOC9q013885@slippy.cwsent.com>
 <20191018175406.0ff89bbc@hermann.fritz.box>
 <ACCC37A4-4E6A-4B08-85C6-D37D658A88B4@cschubert.com>
Organization: walstatt.org
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/icZw9PmU7w9Aj=UqDZhZj.c"; protocol="application/pgp-signature"
X-Provags-ID: V03:K1:AWYm/esxchJpRYP42bcADWZVu7bZSgK8+vXQv27OcQSYBGU3akc
 mfPq8sA7YfOXMjON3LVOD9fwTLNZpmV9Qgg4mIpqx9SBzGz7KkY22+IEVxSBnTBAvpYc0hG
 q6kST7lARs7E5/FwalFeI+f0rnTUtz2qN9Ckhnrr11a9yCklYfVydMBIJbUKOLflM/HzH0w
 iAZIODHk9XuFI1DZ0sJyQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:zw/bDLa7l3Y=:TWQABc8XYPAaBVwlRkmEU+
 kWeD7n2byvU4KhoSKs7Klf4Yy28JpWhxjn1CPC1XPIcan3r4+rxyeVtRda6+hI3kiFlBFdzHJ
 MRspfHUxfNPKKtTApejC3MwEhKlnzjE1Qq+b7rG2H+XRZn61d0O/K8qWsVRBetsSUJPeBffUN
 TuNkNzNnPGoedy+wB7Fnh6R077jjJYGuc0pIOtKhC1wCwhNgcJPdRSI/hhtezdJFPfC1haK1d
 KXr0sOxlrhoxKn03z63hkl63DacUiiq8ThWNXcmGhJ6CKPfS7uESws2c9pFeEz67ylV0yllbC
 Qh9NZMpgmnkp3MetKgVnAgwXqN5i+B/imxBy3yvi/AHcsmgSdgs3myEbwO9OV+WVZR1aw21l2
 hLuRG1v5V2SNy8YZbyRKdAap+d8eI3rRRpHCcKyyxH7BkhLx54+TJn3hykCcHgMuxdRB1YXRs
 G0WlPro84hM7tMBa8k3+nRHxu8cJWu63xhu3OqYtB1yP5T3iFQNRt0WL/TecP3Pc7u++lR/W4
 I6EQTtaM/wn9eno7oWeVhI3VqpZoui2Hyw0GHpr5cCBc7a6+UIsY4hVh893Rm1S3NR8AlDRSH
 N1xm3jiYb7HYtJNkVRwHJ4DtvT/vdJzON/9Fd/QKbAwQCIeTC+CzZcYyxVdl3pHRbXBsXAIph
 I2vNrw6bhoyDPM/aPgyzoOvMG3hlEpcygx8NMGYFengiAmn5dWmys6nLER1O53JFsNMroWBVO
 jkX0wg/fQekZftc5OTyK13zOEeSU5WWOTSkAErI1rRpshEogM0E3CDx24yJm5j2VLs4rbnwn0
 zCC9ZCpAFeJa9vmkPk/FRKOWP1MEZnCl4f9kY13/0MZzZmwHs5QOU6CNFsmgzRbM45FPcFe8k
 zwfXm7Lt0oTgzkpMtffvp1CXmy2Wq+a8KLDB+6uxYvV0PE+gZZFfxYgYJMX+WnJb8YFwTudvb
 nQbGNvp+jPYeoWpO7lrL0/QP6Xj2g+lNdMW0v72HqhqbSP1lcLYnuyU3EjUDbs3uZQOvQJRg0
 azQwB+c11/nRNYrPzPeJGzGg+MgKBKiSXJJCIzwP9Y076soy78RrI/wl4BAiI/Vd3Eg354fd6
 rsiyMmm0OuNfzOibJx9wWH8HPSov5XHwd7C/LUWJrxQXQVYS35ZDYfZ6QLkhoGgXdg/pYgMZ3
 dRfQv5Z2xZJ4HOLuj4Kbr5g+ZgsYuesnqFOtMmw9ze5JJumJvnqIWefQGUJQBOqGrudZPDYPe
 xu4iuilHzQ3766R7F5xCPxJTqU1XJ3PNz7NzsBNYnkQs/2K+Bkb8v+ZqKCS4=
X-Rspamd-Queue-Id: 46vsBy5FGdz3Jbm
X-Spamd-Bar: -----
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=XGuvcNon;
 dmarc=none;
 spf=none (mx1.freebsd.org: domain of ohartmann@walstatt.org has no SPF policy
 when checking 212.227.17.22) smtp.mailfrom=ohartmann@walstatt.org
X-Spamd-Result: default: False [-5.51 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[];
 R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[];
 TO_DN_SOME(0.00)[];
 IP_SCORE(-1.01)[ip: (-5.68), ipnet: 212.227.0.0/16(-1.36), asn: 8560(1.99),
 country: DE(-0.01)]; 
 MIME_GOOD(-0.20)[multipart/signed,text/plain];
 DMARC_NA(0.00)[walstatt.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0];
 HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[];
 DKIM_TRACE(0.00)[gmx.net:+]; RCPT_COUNT_SEVEN(0.00)[7];
 R_SPF_NA(0.00)[]; SIGNED_PGP(-2.00)[];
 RCVD_IN_DNSWL_LOW(-0.10)[22.17.227.212.list.dnswl.org : 127.0.3.1];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~];
 ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[];
 RECEIVED_SPAMHAUS_PBL(0.00)[161.85.65.91.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net
 : 127.0.0.11]
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>;
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Oct 2019 16:37:32 -0000

--Sig_/icZw9PmU7w9Aj=UqDZhZj.c
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Fri, 18 Oct 2019 09:26:51 -0700
Cy Schubert <Cy.Schubert@cschubert.com> wrote:

> On October 18, 2019 8:54:06 AM PDT, "Hartmann, O."
> <ohartmann@walstatt.org> wrote:
> >On Fri, 18 Oct 2019 07:24:12 -0700
> >Cy Schubert <Cy.Schubert@cschubert.com> wrote:
> > =20
> >> In message <20191018160935.7dda61c4@hermann.fritz.box>, "Hartmann,
> >> O." writes: =20
> >> > --Sig_/QDD9BZgeMM6.TJkOIciNb32
> >> > Content-Type: text/plain; charset=3DUS-ASCII
> >> > Content-Transfer-Encoding: quoted-printable
> >> >
> >> > On Fri, 18 Oct 2019 14:00:45 +0200
> >> > Gary Jennejohn <gljennjohn@gmail.com> wrote:
> >> >   =20
> >> > > On Fri, 18 Oct 2019 12:21:04 +0200
> >> > > "Hartmann, O." <ohartmann@walstatt.org> wrote:
> >> > >=3D20   =20
> >> > > > On Thu, 17 Oct 2019 21:33:01 +0000 (UTC)
> >> > > > Conrad Meyer <cem@FreeBSD.org> wrote:
> >> > > >  =3D20   =20
> >> > > > > Author: cem
> >> > > > > Date: Thu Oct 17 21:33:01 2019
> >> > > > > New Revision: 353700
> >> > > > > URL: https://svnweb.freebsd.org/changeset/base/353700
> >> > > > >=3D20
> >> > > > > Log:
> >> > > > >   Implement NetGDB(4)
> >> > > > >  =3D20
> >> > > > >   NetGDB(4) is a component of a system using a panic-time
> >> > > > > network stack to remotely debug crashed FreeBSD kernels
> >> > > > > over the network, instead of traditional serial interfaces.
> >> > > > >  =3D20
> >> > > > >   There are three pieces in the complete NetGDB system.
> >> > > > >  =3D20
> >> > > > >   First, a dedicated proxy server must be running to accept
> >> > > > > connections from both NetGDB and gdb(1), and pass
> >> > > > > bidirectional traffic between the two protocols.
> >> > > > >  =3D20
> >> > > > >   Second, the NetGDB client is activated much like ordinary
> >> > > > > 'gdb' and similarly to 'netdump' in ddb(4) after a panic.
> >> > > > > Like other debugnet(4) clients (netdump(4)), the network
> >> > > > > interface on the route to the proxy server must be online
> >> > > > > and support debugnet(4). =3D20
> >> > > > >   Finally, the remote (k)gdb(1) uses 'target remote
> >> > > > > <proxy>:<port>' (like any other TCP remote) to connect to
> >> > > > > the proxy server.=3D20
> >> > > > >   The NetGDB v1 protocol speaks the literal GDB remote
> >> > > > > serial protocol, and uses a 1:1 relationship between GDB
> >> > > > > packets and sequences of debugnet packets (fragmented by
> >> > > > > MTU).  There is no encryption utilized to keep debugging
> >> > > > > sessions private, so this is only appropriate for local
> >> > > > > segments or trusted networks. =3D20
> >> > > > >   Submitted by:	John Reimer <john.reimer AT emc.com>
> >> > > > > (earlier version) Discussed some with:	emaste, markj
> >> > > > >   Relnotes:	sure
> >> > > > >   Differential Revision:
> >> > > > > https://reviews.freebsd.org/D21568
> >> > > > >=3D20
> >> > > > > Added:
> >> > > > >   head/share/man/man4/netgdb.4   (contents, props changed)
> >> > > > >   head/sys/gdb/netgdb.c   (contents, props changed)
> >> > > > >   head/sys/gdb/netgdb.h   (contents, props changed)
> >> > > > > Modified:
> >> > > > >   head/share/man/man4/Makefile
> >> > > > >   head/share/man/man4/ddb.4
> >> > > > >   head/sys/amd64/conf/GENERIC
> >> > > > >   head/sys/conf/NOTES
> >> > > > >   head/sys/conf/files
> >> > > > >   head/sys/conf/options
> >> > > > >   head/sys/gdb/gdb.h
> >> > > > >   head/sys/gdb/gdb_int.h
> >> > > > >   head/sys/gdb/gdb_main.c
> >> > > > >   head/sys/gdb/gdb_packet.c
> >> > > > >   head/sys/i386/conf/GENERIC
> >> > > > >   head/sys/kern/subr_kdb.c
> >> > > > >   head/sys/net/debugnet.c
> >> > > > >   head/sys/net/debugnet.h
> >> > > > >   head/sys/net/debugnet_inet.c
> >> > > > >   head/sys/net/debugnet_int.h
> >> > > > >   head/sys/sys/kdb.h
> >> > > > >   head/sys/sys/param.h
> >> > > > >=3D20
> >> > > > > Modified: head/share/man/man4/Makefile
> >> > > > > =20
> >=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=
=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> >=20
> >> > > > >   =20
> >> > =20
> >=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=
=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> >=20
> >> > =20
> >=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=
=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D
> >=20
> >> > =3D3D=3D3D=3D3D=3D3D=3D3D   =20
> >> > > > > --- head/share/man/man4/Makefile	Thu Oct 17 21:25:50
> >> > > > > 2019	(r353699) +++ head/share/man/man4/Makefile
> >> > > > > Thu Oct 17 21:33:01 2019	(r353700) @@ -307,6 +307,7
> >> > > > > @@ MAN=3D3D aac.4 \ net80211.4 \
> >> > > > >  	netdump.4 \
> >> > > > >  	netfpga10g_nf10bmac.4 \
> >> > > > > +	netgdb.4 \
> >> > > > >  	netgraph.4 \
> >> > > > >  	netintro.4 \
> >> > > > >  	netmap.4 \
> >> > > > >    =3D20   =20
> >> > > > [...]
> >> > > >=3D20
> >> > > >=3D20
> >> > > > Having "nooptions       NETGDB          # netgdb(4) client
> >> > > > support" defined in my kernel config file, buildkernel fails
> >> > > > with the error shown below.
> >> > > >=3D20
> >> > > > [...]
> >> > > > --- debugnet.o ---
> >> > > > /usr/src/sys/net/debugnet.c:662:4: error: implicit
> >> > > > declaration of function 'db_printf' is invalid in C99
> >> > > > [-Werror,-Wimplicit-function-declaration] db_printf("%s:
> >> > > > Could not get route for that server.\n", ^
> >> > > > /usr/src/sys/net/debugnet.c:662:4: note: did you mean
> >> > > > 'if_printf'? /usr/src/sys/net/if_var.h:679:5: note:
> >> > > > 'if_printf' declared here int     if_printf(struct ifnet *,
> >> > > > const char *, ...) __printflike(2, 3); ^ 1 error generated.
> >> > > > =3D20   =20
> >> > >=3D20
> >> > > And I also had to add "nooptions NETDUMP" to get the kernel to
> >> > > compile and link.
> >> > >=3D20   =20
> >> >
> >> > I already had "nooptions NETDUMP" defined.   =20
> >>=20
> >>=20
> >> This will fix it.
> >>=20
> >> Index: sys/net/debugnet.c
> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >> --- sys/net/debugnet.c	(revision 353717)
> >> +++ sys/net/debugnet.c	(working copy)
> >> @@ -659,8 +659,10 @@
> >>  		CURVNET_RESTORE();
> >> =20
> >>  		if (dest_rt =3D=3D NULL) {
> >> +#ifdef DDB
> >>  			db_printf("%s: Could not get route for
> >> that server.\n", __func__);
> >> +#endif
> >>  			error =3D ENOENT;
> >>  			goto cleanup;
> >>  		}
> >>=20
> >>=20
> >>  =20
> >
> >Doesn't work, either.
> >The kernel config in question doesn't have any debugging features
> >enabled, so nooptions DDB is alos part of the configuration.
> >buildkernel still fails. =20
>=20
> Hmm. Fixed my firewall build. My non-test firewall kernel config has
> the same nooption.
>=20
> What other options/nooptions and patches are applied to your tree?
>=20
>=20

I use the vanilla CURRENT tree without any extra pachtes. There are
lots of other nooptions, especially for drivers I do not need and
debugging is completely turned off.

Having "nooptions DDB" commeted out fixes the build for me.
Anticipating the correct portion of my config file, here are those
nooptions I deem relevant. The nooptions are kept in a file added to
GENERIC afterwards:

[... sorry for the line wrap]
nooptions       DDB_CTF                 # Kernel ELF linker loads CTF
data nooptions       INCLUDE_CONFIG_FILE     # Include this file in
kernel #options        RACCT                   # Resource accounting
framework #options        RACCT_DEFAULT_TO_DISABLED # Set
kern.racct.enable=3D0 by default #options        RCTL
# Resource limits

# Debugging support.  Always need this:
#options        KDB                     # Enable kernel debugger
support. #options        KDB_TRACE               # Print a stack trace
for a panic. # For full debugger support use (turn off in stable
branch): nooptions       BUF_TRACKING            # Track buffer history
nooptions       DDB                     # Support DDB.
nooptions       FULL_BUF_TRACKING       # Track more buffer history
nooptions       GDB                     # Support remote GDB.
nooptions       DEADLKRES               # Enable the deadlock resolver
nooptions       INVARIANTS              # Enable calls of extra sanity
checking nooptions       INVARIANT_SUPPORT       # Extra sanity checks
of internal structures, required by INVARIANTS nooptions       WITNESS
               # Enable checks to detect deadlocks and cycles nooptions
      WITNESS_SKIPSPIN        # Don't run witness on spinlocks for
speed nooptions       MALLOC_DEBUG_MAXZONES   # Separate malloc(9)
zones nooptions       VERBOSE_SYSINIT # Support debug.verbose_sysinit,
off by default

# Kernel Sanitizers
#options        COVERAGE                # Generic kernel coverage. Used
by KCOV #options        KCOV                    # Kernel Coverage
Sanitizer # Warning: KUBSAN can result in a kernel too large for loader
to load #options        KUBSAN                  # Kernel Undefined
Behavior Sanitizer

# Kernel dump features.
#options        EKCD                    # Support for encrypted kernel
dumps #options        GZIO                    # gzip-compressed kernel
and user dumps #options        ZSTDIO                  #
zstd-compressed kernel and user dumps nooptions       NETDUMP
      # netdump(4) client support nooptions               NETGDB
          # netgdb(4) client support

# Make an SMP-capable kernel by default
#options        SMP                     # Symmetric MultiProcessor
Kernel #options        EARLY_AP_STARTUP


--Sig_/icZw9PmU7w9Aj=UqDZhZj.c
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCXanqPgAKCRA4N1ZZPba5
RywrAP4pll79LBiHh2yRWOOz1I56F+ruDKVm2wPDvBixjQc0fQD/ayNkbQ98WGDG
FrTV7DEBffsX48/HokDtJo5foWJoNQA=
=rKEx
-----END PGP SIGNATURE-----

--Sig_/icZw9PmU7w9Aj=UqDZhZj.c--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ACCC37A4-4E6A-4B08-85C6-D37D658A88B4>