Date: Sun, 28 Oct 2018 12:00:10 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: Mark Johnston <markj@freebsd.org> Cc: Andreas Longwitz <longwitz@incore.de>, "freebsd-dtrace@freebsd.org" <freebsd-dtrace@freebsd.org> Subject: Re: Why my DTrace script does not work after installing a new kernel without reboot Message-ID: <20181028190010.GF75530@funkthat.com> In-Reply-To: <20181027225339.GA4191@spy> References: <5BD4E965.9040006@incore.de> <20181027225339.GA4191@spy>
next in thread | previous in thread | raw e-mail | index | archive | help
Mark Johnston wrote this message on Sat, Oct 27, 2018 at 18:53 -0400: > On Sun, Oct 28, 2018 at 12:40:37AM +0200, Andreas Longwitz wrote: > > I have a simple, probably stupid question. I run FreeBSD 10.4 Stable > > r338093 and use the script > > > > #!/usr/sbin/dtrace -s > > > > dtrace:::BEGIN > > { > > printf("pf_default_rule.timeout[2/16/17]=%d/%d/%d\n", > > kernel`pf_default_rule.timeout[2], kernel`pf_default_rule.timeout[16], > > kernel`pf_default_rule.timeout[17]); > > } > > > > The output normally is > > pf_default_rule.timeout[2/16/17]=86400/6000/12000 > > > > But when I change the sourcefile /sys/netpfil/pf/pf.c trying a patch and > > build and install the new kernel but without reboot, then the output of > > the script is wrong: > > > > pf_default_rule.timeout[2/16/17]=3237216124/0/0 > > > > After reboot everything works again. > > Does your patch change the layout of the timeout structure? If so, the > problem is that dtrace(1) is using the CTF from kern.bootfile, but that > doesn't match the layout of the structures used by the running kernel. Except that the default make installkernel will adjust kern.bootfile to point to the correct old location.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181028190010.GF75530>