Re: [idea] request_module(const char *fmt, ...);

From: Tigran Aivazian (tigran@sco.COM)
Date: Thu Jan 13 2000 - 03:34:14 EST


On Wed, 12 Jan 2000, Manfred Spraul wrote:
> request_module_fn() is a great idea, but I would change _that_ function
> call to an empty define if CONFIG_KMOD is not set.

Please show me how to do it without having CONFIG_KMOD in the header that
declares the function. I see no way to do that. And if we do it the usual
way (like it is done now) everything starts depending on CONFIG_KMOD
again - lots of extra compilation cycles... Is it worth it just for the
sake of one (correctly predicted by BTB) branch and a function call? Are
evil NT people out there just waiting to benchmark the sequence:

A: try to open the device failing to autoload a driver because no
           CONFIG_KMOD
      go back to A

and detect a couple of extra cycles my patch introduced in the failing
code path?

>From all the replies I received (both private and public) on this thread
it seems the vast majority approves the approach taken in the latest
version of the patch. But Arjan van de Ven pointed out a potential buffer
overflow in request_module() and suggested a check which I implemented in
the latest version:

  http://www.ocston.org/~tigran/patches/kmod-2.3.40-p1.patch

Regards,
Tigran.

---
  Quaerite prime regnum Dei

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



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:21 EST