From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJpEz-00072C-9I for qemu-devel@nongnu.org; Wed, 11 Sep 2013 14:34:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJpEy-00048v-6g for qemu-devel@nongnu.org; Wed, 11 Sep 2013 14:34:13 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:53501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJpEy-00048e-0V for qemu-devel@nongnu.org; Wed, 11 Sep 2013 14:34:12 -0400 Date: Wed, 11 Sep 2013 19:33:57 +0100 From: Alex Bligh Message-ID: <8EC77DC800AF1B69C8DBC67E@nimrod.local> In-Reply-To: <20130911154841.GD2293@redhat.com> References: <1378906448-15834-1-git-send-email-famz@redhat.com> <1378906448-15834-5-git-send-email-famz@redhat.com> <20130911154841.GD2293@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Fam Zheng Cc: peter.maydell@linaro.org, Alex Bligh , mjt@tls.msk.ru, qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com, vilanova@ac.upc.edu, rth@twiddle.net --On 11 September 2013 16:48:41 +0100 "Daniel P. Berrange" wrote: > We know the precise list of valid modules when building QEMU, > so IMHO, this should just explicitly load each known module > name, and *not* readdir. Also it should do something along the > lines suggested their of poisoning exported symbols with a > build hash to guarantee the modules loaded match the original > binary and that the symbols change on every rebuild. > > The latter is important even ignoring the 3rd party module > question, since it ensures developers/users don't accidently > run with mis-match QEMU and module builds, which could lead > to some very hard to diagnose bugs / behaviour. +1 Though in the interest of not having to recompile everything for one minor change a .c file in qemu whilst developing, perhaps we could just hash exported symbols and include that hash, rather than ensuring the symbols change on (literally) every rebuild. Else every dev will build with modules turned off! -- Alex Bligh