lkml.org 
[lkml]   [2000]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] ISA PnP (2.4.0-test9)
Date
On Mon, 9 Oct 2000 12:29:19 +0200 (MEST), 
Jaroslav Kysela <perex@suse.cz> wrote:
>On Mon, 9 Oct 2000, Keith Owens wrote:
>> Modutils and the kernel are compiled from different headers, none of
>> this #include <linux/xxx.h> business in modutils. So you must never
>> assume that the structures in modutils and in the kernel have the same
>> specification. Since ISAPNP_CARD_DEVS is #defined and can be changed,
>> that value must be exported to user space.
>
>Although ISAPNP_CARD_DEVS is #defined, we may take this value as
>a constant. I've never seen the cards with more than five logical
>devices. I can add a comment that a change of the constant will
>cause compatibility problems with modutils.

"compatibility problems" is putting it mildly. The moment you change
the size of that structure, all the people using older modutils will
start getting errors and they will blame me, not the person who changed
the structure size.

Either ISAPNP_CARD_DEVS is set in concrete and *never* changed or the
value is exported to user space right from the start. "Export it
later" is not an acceptable option because all the old modutils which
do not know about the newly exported variable will fail when the
structure changes. People are still running modutils 2.1.121 on 2.4
kernels, they just will not upgrade. Any mismatch between kernel and
modutils structures is a disaster waiting to happen, we must preserve a
compatible userspace ABI for modules.

>Another solution is to change ISAPNP_CARD_TABLE to:
>
>#define ISAPNP_CARD_TABLE(name) \
> const int __module_isapnp_card_devs = ISAPNP_CARD_DEVS; \
> MODULE_GENERIC_TABLE(isapnp_card, name)
>
>But, I think that we don't need this change at the time. If the situation
>arises (we found an ISA PnP card with more than eight logical devices), we
>may add a global variable to determine the structure change as well. The
>change may be also determined with checking of the kernel version.

That only works for people who upgrade to newer modutils. It does
nothing for the 50%+ of the population who keep running old modutils on
new kernels, they will now fail.

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

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.482 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site