From owner-freebsd-current@freebsd.org Thu Apr 23 09:22:59 2020 Return-Path: Delivered-To: freebsd-current@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 C2E082AE5FB for ; Thu, 23 Apr 2020 09:22:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 497Bfq3DK5z4jks for ; Thu, 23 Apr 2020 09:22:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 6E7912AE5FA; Thu, 23 Apr 2020 09:22:59 +0000 (UTC) Delivered-To: current@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 6E38A2AE5F9 for ; Thu, 23 Apr 2020 09:22:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497Bfp2Tm4z4jkr for ; Thu, 23 Apr 2020 09:22:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 03N9MmdZ025407 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 23 Apr 2020 12:22:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 03N9MmdZ025407 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 03N9MmsQ025406; Thu, 23 Apr 2020 12:22:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 23 Apr 2020 12:22:48 +0300 From: Konstantin Belousov To: Alexander Leidinger Cc: current@freebsd.org Subject: Re: nfslockd kernel module fails to load Message-ID: <20200423092248.GG2522@kib.kiev.ua> References: <20200423080809.Horde.Bo3hS63ATAG-0MzxdGgLyhI@webmail.leidinger.net> <20200423061908.GE2522@kib.kiev.ua> <20200423083008.Horde.pIybBPGLYf5eoV_K5M6O6w7@webmail.leidinger.net> <20200423070412.GF2522@kib.kiev.ua> <20200423094602.Horde.CSyNCDCsORIorqv2R743XCg@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423094602.Horde.CSyNCDCsORIorqv2R743XCg@webmail.leidinger.net> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 497Bfp2Tm4z4jkr X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(0.00)[ip: (-3.00), ipnet: 2001:470::/32(-4.65), asn: 6939(-3.60), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 09:22:59 -0000 On Thu, Apr 23, 2020 at 09:46:02AM +0200, Alexander Leidinger wrote: > > Quoting Konstantin Belousov (from Thu, 23 Apr 2020 > 10:04:12 +0300): > > > On Thu, Apr 23, 2020 at 08:30:08AM +0200, Alexander Leidinger wrote: > > > Quoting Konstantin Belousov (from Thu, 23 Apr 2020 > > > 09:19:08 +0300): > > > > > > > On Thu, Apr 23, 2020 at 08:08:09AM +0200, Alexander Leidinger wrote: > > > > > Hi, > > > > > > > > > > link_elf_obj: symbol xdr_free undefined > > > > > linker_load_file: /boot/kernel/nfslockd.ko - unsupported file type > > > > > KLD nfsd.ko: depends on nfslockd - not available or version mismatch > > > > > linker_load_file: /boot/kernel/nfsd.ko - unsupported file type > > > > > > > > > > The xdr kernel module is loaded. > > > > > > > > The following should help. > > > > > > > /* So that loader and kldload(2) can find us, wherever we are.. */ > > > > +MODULE_DEPEND(nfslockd, xdr, 1, 1, 1); > > > > MODULE_DEPEND(nfslockd, krpc, 1, 1, 1); > > > > > > I thought MODULE_DEPEND is only a way to tell the loader / kldload that the > > > other module is to be loaded in case it is not in the kernel / loaded > > > already. Is this only a part of what it does and / or did this change and > > > now it is also needed so that a kernel module is able to resolve the > > > symbols? In my case the module is loaded already when I try to load the > > > nfslockd module. > > > > Did you tried the patch ? > > I was trying it after asking the question. I confirm it works. > > > You already said that the module was loaded. > > > > MODULE_DEPEND() handles symbol namespaces. > > Since when is this the case (rough figure would be enough if someone knows > it without looking it up)? It is definitely so from the 5.x times, but I highly suspect that this was the feature of 'new' modules from the beginning.