From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 10 18:57:58 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67FDB106564A; Tue, 10 Jul 2012 18:57:58 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.100]) by mx1.freebsd.org (Postfix) with ESMTP id E8DA58FC1B; Tue, 10 Jul 2012 18:57:57 +0000 (UTC) Received: from [78.35.154.206] (helo=fabiankeil.de) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1Sofch-0002ML-Jh; Tue, 10 Jul 2012 20:57:23 +0200 Date: Tue, 10 Jul 2012 20:57:02 +0200 From: Fabian Keil To: Sean Bruno Message-ID: <20120710205702.5e57168b@fabiankeil.de> In-Reply-To: <1341939155.2573.8.camel@powernoodle.corp.yahoo.com> References: <1341863341.6064.11.camel@powernoodle.corp.yahoo.com> <4FFB4770.7050209@FreeBSD.org> <20120710154128.192eb8d6@fabiankeil.de> <1341939155.2573.8.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/uZuc8esXT5IFMib.zSl9_Cl"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: freebsd-hackers@FreeBSD.org, Andriy Gapon , rmacklem@FreeBSD.org Subject: Re: dtraceall.ko with old nfsclient X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2012 18:57:58 -0000 --Sig_/uZuc8esXT5IFMib.zSl9_Cl Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sean Bruno wrote: > On Tue, 2012-07-10 at 06:41 -0700, Fabian Keil wrote: > > > > > > --- //depot/yahoo/ybsd_9/src/sys/modules/dtrace/dtraceall/dtraceall.c > > > > 2011-11-02 23:46:55.000000000 0000 > > > > > > +++ /home/seanbru/dtrace_9/src/sys/modules/dtrace/dtraceall/dtraceall.c > > > > 2011-11-02 23:46:55.000000000 0000 > > > > @@ -66,8 +66,11 @@ > > > > MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); > > > > MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); > > > > MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); > > > > +#if defined (NFSCL) > > > > MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1); > > > > +#else /* defined (NFSCLIENT) */ > >=20 > > Any objections to changing this to > > #elif defined (NFSCLIENT) > > ?=20 >=20 > No objections here. I suspect that this is the more correct thing > regardless. I mean, it keeps the nfs dtrace objects loading in the > event someone is running a non-nfs kernel... right? I do not use a completely NFS-free kernel, but I don't build any NFS-related modules. Trying to load an unpatched dtraceall results in: Jul 9 21:58:48 r500 sudo: fk : TTY=3Dpts/16 ; PWD=3D/home/fk ; USER= =3Droot ; COMMAND=3D/sbin/kldload dtraceall Jul 9 21:58:48 r500 kernel: [8922] KLD dtnfsclient.ko: depends on oldnfs -= not available or version mismatch Jul 9 21:58:48 r500 kernel: [8922] linker_load_file: Unsupported file type Jul 9 21:58:48 r500 kernel: [8922] KLD dtraceall.ko: depends on dtnfsclien= t - not available or version mismatch Jul 9 21:58:48 r500 kernel: [8922] linker_load_file: Unsupported file type My assumption was that your patch and the "#elif defined (NFSCLIENT)" would fix that, and indeed it does, but I later on realized that I actually do have NFSCL in the kernel: fk@r500 /usr/src $sysctl kern.conftxt | grep NFS options NFS_ROOT options NFSLOCKD options NFSD options NFSCL My impression is that the patch is missing an opt_nfs.h inclusion combined with the Makefile voodoo to create the file. The dtraceall module already has an opt_compat.h, even though the Makefile logic to create it seems a bit dubious to me. It blindly assumes that COMPAT_FREEBSD32 is available on amd64. Fabian --Sig_/uZuc8esXT5IFMib.zSl9_Cl Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/8ewIACgkQBYqIVf93VJ3NOQCePiqna0WCGP5D19bJyLfjjhMX 8N0Ani1xB5WcjwiRy1DcsZ7ZtAG3xHrn =W44H -----END PGP SIGNATURE----- --Sig_/uZuc8esXT5IFMib.zSl9_Cl--