Re: Build options for kernel modules

2003-03-21 Thread The Anarcat
On Fri Mar 21, 2003 at 07:47:42PM +0300, Yar Tikhiy wrote:
> On Fri, Mar 21, 2003 at 11:25:01AM -0500, The Anarcat wrote:
> > On Fri Mar 21, 2003 at 07:16:58PM +0300, Yar Tikhiy wrote:
> > > 
> > > Yeah, it's all right to compile modules w/o the kernel, but that's
> > > not exactly what I was asking about.  My question was whether "option
> > > FOO" lines from a kernel configuration file could influence modules.
> > 
> > I'm pretty sure they do. A great example is IPFIREWALL_* options: if
> > they don't influence the module, I think we have a problem. ;)
> 
> My testing a yesterday's CURRENT has shown we did have the problem.
> Everobody is invited to set "options IPFIREWALL_DEFAULT_TO_ACCEPT"
> and to load the resulting ipfw.ko on a remote machine without human
> access ;-))) [small print: it's a joke, don't actually do that.]

Woops.

-- 
Nothing incites to money-crimes like great poverty or great wealth.
- Mark Twain


pgp0.pgp
Description: PGP signature


Re: Build options for kernel modules

2003-03-21 Thread Yar Tikhiy
On Fri, Mar 21, 2003 at 11:25:01AM -0500, The Anarcat wrote:
> On Fri Mar 21, 2003 at 07:16:58PM +0300, Yar Tikhiy wrote:
> > 
> > Yeah, it's all right to compile modules w/o the kernel, but that's
> > not exactly what I was asking about.  My question was whether "option
> > FOO" lines from a kernel configuration file could influence modules.
> 
> I'm pretty sure they do. A great example is IPFIREWALL_* options: if
> they don't influence the module, I think we have a problem. ;)

My testing a yesterday's CURRENT has shown we did have the problem.
Everobody is invited to set "options IPFIREWALL_DEFAULT_TO_ACCEPT"
and to load the resulting ipfw.ko on a remote machine without human
access ;-))) [small print: it's a joke, don't actually do that.]

-- 
Yar

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message


Re: Build options for kernel modules

2003-03-21 Thread Harti Brandt
On Fri, 21 Mar 2003, The Anarcat wrote:

TA>On Fri Mar 21, 2003 at 07:16:58PM +0300, Yar Tikhiy wrote:
TA>> On Fri, Mar 21, 2003 at 05:39:07PM +0200, Nikolay Y. Orlyuk wrote:
TA>> > On Fri, Mar 21, 2003 at 06:32:17PM +0300, Yar Tikhiy wrote:
TA>> > > Hi there,
TA>> > >
TA>> > > Excuse my stupid question, but I seem to have no time to do the
TA>> > > investigation by myself right now so I'd be glad to receive a brief
TA>> > > answer from someone who has the information.
TA>> > >
TA>> > > As far as I can see, kernel modules should be built along with the
TA>> > > kernel for the only reason of keeping their mutual interfaces in
TA>> > > sync, has a source file defining such an interface changed.  Is
TA>> > > there currently no way to go further and affect a kernel module's
TA>> > > built-in features with kernel config file options, besides modifying
TA>> > > makefiles in /sys/modules?
TA>> > I think this isn't so. I have been already tried to compile some modules
TA>> > without compiling kernel and this trye has successful result, but without
TA>> > change options.
TA>> > I think modules must be build with same or less imports and same or more export 
to be correct
TA>> > for loading.
TA>>
TA>> Yeah, it's all right to compile modules w/o the kernel, but that's
TA>> not exactly what I was asking about.  My question was whether "option
TA>> FOO" lines from a kernel configuration file could influence modules.
TA>
TA>I'm pretty sure they do. A great example is IPFIREWALL_* options: if
TA>they don't influence the module, I think we have a problem. ;)

How should they? The Makefiles for modules usually create the option files
that normally are create by config options themself and set the options to
1.

harti
-- 
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
[EMAIL PROTECTED], [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message


Re: Build options for kernel modules

2003-03-21 Thread Yar Tikhiy
On Fri, Mar 21, 2003 at 05:35:22PM +0200, Ruslan Ermilov wrote:
> On Fri, Mar 21, 2003 at 06:32:17PM +0300, Yar Tikhiy wrote:
> > Hi there,
> > 
> > Excuse my stupid question, but I seem to have no time to do the
> > investigation by myself right now so I'd be glad to receive a brief
> > answer from someone who has the information.
> > 
> > As far as I can see, kernel modules should be built along with the
> > kernel for the only reason of keeping their mutual interfaces in
> > sync, has a source file defining such an interface changed.  Is
> > there currently no way to go further and affect a kernel module's
> > built-in features with kernel config file options, besides modifying
> > makefiles in /sys/modules?
> > 
> There is.  It's called ``makeoptions''.  It's passed to both
> kernel and modules builds.

I beg your pardon, but "makeoptions" is just next to editing makefiles
in /sys/modules.
My dream was that specifying, e.g., "options IPFIREWALL_VERBOSE"
would result in building ipfw.ko inherently chatty :-)

BTW, Ruslan, let me ask you another question, as you've been recently
working at kern.mk files.  Is it on purpose that the target
"kernel-cleandir" doesn't invoke "kernel-cleandepend"?
I've been sure that by common practice "cleandir" should remove
dependency files...

