2003-05-19 18:09:43

by Adam J. Richter

[permalink] [raw]
Subject: 2.5.69-bk1[23] kconfig loop

If I run "make oldconfig" under linux-2.5.69-bk12
and select "m" for CONFIG_USB_GADGET, I am asked a question
or two about USB gadget interfaces that I might want, and
then the build process gets into an infinite loop. If I set
CONFIG_USB_GADGET to "n", then everything is fine.

I expect there is no input that is supposed to cause
"make oldconfig" to go into an infinite loop, so this must at
least be a kconfig bug. Here is a transcript of the interation
that leads to the infinite loop:


Support for USB Gadgets (USB_GADGET) [N/m/y/?] (NEW) m
USB Peripheral Controller Support
NetChip 2280 USB Peripheral Controller (USB_NET2280) [N/m/?] (NEW) m
USB Gadget Drivers
Gadget Zero (DEVELOPMENT) (USB_ZERO) [N/m/?] (NEW) m
Ethernet Gadget (USB_ETH) [N/m/?] (NEW) m
[Infinite loop starts here. The following lines repeat forever,
non-interactively. They just go scrolling by.]
*
* Restart config...
*
*
* Support for USB Gadgets
*
Support for USB Gadgets (USB_GADGET) [M/n/y/?] m
USB Peripheral Controller Support
NetChip 2280 USB Peripheral Controller (USB_NET2280) [M/n/?] m
USB Gadget Drivers
Gadget Zero (DEVELOPMENT) (USB_ZERO) [M/n/?] m
make: *** [oldconfig] Interrupt


Adam J. Richter __ ______________ 575 Oroville Road
[email protected] \ / Miplitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."


2003-05-19 18:32:58

by dth

[permalink] [raw]
Subject: Re: 2.5.69-bk1[23] kconfig loop

Adam J. Richter <[email protected]> wrote:
>If I run "make oldconfig" under linux-2.5.69-bk12
>and select "m" for CONFIG_USB_GADGET, I am asked a question
>or two about USB gadget interfaces that I might want, and
>then the build process gets into an infinite loop. If I set
>CONFIG_USB_GADGET to "n", then everything is fine.

Same for -mm6 & -mm7 ;-)

Danny

--
Miguel | "I can't tell if I have worked all my life or if
de Icaza | I have never worked a single day of my life,"

2003-05-19 18:45:55

by Eli Carter

[permalink] [raw]
Subject: Re: 2.5.69-bk1[23] kconfig loop

Adam J. Richter wrote:
> If I run "make oldconfig" under linux-2.5.69-bk12
> and select "m" for CONFIG_USB_GADGET, I am asked a question
> or two about USB gadget interfaces that I might want, and
> then the build process gets into an infinite loop. If I set
> CONFIG_USB_GADGET to "n", then everything is fine.
>
> I expect there is no input that is supposed to cause
> "make oldconfig" to go into an infinite loop, so this must at
> least be a kconfig bug. Here is a transcript of the interation
> that leads to the infinite loop:
>
>
> Support for USB Gadgets (USB_GADGET) [N/m/y/?] (NEW) m
> USB Peripheral Controller Support
> NetChip 2280 USB Peripheral Controller (USB_NET2280) [N/m/?] (NEW) m
> USB Gadget Drivers
> Gadget Zero (DEVELOPMENT) (USB_ZERO) [N/m/?] (NEW) m
> Ethernet Gadget (USB_ETH) [N/m/?] (NEW) m
> [Infinite loop starts here. The following lines repeat forever,
> non-interactively. They just go scrolling by.]
> *
> * Restart config...
> *
> *
> * Support for USB Gadgets
> *
> Support for USB Gadgets (USB_GADGET) [M/n/y/?] m
> USB Peripheral Controller Support
> NetChip 2280 USB Peripheral Controller (USB_NET2280) [M/n/?] m
> USB Gadget Drivers
> Gadget Zero (DEVELOPMENT) (USB_ZERO) [M/n/?] m
> make: *** [oldconfig] Interrupt

