From owner-freebsd-current@freebsd.org Fri Apr 6 02:33:37 2018 Return-Path: Delivered-To: freebsd-current@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 4B238F97E82 for ; Fri, 6 Apr 2018 02:33:37 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu [18.9.25.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE79C7ED0C; Fri, 6 Apr 2018 02:33:36 +0000 (UTC) (envelope-from kaduk@mit.edu) X-AuditID: 1209190c-c0bff70000005264-b4-5ac6dc7fb4da Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id CD.B6.21092.F7CD6CA5; Thu, 5 Apr 2018 22:33:35 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id w362XYqb007598; Thu, 5 Apr 2018 22:33:35 -0400 Received: from mit.edu (24-107-191-124.dhcp.stls.mo.charter.com [24.107.191.124]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id w362XVv9013104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 5 Apr 2018 22:33:33 -0400 Date: Thu, 5 Apr 2018 21:33:30 -0500 From: Benjamin Kaduk To: Steve Kargl Cc: Ed Maste , FreeBSD Current Subject: Re: Can't load linux64.ko module Message-ID: <20180406023330.GI80088@mit.edu> References: <20180403162600.GA23894@troutmask.apl.washington.edu> <20180404190902.GA34292@troutmask.apl.washington.edu> <20180404201955.GA34736@troutmask.apl.washington.edu> <20180404211315.GA35006@troutmask.apl.washington.edu> <20180404213453.GA35165@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180404213453.GA35165@troutmask.apl.washington.edu> User-Agent: Mutt/1.9.1 (2017-09-22) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAIsWRmVeSWpSXmKPExsUixCmqrVt/51iUwc+b+haLbhxmtpjz5gOT xa27z5kdmD1mfJrP4tG7ex5zAFMUl01Kak5mWWqRvl0CV8bcs7dYC1ZyVbzcN5W1gbGfo4uR k0NCwETi1MU3jCC2kMBiJomGhR5djFxA9gZGiZ+nNzNBOGeYJE5eP8gMUsUioCJxq6mXDcRm E1CTeLy3mRXEFhEwknjd0w8WZxaIlOif9gIsLiygKbFx+TUWEJtXQEdi1pRzLBBDXzBJTL6x hA0iIShxcuYTFohmLYkb/14CbeYAsqUllv8Du5RTwEnizrYJYOWiAsoSe/sOsU9gFJiFpHsW ku5ZCN0LGJlXMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Rrq5WaW6KWmlG5iBAesJM8OxjNvvA4x CnAwKvHwZkQcixJiTSwrrsw9xCjJwaQkynv9DFCILyk/pTIjsTgjvqg0J7X4EKMEB7OSCK9z GFCONyWxsiq1KB8mJc3BoiTOu2j/3ighgfTEktTs1NSC1CKYrAwHh5IE76rbQI2CRanpqRVp mTklCGkmDk6Q4TxAwxeC1PAWFyTmFmemQ+RPMSpKifMeBkkIgCQySvPgekEJRSJ7f80rRnGg V4R5/4BU8QCTEVz3K6DBTECDJyQeARlckoiQkmpgvH1ebIaT8Da9h6xnXxzJlhfY0lny38tf ZBrT7X9h6tIeW9/O99BW8tW5PensfdX/kzxWyH4oD1YvO7fxk9XhFxv+W8osmW/BHF8xderq ggUFPuVCooqmt7e4ma/d4JSiMqezwljuqHmE3cFVRveLdjjqTfYJvXJ08RXGxfYz3hzSN1VR PiK+Q4mlOCPRUIu5qDgRAGGheFYDAwAA X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 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: Fri, 06 Apr 2018 02:33:37 -0000 On Wed, Apr 04, 2018 at 02:34:53PM -0700, Steve Kargl wrote: > > The answer is compat/linux/linux_vdso.c where we find > > #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) > #define __ELF_WORD_SIZE 32 > #else > #define __ELF_WORD_SIZE 64 > #endif > > having COMPAT_LINUX32 in my kernel config file gives me > elf32_linux_vdso_fixup. It seems that one cannot have > a kernel that supports both 32 and 64-bit linux software. > > linux(4) states > > for an amd64 kernel use: > > options COMPAT_LINUX32 > > Alternatively, to load the ABI as a module at boot time, place the > following line in loader.conf(5): > > linux_load="YES" > > It turns out that I have 'linux_load=YES" in /etc/loader.conf. > When I boot the kernel built with COMPAT_LINUX32 prevents > the kldload of linux64.ko. Yes, building the linuxulator statically into the kernel forces only a single ABI to be possible. If dynamic modules are used for all three relevant modules, then it is possible to simultaneously support 32- and 64-bit linux code. This is (perhaps obliquely) documented at https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html which I added after a similar thread on -current last July. -Ben