-- 
Yar

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message


Re: Build options for kernel modules

2003-03-21 Thread The Anarcat
On Fri Mar 21, 2003 at 07:16:58PM +0300, Yar Tikhiy wrote:
> On Fri, Mar 21, 2003 at 05:39:07PM +0200, Nikolay Y. Orlyuk wrote:
> > On Fri, Mar 21, 2003 at 06:32:17PM +0300, Yar Tikhiy wrote:
> > > Hi there,
> > > 
> > > Excuse my stupid question, but I seem to have no time to do the
> > > investigation by myself right now so I'd be glad to receive a brief
> > > answer from someone who has the information.
> > > 
> > > As far as I can see, kernel modules should be built along with the
> > > kernel for the only reason of keeping their mutual interfaces in
> > > sync, has a source file defining such an interface changed.  Is
> > > there currently no way to go further and affect a kernel module's
> > > built-in features with kernel config file options, besides modifying
> > > makefiles in /sys/modules?
> > I think this isn't so. I have been already tried to compile some modules
> > without compiling kernel and this trye has successful result, but without
> > change options.
> > I think modules must be build with same or less imports and same or more export to 
> > be correct
> > for loading.
> 
> Yeah, it's all right to compile modules w/o the kernel, but that's
> not exactly what I was asking about.  My question was whether "option
> FOO" lines from a kernel configuration file could influence modules.

I'm pretty sure they do. A great example is IPFIREWALL_* options: if
they don't influence the module, I think we have a problem. ;)

A.
-- 
Advertisers, not governments, are the primary censors of media content 
in the United States today.
- C. Edwin Baker
http://www.ad-mad.co.uk/quotes/freespeech.htm


pgp0.pgp
Description: PGP signature


Re: Build options for kernel modules

2003-03-21 Thread Yar Tikhiy
On Fri, Mar 21, 2003 at 05:39:07PM +0200, Nikolay Y. Orlyuk wrote:
> On Fri, Mar 21, 2003 at 06:32:17PM +0300, Yar Tikhiy wrote:
> > Hi there,
> > 
> > Excuse my stupid question, but I seem to have no time to do the
> > investigation by myself right now so I'd be glad to receive a brief
> > answer from someone who has the information.
> > 
> > As far as I can see, kernel modules should be built along with the
> > kernel for the only reason of keeping their mutual interfaces in
> > sync, has a source file defining such an interface changed.  Is
> > there currently no way to go further and affect a kernel module's
> > built-in features with kernel config file options, besides modifying
> > makefiles in /sys/modules?
> I think this isn't so. I have been already tried to compile some modules
> without compiling kernel and this trye has successful result, but without
> change options.
> I think modules must be build with same or less imports and same or more export to 
> be correct
> for loading.

Yeah, it's all right to compile modules w/o the kernel, but that's
not exactly what I was asking about.  My question was whether "option
FOO" lines from a kernel configuration file could influence modules.

-- 
Yar

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message


Re: Build options for kernel modules

2003-03-21 Thread Nikolay Y. Orlyuk
On Fri, Mar 21, 2003 at 06:32:17PM +0300, Yar Tikhiy wrote:
> Hi there,
> 
> Excuse my stupid question, but I seem to have no time to do the
> investigation by myself right now so I'd be glad to receive a brief
> answer from someone who has the information.
> 
> As far as I can see, kernel modules should be built along with the
> kernel for the only reason of keeping their mutual interfaces in
> sync, has a source file defining such an interface changed.  Is
> there currently no way to go further and affect a kernel module's
> built-in features with kernel config file options, besides modifying
> makefiles in /sys/modules?
I think this isn't so. I have been already tried to compile some modules
without compiling kernel and this trye has successful result, but without
change options.
I think modules must be build with same or less imports and same or more export to be 
correct
for loading.
> 
 

-- 
With best wishes Nikolay
mail: [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message


Re: Build options for kernel modules

2003-03-21 Thread Ruslan Ermilov
On Fri, Mar 21, 2003 at 06:32:17PM +0300, Yar Tikhiy wrote:
> Hi there,
> 
> Excuse my stupid question, but I seem to have no time to do the
> investigation by myself right now so I'd be glad to receive a brief
> answer from someone who has the information.
> 
> As far as I can see, kernel modules should be built along with the
> kernel for the only reason of keeping their mutual interfaces in
> sync, has a source file defining such an interface changed.  Is
> there currently no way to go further and affect a kernel module's
> built-in features with kernel config file options, besides modifying
> makefiles in /sys/modules?
> 
There is.  It's called ``makeoptions''.  It's passed to both
kernel and modules builds.


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]   FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age


pgp0.pgp
Description: PGP signature


Build options for kernel modules

2003-03-21 Thread Yar Tikhiy
Hi there,

Excuse my stupid question, but I seem to have no time to do the
investigation by myself right now so I'd be glad to receive a brief
answer from someone who has the information.

As far as I can see, kernel modules should be built along with the
kernel for the only reason of keeping their mutual interfaces in
sync, has a source file defining such an interface changed.  Is
there currently no way to go further and affect a kernel module's
built-in features with kernel config file options, besides modifying
makefiles in /sys/modules?

-- 
Yar

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message