Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751408AbVLAA5G (ORCPT ); Wed, 30 Nov 2005 19:57:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751412AbVLAA5G (ORCPT ); Wed, 30 Nov 2005 19:57:06 -0500 Received: from ozlabs.org ([203.10.76.45]:19926 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S1751408AbVLAA5F (ORCPT ); Wed, 30 Nov 2005 19:57:05 -0500 Subject: Re: Why does insmod _not_ check for symbol redefinition ?? From: Rusty Russell To: "Tomar, Nagendra" Cc: linux-kernel@vger.kernel.org In-Reply-To: References: Content-Type: text/plain Date: Thu, 01 Dec 2005 11:57:09 +1100 Message-Id: <1133398629.8128.10.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1219 Lines: 27 On Fri, 2005-11-25 at 10:45 +0530, Nagendra Singh Tomar wrote: > Did'nt get any response to this one, so sending it again. > > Can any of the module subsystem authors tell, why they have decided to > allow loading a kernel module having an EXPORTed symbol with the same name > as an EXPORTed symbol in kernel proper. The safest thing would be to > disallow module loading in this case, giving a "Symbol redefinition" > error. > Allowing the module load will lead to overriding kernel functions > which will affect modules loaded in future, that reference those > functions. Overall, it can have bad effects of varying severity. Sure. It was due to minimalism. If you override a symbol it's undefined behavior. It should be fairly simple to add a check that noone overrides a symbol. We didn't bother checking for it because it wasn't clear that it was problematic. Hope that clarifies, Rusty. -- A bad analogy is like a leaky screwdriver -- Richard Braakman - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/