From owner-freebsd-dtrace@freebsd.org Sat Oct 27 22:53:53 2018 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 099B310D6CAD for ; Sat, 27 Oct 2018 22:53:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it1-x12e.google.com (mail-it1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 837227F54D for ; Sat, 27 Oct 2018 22:53:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it1-x12e.google.com with SMTP id k206-v6so5557738ite.0 for ; Sat, 27 Oct 2018 15:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=apIJRg1TeZ7WnuFbXDZsXxA6n3Yzavn8FZzeIysAPPQ=; b=XHjdKOsTsMamyU7vSA8G5Q4K7s4o15NNLbOjJTMMmLsxfITdMX0+XwmvBJuWzRWN/T FlD2w3pNadeoM8+gd6oi1bVZp0uEiUWTW/1xNgppYkrhr5tnh2/IZcDBOMGudEK+CgIE ShznbFh9P1AskfPuTbUxCUNcczEvp+h0ZGHUPAPZCYfIXjIIDXsG82V+XI6tAjHnJbQ7 LhgL4rqBTkJv3s+yBSlGBtI7v9bvOybVE7ueilta+Arlv5jv8amYv1NDva5CCPjIJFXN S6Uhf5vAmOCs2f8T7lbGV2LZnn9RdCdnS1l2eTtlsp5nIbKHDGN49mB8LH5l3Q/TZN9Y 0kZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=apIJRg1TeZ7WnuFbXDZsXxA6n3Yzavn8FZzeIysAPPQ=; b=RPUlTjANKnx/jAq//5P8C8pesHvkk5/foHYmBIewXZ8nIQHUrccZG4x6nt+MLql3HS vLp1mYxJzm+cvtThUs8GRCK83Dzcq5/OLHHUmVJB0HRHz6/46ccDI6eoFb4z3YLHAcIR OYT/jY4YOEZoIP/IQZZXuP6Ju/fRuG+FuCu8EihkAB029DV61+CYtNZ773vmbSrjDOdO g4nokl7NKqvJE5BFhFi3LDIWEJwZzphLIOvdErIF9MxMy7QNI7l+zLlcnfFz/0Avbu8Q x1ecbh6zgxb6BOYxe/5dNBgYeea+X0V4Hdci71a6TOMUgTJL1u/kQ/UkCPVeIyYK560X jUKA== X-Gm-Message-State: AGRZ1gKqtQjNYFS/qrzz6vL6AuGUYQrCHnWFm00C0IQ70NEkz74HO5hQ MlS36p4SepN5LXcfM/1cHShHW29f X-Google-Smtp-Source: AJdET5cfrOWUd/IxB0iDznNKqbccJKGtZ+7Y5+x5lfEQ6I4MYzx1lyhQUHxKvl5Q9vgehHVWAEB05w== X-Received: by 2002:a24:bcc1:: with SMTP id n184-v6mr6701652ite.174.1540680831691; Sat, 27 Oct 2018 15:53:51 -0700 (PDT) Received: from spy (toroon0560w-lp130-08-67-71-176-199.dsl.bell.ca. [67.71.176.199]) by smtp.gmail.com with ESMTPSA id h12-v6sm3750904iok.64.2018.10.27.15.53.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Oct 2018 15:53:50 -0700 (PDT) Sender: Mark Johnston Date: Sat, 27 Oct 2018 18:53:46 -0400 From: Mark Johnston To: Andreas Longwitz Cc: "freebsd-dtrace@freebsd.org" Subject: Re: Why my DTrace script does not work after installing a new kernel without reboot Message-ID: <20181027225339.GA4191@spy> References: <5BD4E965.9040006@incore.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5BD4E965.9040006@incore.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 22:53:53 -0000 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.