I've seen this happen when no options within a 'choice' construct are
active. (i.e., they all depend on something that isn't true.)

HTH,

Eli
--------------------. "If it ain't broke now,
Eli Carter \ it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------

2003-05-19 21:02:24

by Roman Zippel

[permalink] [raw]
Subject: Re: 2.5.69-bk1[23] kconfig loop

Hi,

On Mon, 19 May 2003, Adam J. Richter wrote:

> I expect there is no input that is supposed to cause
> "make oldconfig" to go into an infinite loop, so this must at
> least be a kconfig bug.

Yes, it is, conf should not restart the configuration if the symbol isn't
changeable. The patch below fixes this and also fixes another possible
problem with menuconfig.

bye, Roman

--- linux-2.5.69-bk13/scripts/kconfig/conf.c 16 Dec 2002 19:40:13 -0000
+++ linux-2.5.69-bk13/scripts/kconfig/conf.c 19 May 2003 20:36:28 -0000
@@ -456,29 +456,17 @@ static void check_conf(struct menu *menu
return;

sym = menu->sym;
- if (!sym)
- goto conf_childs;
-
- if (sym_is_choice(sym)) {
- if (!sym_has_value(sym)) {
+ if (sym) {
+ if (sym_is_changable(sym) && !sym_has_value(sym)) {
if (!conf_cnt++)
printf("*\n* Restart config...\n*\n");
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}
- if (sym_get_tristate_value(sym) != mod)
+ if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
return;
- goto conf_childs;
- }
-
- if (!sym_has_value(sym)) {
- if (!conf_cnt++)
- printf("*\n* Restart config...\n*\n");
- rootEntry = menu_get_parent_menu(menu);
- conf(rootEntry);
}

-conf_childs:
for (child = menu->list; child; child = child->next)
check_conf(child);
}
--- linux-2.5.69-bk13/scripts/kconfig/menu.c 17 Mar 2003 23:01:29 -0000
+++ linux-2.5.69-bk13/scripts/kconfig/menu.c 18 May 2003 22:27:39 -0000
@@ -283,8 +283,7 @@ struct menu *menu_get_parent_menu(struct
{
enum prop_type type;

- while (menu != &rootmenu) {
- menu = menu->parent;
+ for (; menu != &rootmenu; menu = menu->parent) {
type = menu->prompt ? menu->prompt->type : 0;
if (type == P_MENU || type == P_ROOTMENU)
break;


2003-05-20 02:27:56

by Gerald Stuhrberg

[permalink] [raw]
Subject: DHCP

I was just wondering if anyone had plans to implement a DHCP client in
the kernel.Something that would listen for an ip that could be loaded as
a module. --Just an idea-- Im not an experienced C programmer but would
like to mess with this idea. If anyone has any ideas for more info
please email them to me.

Thanks
-Gerald Stuhrberg-


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2003-05-20 02:35:57

by Gerald Stuhrberg

[permalink] [raw]
Subject: DHCP

I was just wondering if anyone had plans to implement a DHCP client in
the kernel.Something that would listen for an ip that could be loaded as
a module. --Just an idea-- Im not an experienced C programmer but would
like to mess with this idea. If anyone has any ideas for more info
please email them to me.

Thanks
-Gerald Stuhrberg-


2003-05-20 02:41:36

by William Lee Irwin III

[permalink] [raw]
Subject: Re: DHCP

On Mon, May 19, 2003 at 10:46:07PM -0400, Gerald Stuhrberg wrote:
> I was just wondering if anyone had plans to implement a DHCP client in
> the kernel.Something that would listen for an ip that could be loaded as
> a module. --Just an idea-- Im not an experienced C programmer but would
> like to mess with this idea. If anyone has any ideas for more info
> please email them to me.

This is what early userspace is supposed to be for. IIRC there is a
stripped down dhcp client for booting off an nfsroot already there.


-- wli

2003-05-20 16:35:58

by Bryan O'Sullivan

[permalink] [raw]
Subject: Re: DHCP

On Mon, 2003-05-19 at 19:46, Gerald Stuhrberg wrote:
> I was just wondering if anyone had plans to implement a DHCP client in
> the kernel.

There's already one there. The plan is to rip it out.

<b

2003-05-20 17:04:16

by Richard B. Johnson

[permalink] [raw]
Subject: Re: DHCP

On Tue, 20 May 2003, Bryan O'Sullivan wrote:

> On Mon, 2003-05-19 at 19:46, Gerald Stuhrberg wrote:
> > I was just wondering if anyone had plans to implement a DHCP client in
> > the kernel.
>
> There's already one there. The plan is to rip it out.
>
> <b

Isn't it that there are 'helper' functions in the kernel that are
not needed and a user-space DHCP server already works and is
available? Read LinuxPlanet(tm). There may be a DHCP server
in many/most distributions.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.

2003-05-20 18:27:02

by Bryan O'Sullivan

[permalink] [raw]
Subject: Re: DHCP

On Tue, 2003-05-20 at 10:19, Richard B. Johnson wrote:

> Isn't it that there are 'helper' functions in the kernel that are
> not needed and a user-space DHCP server already works and is
> available?

The original question was about an in-kernel DHCP client, which exists
in the form of net/ipv4/ipconfig.c. The vague plan of record is to
remove it from the kernel some time early in the 2.6 era, and replace it
with a userspace ipconfig implementation that runs in initramfs.

Note the complete lack of mention of DHCP servers.

<b

2003-05-21 16:31:09

by Adam J. Richter

[permalink] [raw]
Subject: Re: 2.5.69-bk1[23] kconfig loop

On Mon, 19 May 2003, Roman Zippel wrote:
>On Mon, 19 May 2003, Adam J. Richter wrote:

>> I expect there is no input that is supposed to cause
>> "make oldconfig" to go into an infinite loop, so this must at
>> least be a kconfig bug.

>Yes, it is, conf should not restart the configuration if the symbol isn't
>changeable. The patch below fixes this and also fixes another possible
>problem with menuconfig.
[...]

Your patch fixed my problem. Thanks! I hope you will
send it or someting similar on its way to Linus. If there is any
further testing you want me to do, please let me know.

Adam J. Richter __ ______________ 575 Oroville Road
[email protected] \ / Miplitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."