Re: [PATCH 3/3] module: don't ignore vermagic string if module doesn't have modversions

From: Rusty Russell
Date: Sat May 10 2008 - 20:58:22 EST


On Saturday 10 May 2008 00:44:34 Linus Torvalds wrote:
> On Fri, 9 May 2008, Rusty Russell wrote:
> > We should only ignore the start of the vermagic string if the module
> > actually *has* crcs to check. Rather than (say) having an
> > entertaining hissy fit and creating a config option to work around the
> > buggy code.
>
> Btw, this makes the two vesions of "same_magic()" be basically the same
> (since without MODVERSIONS, has_crcs *should* always be zero). Maybe we
> should make it just one version, to simplify logic?

I know, but it's a little subtle.

If the module has an __versions section, yet the kernel was built without
CONFIG_MODVERSIONS, we should not ignore the first part of the version. We
could just #ifdef CONFIG_MODVERSIONS around the verindex initialization tho,
to guarantee that it's 0 for !MODVERSIONS. But that puts YA #ifdef in that
function, and I already itch to clean up the ones there...

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/