From owner-freebsd-arch@freebsd.org Mon Apr 17 06:58:35 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEC20D41B03 for ; Mon, 17 Apr 2017 06:58:35 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id CC79F1E25 for ; Mon, 17 Apr 2017 06:58:35 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id C90B0D41B02; Mon, 17 Apr 2017 06:58:35 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C70E4D41B01 for ; Mon, 17 Apr 2017 06:58:35 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E6251E24; Mon, 17 Apr 2017 06:58:35 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id q125so7401625wmd.3; Sun, 16 Apr 2017 23:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=L4YQOcljjGwAWDZGGjxy/0A0vfAp+j/IO8YSifXsiQM=; b=bBf03K/56K+esL5A3DA4Tjw8SCuW/Rt/EbaPFS5sSeCyo4ZZD0Xt8n74VMI5fsfvjE POiWJonQSwlSYOWP5ZY5EKglHzeR+o7l2HrmYReMP1vdNgMS87t6fLot1pqY9qJUox9D yUATBbbtfI65YsoEnJqxj9byc/Kd/cRR6LvVYz8ufj/Va9Zc9RqlscPcy2D7cnXMjCBw Uwo/k1XjfzmFYmWJWzg1pXaFu5DQfe/BtWhgGtcerIT6rytvPN6GgVgdaWAn7mRhdWrb a7TxvVDEliDmmNyTBVc+ebw6z7EN04cokcMkZtFXQLapZS61p39QHiZv5VOt1jbY3Nko n+SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=L4YQOcljjGwAWDZGGjxy/0A0vfAp+j/IO8YSifXsiQM=; b=Nj9lJbFsbQiYHD25pb/dJZIYDjlFW4ltrgGNquPPa/L13B89PorNdQcZETEQ9iNx3k tC3y7QZVVQUIpKIc4tgUQQ81G40iFoDWYbUOWTDf6bknlT616SmBLylAfbDR0g23xbkg ujWiI4TFXijGCJ+VeOhbQEYjsHjHF3OcQz7/smkdz7E6SCILCe7YC+sQ/LxcWWILJ3rP rXH2Cjtck8QsRn5iZwhuULw6yuWzice4FvsYpNaaZNPcZ82e519+wvp8cyLVnQ8g0aFx kLFOfcypesoR0XOU/cfFQcUuZYlOVdTP5qPE42EEA5OuEVypZhMhyyEaZrnws96m0t9R fImg== X-Gm-Message-State: AN3rC/4JXDjRU440Vv0KgWGN4x8V2DK+KTrE39wTzSBxGdBwLwwwKPfm sHCkX66+vXkGAdGp X-Received: by 10.28.74.147 with SMTP id n19mr7930295wmi.86.1492412313192; Sun, 16 Apr 2017 23:58:33 -0700 (PDT) Received: from ernst.home (p4FCA618C.dip0.t-ipconnect.de. [79.202.97.140]) by smtp.gmail.com with ESMTPSA id o9sm9278673wmd.4.2017.04.16.23.58.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Apr 2017 23:58:32 -0700 (PDT) Date: Mon, 17 Apr 2017 08:58:22 +0200 From: Gary Jennejohn To: Mark Johnston Cc: Baptiste Daroussin , arch@FreeBSD.org Subject: Re: modules finding order Message-ID: <20170417085822.0af03ceb@ernst.home> In-Reply-To: <20170416221249.GA11628@raichu> References: <20170416202137.5x4vegfnm2pvkn6t@ivaldir.net> <20170416221249.GA11628@raichu> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2017 06:58:36 -0000 On Sun, 16 Apr 2017 15:12:49 -0700 Mark Johnston wrote: > On Sun, Apr 16, 2017 at 10:21:37PM +0200, Baptiste Daroussin wrote: > > Hi all, > > > > I would like to change in FreeBSD 12 at least the default order the modules are > > found/look up. > > > > For now the modules are loaded from /boot/kernel first then if not found, > > checked from /boot/modules. > > > > I think we should revert that to /boot/modules first then /boot/kernel. > > > > The main reason being to simplify multiple things: > > 1/ If one needs to change a module (like backporting) I could install it from > > package and it would take precedent from the one provided by the default kernel > > I'm using > > 2/ As a hacker I could build my own version of a given module and install it in > > /boot/modules I won't overwrite the default kernel module > > This complements r299393. Since that revision went in I've confused myself > several times by building and installing a module from sys/modules, and > then forgetting to explicitly kldload from /boot/modules, so I > instead get a stale copy. > > > 3/ as a port maintainer I could provide my own version of the module that would > > take precedence over the one provided by the kernel. > > I think we would like this behaviour for a port that installs the DRM > modules. > > > > > As it is a change in the default behaviour I would only do it for 12 (beside I > > would love to do it in earlier version :D) > > > > Anyone has an opinion on the subject? > > It seems reasonable to me. > The problem I see with this is that the module under /boot/modules may have been generated against a /usr/src which is newer than what was used to generate the running kernel. In this case kldload should (I hope) fail. I regularly update /usr/src without making a new world or kernel. If kldload automatically falls back to trying /boot/kernel in this case then everything would be OK. If kldload does not or cannot retry then I would not consider this change a good idea. There's also the possibility that the module is loaded successfully, but at run time it fails due to missing functionality in the old kernel. I'm not sure that this could happen. -- Gary Jennejohn