* Re: [Regression] depmod fails on kernel 6.17.1 rc1
[not found] <CADiockCvM6v+d+UoFZpJSMoLAdpy99_h-hJdzUsdfaWGn3W7-g@mail.gmail.com>
@ 2025-11-06 16:02 ` Borislav Petkov
2025-11-06 16:15 ` Andy Shevchenko
0 siblings, 1 reply; 14+ messages in thread
From: Borislav Petkov @ 2025-11-06 16:02 UTC (permalink / raw)
To: Alex Davis
Cc: Linux Kernel Mailing List, Greg Kroah-Hartman, Jiri Slaby,
Andy Shevchenko, Ilpo Järvinen, John Ogness, linux-serial
Lemme add a whole bunch of relevant ppl to Cc.
So I'm seeing this with an allmodconfig build too:
depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
depmod: ERROR: Found 2 modules in dependency cycles!
make[6]: *** [scripts/Makefile.modinst:132: depmod] Error 1
make[5]: *** [Makefile:1917: modules_install] Error 2
make[4]: *** [Makefile:2140: run-command] Error 2
make[3]: *** [debian/rules:66: binary-image] Error 2
dpkg-buildpackage: error: make -f debian/rules binary subprocess returned exit status 2
make[2]: *** [scripts/Makefile.package:126: bindeb-pkg] Error 2
make[1]: *** [/home/amd/kernel/linux/Makefile:1643: bindeb-pkg] Error 2
make: *** [Makefile:248: __sub-make] Error 2
That's 6.17.7
On Sun, Oct 05, 2025 at 09:40:28PM -0400, Alex Davis wrote:
> When running make modules_install on linux 6.17. with the attached
> .config, I get the following error:
>
> DEPMOD /lib/modules/6.17.1-rc1
> depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> depmod: ERROR: Cycle detected: serial_mctrl_gpio
> depmod: ERROR: Found 2 modules in dependency cycles!
> make[2]: *** [scripts/Makefile.modinst:132: depmod] Error 1
> make[1]: *** [/spare/linux/linux-6.17/Makefile:1917: modules_install] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
>
>
> This also happens with 6.17; it does not happen with 6.16.x.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-06 16:02 ` [Regression] depmod fails on kernel 6.17.1 rc1 Borislav Petkov
@ 2025-11-06 16:15 ` Andy Shevchenko
2025-11-06 16:24 ` Borislav Petkov
0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2025-11-06 16:15 UTC (permalink / raw)
To: Borislav Petkov
Cc: Alex Davis, Linux Kernel Mailing List, Greg Kroah-Hartman,
Jiri Slaby, Ilpo Järvinen, John Ogness, linux-serial
On Thu, Nov 06, 2025 at 05:02:35PM +0100, Borislav Petkov wrote:
> Lemme add a whole bunch of relevant ppl to Cc.
Thanks!
> So I'm seeing this with an allmodconfig build too:
>
> depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> depmod: ERROR: Found 2 modules in dependency cycles!
I'm surprised it took so long to people to start complaining.
So, some of those are modules? Can you share the
grep 8250 .config
part?
> make[6]: *** [scripts/Makefile.modinst:132: depmod] Error 1
> make[5]: *** [Makefile:1917: modules_install] Error 2
> make[4]: *** [Makefile:2140: run-command] Error 2
> make[3]: *** [debian/rules:66: binary-image] Error 2
> dpkg-buildpackage: error: make -f debian/rules binary subprocess returned exit status 2
> make[2]: *** [scripts/Makefile.package:126: bindeb-pkg] Error 2
> make[1]: *** [/home/amd/kernel/linux/Makefile:1643: bindeb-pkg] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
>
> That's 6.17.7
>
> On Sun, Oct 05, 2025 at 09:40:28PM -0400, Alex Davis wrote:
> > When running make modules_install on linux 6.17. with the attached
> > .config, I get the following error:
> >
> > DEPMOD /lib/modules/6.17.1-rc1
> > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > depmod: ERROR: Cycle detected: serial_mctrl_gpio
> > depmod: ERROR: Found 2 modules in dependency cycles!
> > make[2]: *** [scripts/Makefile.modinst:132: depmod] Error 1
> > make[1]: *** [/spare/linux/linux-6.17/Makefile:1917: modules_install] Error 2
> > make: *** [Makefile:248: __sub-make] Error 2
> >
> > This also happens with 6.17; it does not happen with 6.16.x.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-06 16:15 ` Andy Shevchenko
@ 2025-11-06 16:24 ` Borislav Petkov
2025-11-06 16:35 ` Ilpo Järvinen
0 siblings, 1 reply; 14+ messages in thread
From: Borislav Petkov @ 2025-11-06 16:24 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Alex Davis, Linux Kernel Mailing List, Greg Kroah-Hartman,
Jiri Slaby, Ilpo Järvinen, John Ogness, linux-serial
On Thu, Nov 06, 2025 at 06:15:57PM +0200, Andy Shevchenko wrote:
> > So I'm seeing this with an allmodconfig build too:
^^^^^^^^^^^^
> > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > depmod: ERROR: Found 2 modules in dependency cycles!
>
> I'm surprised it took so long to people to start complaining.
>
> So, some of those are modules? Can you share the
>
> grep 8250 .config
>
> part?
See above.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-06 16:24 ` Borislav Petkov
@ 2025-11-06 16:35 ` Ilpo Järvinen
2025-11-06 18:00 ` Ilpo Järvinen
0 siblings, 1 reply; 14+ messages in thread
From: Ilpo Järvinen @ 2025-11-06 16:35 UTC (permalink / raw)
To: Borislav Petkov
Cc: Andy Shevchenko, Alex Davis, Linux Kernel Mailing List,
Greg Kroah-Hartman, Jiri Slaby, Ilpo Järvinen, John Ogness,
linux-serial
On Thu, 6 Nov 2025, Borislav Petkov wrote:
> On Thu, Nov 06, 2025 at 06:15:57PM +0200, Andy Shevchenko wrote:
> > > So I'm seeing this with an allmodconfig build too:
> ^^^^^^^^^^^^
>
> > > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > > depmod: ERROR: Found 2 modules in dependency cycles!
> >
> > I'm surprised it took so long to people to start complaining.
> >
> > So, some of those are modules? Can you share the
> >
> > grep 8250 .config
> >
> > part?
>
> See above.
https://lore.kernel.org/all/87frc3sd8d.fsf@posteo.net/
I wonder if 8250_rsa.o can be put into 8250_base.o where most of its
callers are anyway?
--
i.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-06 16:35 ` Ilpo Järvinen
@ 2025-11-06 18:00 ` Ilpo Järvinen
2025-11-06 18:14 ` Andy Shevchenko
2025-11-07 6:20 ` Jiri Slaby
0 siblings, 2 replies; 14+ messages in thread
From: Ilpo Järvinen @ 2025-11-06 18:00 UTC (permalink / raw)
To: Alex Davis, Stephen Rothwell
Cc: Borislav Petkov, Andy Shevchenko, Linux Kernel Mailing List,
Greg Kroah-Hartman, Jiri Slaby, John Ogness, linux-serial
[-- Attachment #1: Type: text/plain, Size: 6890 bytes --]
On Thu, 6 Nov 2025, Ilpo Järvinen wrote:
> On Thu, 6 Nov 2025, Borislav Petkov wrote:
>
> > On Thu, Nov 06, 2025 at 06:15:57PM +0200, Andy Shevchenko wrote:
> > > > So I'm seeing this with an allmodconfig build too:
> > ^^^^^^^^^^^^
> > > > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > > > depmod: ERROR: Found 2 modules in dependency cycles!
> > >
> > > I'm surprised it took so long to people to start complaining.
> > >
> > > So, some of those are modules? Can you share the
> > >
> > > grep 8250 .config
> > >
> > > part?
> >
> > See above.
>
> https://lore.kernel.org/all/87frc3sd8d.fsf@posteo.net/
>
> I wonder if 8250_rsa.o can be put into 8250_base.o where most of its
> callers are anyway?
This seems to resolve the build issue for me:
--
From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 1/1] serial: 8250: Fix 8250_rsa symbol loop
make allmodconfig build fails due to dependency loop:
depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
depmod: ERROR: Found 2 modules in dependency cycles!
Break dependency loop by moving 8250_rsa.o into 8250_base and by
passing univ8250_port_base_ops to univ8250_rsa_support() that can make
a local copy of it.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Alex Davis <alex47794@gmail.com>
Fixes: b20d6576cdb3 ("serial: 8250: export RSA functions")
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/tty/serial/8250/8250.h | 2 +-
drivers/tty/serial/8250/8250_platform.c | 2 +-
drivers/tty/serial/8250/8250_rsa.c | 18 +++++++++---------
drivers/tty/serial/8250/Makefile | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index 58e64c4e1e3a..bd294fbf0e65 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -322,7 +322,7 @@ static inline void serial8250_pnp_exit(void) { }
#endif
#ifdef CONFIG_SERIAL_8250_RSA
-void univ8250_rsa_support(struct uart_ops *ops);
+void univ8250_rsa_support(struct uart_ops *ops, const struct uart_ops *core_ops);
void rsa_enable(struct uart_8250_port *up);
void rsa_disable(struct uart_8250_port *up);
void rsa_autoconfig(struct uart_8250_port *up);
diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8250/8250_platform.c
index b27981340e76..fe7ec440ffa5 100644
--- a/drivers/tty/serial/8250/8250_platform.c
+++ b/drivers/tty/serial/8250/8250_platform.c
@@ -75,7 +75,7 @@ static void __init __serial8250_isa_init_ports(void)
/* chain base port ops to support Remote Supervisor Adapter */
univ8250_port_ops = *univ8250_port_base_ops;
- univ8250_rsa_support(&univ8250_port_ops);
+ univ8250_rsa_support(&univ8250_port_ops, univ8250_port_base_ops);
if (share_irqs)
irqflag = IRQF_SHARED;
diff --git a/drivers/tty/serial/8250/8250_rsa.c b/drivers/tty/serial/8250/8250_rsa.c
index 40a3dbd9e452..d76d1be86625 100644
--- a/drivers/tty/serial/8250/8250_rsa.c
+++ b/drivers/tty/serial/8250/8250_rsa.c
@@ -14,6 +14,8 @@
static unsigned long probe_rsa[PORT_RSA_MAX];
static unsigned int probe_rsa_count;
+static const struct uart_ops *core_port_base_ops;
+
static int rsa8250_request_resource(struct uart_8250_port *up)
{
struct uart_port *port = &up->port;
@@ -67,7 +69,7 @@ static void univ8250_config_port(struct uart_port *port, int flags)
}
}
- univ8250_port_base_ops->config_port(port, flags);
+ core_port_base_ops->config_port(port, flags);
if (port->type != PORT_RSA && up->probe & UART_PROBE_RSA)
rsa8250_release_resource(up);
@@ -78,11 +80,11 @@ static int univ8250_request_port(struct uart_port *port)
struct uart_8250_port *up = up_to_u8250p(port);
int ret;
- ret = univ8250_port_base_ops->request_port(port);
+ ret = core_port_base_ops->request_port(port);
if (ret == 0 && port->type == PORT_RSA) {
ret = rsa8250_request_resource(up);
if (ret < 0)
- univ8250_port_base_ops->release_port(port);
+ core_port_base_ops->release_port(port);
}
return ret;
@@ -94,15 +96,17 @@ static void univ8250_release_port(struct uart_port *port)
if (port->type == PORT_RSA)
rsa8250_release_resource(up);
- univ8250_port_base_ops->release_port(port);
+ core_port_base_ops->release_port(port);
}
-void univ8250_rsa_support(struct uart_ops *ops)
+void univ8250_rsa_support(struct uart_ops *ops, const struct uart_ops *core_ops)
{
+ core_port_base_ops = core_ops;
ops->config_port = univ8250_config_port;
ops->request_port = univ8250_request_port;
ops->release_port = univ8250_release_port;
}
+EXPORT_SYMBOL_FOR_MODULES(univ8250_rsa_support, "8250");
module_param_hw_array(probe_rsa, ulong, ioport, &probe_rsa_count, 0444);
MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA");
@@ -146,7 +150,6 @@ void rsa_enable(struct uart_8250_port *up)
if (up->port.uartclk == SERIAL_RSA_BAUD_BASE * 16)
serial_out(up, UART_RSA_FRR, 0);
}
-EXPORT_SYMBOL_FOR_MODULES(rsa_enable, "8250_base");
/*
* Attempts to turn off the RSA FIFO and resets the RSA board back to 115kbps compat mode. It is
@@ -178,7 +181,6 @@ void rsa_disable(struct uart_8250_port *up)
if (result)
up->port.uartclk = SERIAL_RSA_BAUD_BASE_LO * 16;
}
-EXPORT_SYMBOL_FOR_MODULES(rsa_disable, "8250_base");
void rsa_autoconfig(struct uart_8250_port *up)
{
@@ -191,7 +193,6 @@ void rsa_autoconfig(struct uart_8250_port *up)
if (__rsa_enable(up))
up->port.type = PORT_RSA;
}
-EXPORT_SYMBOL_FOR_MODULES(rsa_autoconfig, "8250_base");
void rsa_reset(struct uart_8250_port *up)
{
@@ -200,7 +201,6 @@ void rsa_reset(struct uart_8250_port *up)
serial_out(up, UART_RSA_FRR, 0);
}
-EXPORT_SYMBOL_FOR_MODULES(rsa_reset, "8250_base");
#ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS
#ifndef MODULE
diff --git a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile
index 513a0941c284..9ec4d5fe64de 100644
--- a/drivers/tty/serial/8250/Makefile
+++ b/drivers/tty/serial/8250/Makefile
@@ -7,7 +7,6 @@ obj-$(CONFIG_SERIAL_8250) += 8250.o
8250-y := 8250_core.o
8250-y += 8250_platform.o
8250-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o
-8250-$(CONFIG_SERIAL_8250_RSA) += 8250_rsa.o
obj-$(CONFIG_SERIAL_8250) += 8250_base.o
8250_base-y := 8250_port.o
@@ -15,6 +14,7 @@ obj-$(CONFIG_SERIAL_8250) += 8250_base.o
8250_base-$(CONFIG_SERIAL_8250_DWLIB) += 8250_dwlib.o
8250_base-$(CONFIG_SERIAL_8250_FINTEK) += 8250_fintek.o
8250_base-$(CONFIG_SERIAL_8250_PCILIB) += 8250_pcilib.o
+8250_base-$(CONFIG_SERIAL_8250_RSA) += 8250_rsa.o
obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o
base-commit: 719f3df3e113e03d2c8cf324827da1fd17a9bd8f
--
2.39.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-06 18:00 ` Ilpo Järvinen
@ 2025-11-06 18:14 ` Andy Shevchenko
2025-11-07 8:17 ` Andy Shevchenko
2025-11-07 6:20 ` Jiri Slaby
1 sibling, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2025-11-06 18:14 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Alex Davis, Stephen Rothwell, Borislav Petkov,
Linux Kernel Mailing List, Greg Kroah-Hartman, Jiri Slaby,
John Ogness, linux-serial
On Thu, Nov 06, 2025 at 08:00:36PM +0200, Ilpo Järvinen wrote:
> On Thu, 6 Nov 2025, Ilpo Järvinen wrote:
> > On Thu, 6 Nov 2025, Borislav Petkov wrote:
> > > On Thu, Nov 06, 2025 at 06:15:57PM +0200, Andy Shevchenko wrote:
> > > > > So I'm seeing this with an allmodconfig build too:
> > > ^^^^^^^^^^^^
> > > > > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > > > > depmod: ERROR: Found 2 modules in dependency cycles!
> > > >
> > > > I'm surprised it took so long to people to start complaining.
> > > >
> > > > So, some of those are modules? Can you share the
> > > >
> > > > grep 8250 .config
> > > >
> > > > part?
> > >
> > > See above.
> >
> > https://lore.kernel.org/all/87frc3sd8d.fsf@posteo.net/
> >
> > I wonder if 8250_rsa.o can be put into 8250_base.o where most of its
> > callers are anyway?
>
> This seems to resolve the build issue for me:
I prefer this solution to anything that suggests to merge the 8250_rsa in
another module.
If it fixes for the reporters, feel free to add my
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-06 18:00 ` Ilpo Järvinen
2025-11-06 18:14 ` Andy Shevchenko
@ 2025-11-07 6:20 ` Jiri Slaby
2025-11-08 13:32 ` Borislav Petkov
2025-11-08 23:52 ` Stephen Rothwell
1 sibling, 2 replies; 14+ messages in thread
From: Jiri Slaby @ 2025-11-07 6:20 UTC (permalink / raw)
To: Ilpo Järvinen, Alex Davis, Stephen Rothwell
Cc: Borislav Petkov, Andy Shevchenko, Linux Kernel Mailing List,
Greg Kroah-Hartman, John Ogness, linux-serial
On 06. 11. 25, 19:00, Ilpo Järvinen wrote:
> This seems to resolve the build issue for me:
>
> --
> From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
> Subject: [PATCH 1/1] serial: 8250: Fix 8250_rsa symbol loop
>
> make allmodconfig build fails due to dependency loop:
>
> depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> depmod: ERROR: Found 2 modules in dependency cycles!
>
> Break dependency loop by moving 8250_rsa.o into 8250_base and by
> passing univ8250_port_base_ops to univ8250_rsa_support() that can make
> a local copy of it.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Reported-by: Alex Davis <alex47794@gmail.com>
> Fixes: b20d6576cdb3 ("serial: 8250: export RSA functions")
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
LGTM, thanks for the fix.
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
If the reporters could give it a shot and mark this by Tested-by, it
would be great...
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-06 18:14 ` Andy Shevchenko
@ 2025-11-07 8:17 ` Andy Shevchenko
2025-11-07 9:40 ` Ilpo Järvinen
0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2025-11-07 8:17 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Alex Davis, Stephen Rothwell, Borislav Petkov,
Linux Kernel Mailing List, Greg Kroah-Hartman, Jiri Slaby,
John Ogness, linux-serial
On Thu, Nov 06, 2025 at 08:14:35PM +0200, Andy Shevchenko wrote:
> On Thu, Nov 06, 2025 at 08:00:36PM +0200, Ilpo Järvinen wrote:
> > On Thu, 6 Nov 2025, Ilpo Järvinen wrote:
> > > On Thu, 6 Nov 2025, Borislav Petkov wrote:
> > > > On Thu, Nov 06, 2025 at 06:15:57PM +0200, Andy Shevchenko wrote:
> > > > > > So I'm seeing this with an allmodconfig build too:
> > > > ^^^^^^^^^^^^
> > > > > > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > > > > > depmod: ERROR: Found 2 modules in dependency cycles!
> > > > >
> > > > > I'm surprised it took so long to people to start complaining.
> > > > >
> > > > > So, some of those are modules? Can you share the
> > > > >
> > > > > grep 8250 .config
> > > > >
> > > > > part?
> > > >
> > > > See above.
> > >
> > > https://lore.kernel.org/all/87frc3sd8d.fsf@posteo.net/
> > >
> > > I wonder if 8250_rsa.o can be put into 8250_base.o where most of its
> > > callers are anyway?
> >
> > This seems to resolve the build issue for me:
>
> I prefer this solution to anything that suggests to merge the 8250_rsa in
> another module.
Oh, I meant "merge the source of the 8250_rsa", and here we are talking about
merging the object file, which is totally fine! Sorry for the confusion it
might made.
> If it fixes for the reporters, feel free to add my
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-07 8:17 ` Andy Shevchenko
@ 2025-11-07 9:40 ` Ilpo Järvinen
0 siblings, 0 replies; 14+ messages in thread
From: Ilpo Järvinen @ 2025-11-07 9:40 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Alex Davis, Stephen Rothwell, Borislav Petkov,
Linux Kernel Mailing List, Greg Kroah-Hartman, Jiri Slaby,
John Ogness, linux-serial
[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]
On Fri, 7 Nov 2025, Andy Shevchenko wrote:
> On Thu, Nov 06, 2025 at 08:14:35PM +0200, Andy Shevchenko wrote:
> > On Thu, Nov 06, 2025 at 08:00:36PM +0200, Ilpo Järvinen wrote:
> > > On Thu, 6 Nov 2025, Ilpo Järvinen wrote:
> > > > On Thu, 6 Nov 2025, Borislav Petkov wrote:
> > > > > On Thu, Nov 06, 2025 at 06:15:57PM +0200, Andy Shevchenko wrote:
> > > > > > > So I'm seeing this with an allmodconfig build too:
> > > > > ^^^^^^^^^^^^
> > > > > > > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > > > > > > depmod: ERROR: Found 2 modules in dependency cycles!
> > > > > >
> > > > > > I'm surprised it took so long to people to start complaining.
> > > > > >
> > > > > > So, some of those are modules? Can you share the
> > > > > >
> > > > > > grep 8250 .config
> > > > > >
> > > > > > part?
> > > > >
> > > > > See above.
> > > >
> > > > https://lore.kernel.org/all/87frc3sd8d.fsf@posteo.net/
> > > >
> > > > I wonder if 8250_rsa.o can be put into 8250_base.o where most of its
> > > > callers are anyway?
> > >
> > > This seems to resolve the build issue for me:
> >
> > I prefer this solution to anything that suggests to merge the 8250_rsa in
> > another module.
>
> Oh, I meant "merge the source of the 8250_rsa", and here we are talking about
> merging the object file, which is totally fine! Sorry for the confusion it
> might made.
The suggestion in that link was to merge the modules (8250.ko with
8250_base.ko) and that certainly isn't a great idea.
My patch only moves 8250_rsa.o from 8250.ko to 8250_base.ko and breaks
the symbol loop by passing what is needed from 8250.ko in function
arguments instead of directly referencing them in 8250_rsa.o.
> > If it fixes for the reporters, feel free to add my
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
>
--
i.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-07 6:20 ` Jiri Slaby
@ 2025-11-08 13:32 ` Borislav Petkov
2025-11-08 23:52 ` Stephen Rothwell
1 sibling, 0 replies; 14+ messages in thread
From: Borislav Petkov @ 2025-11-08 13:32 UTC (permalink / raw)
To: Jiri Slaby
Cc: Ilpo Järvinen, Alex Davis, Stephen Rothwell, Andy Shevchenko,
Linux Kernel Mailing List, Greg Kroah-Hartman, John Ogness,
linux-serial
On Fri, Nov 07, 2025 at 07:20:26AM +0100, Jiri Slaby wrote:
> If the reporters could give it a shot and mark this by Tested-by, it would
> be great...
I'd love to but I can't reproduce it again, for the life of me!
I've rebuilt a bunch of kernels on the same machine but nada. It simply won't
trigger again.
Damn.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-07 6:20 ` Jiri Slaby
2025-11-08 13:32 ` Borislav Petkov
@ 2025-11-08 23:52 ` Stephen Rothwell
2025-11-09 0:49 ` Greg Kroah-Hartman
1 sibling, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2025-11-08 23:52 UTC (permalink / raw)
To: Jiri Slaby
Cc: Ilpo Järvinen, Alex Davis, Stephen Rothwell, Borislav Petkov,
Andy Shevchenko, Linux Kernel Mailing List, Greg Kroah-Hartman,
John Ogness, linux-serial
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
Hi Jiri,
On Fri, 7 Nov 2025 07:20:26 +0100 Jiri Slaby <jirislaby@kernel.org> wrote:
>
> On 06. 11. 25, 19:00, Ilpo Järvinen wrote:
> > This seems to resolve the build issue for me:
> >
> > --
> > From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
> > Subject: [PATCH 1/1] serial: 8250: Fix 8250_rsa symbol loop
> >
> > make allmodconfig build fails due to dependency loop:
> >
> > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > depmod: ERROR: Found 2 modules in dependency cycles!
> >
> > Break dependency loop by moving 8250_rsa.o into 8250_base and by
> > passing univ8250_port_base_ops to univ8250_rsa_support() that can make
> > a local copy of it.
> >
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Reported-by: Alex Davis <alex47794@gmail.com>
> > Fixes: b20d6576cdb3 ("serial: 8250: export RSA functions")
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>
> LGTM, thanks for the fix.
>
> Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
>
> If the reporters could give it a shot and mark this by Tested-by, it would be great...
I have not seen this for quite some time ... I assumed it had been
fixed.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-08 23:52 ` Stephen Rothwell
@ 2025-11-09 0:49 ` Greg Kroah-Hartman
2025-11-09 6:34 ` Stephen Rothwell
0 siblings, 1 reply; 14+ messages in thread
From: Greg Kroah-Hartman @ 2025-11-09 0:49 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Jiri Slaby, Ilpo Järvinen, Alex Davis, Stephen Rothwell,
Borislav Petkov, Andy Shevchenko, Linux Kernel Mailing List,
John Ogness, linux-serial
On Sun, Nov 09, 2025 at 10:52:03AM +1100, Stephen Rothwell wrote:
> Hi Jiri,
>
> On Fri, 7 Nov 2025 07:20:26 +0100 Jiri Slaby <jirislaby@kernel.org> wrote:
> >
> > On 06. 11. 25, 19:00, Ilpo Järvinen wrote:
> > > This seems to resolve the build issue for me:
> > >
> > > --
> > > From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
> > > Subject: [PATCH 1/1] serial: 8250: Fix 8250_rsa symbol loop
> > >
> > > make allmodconfig build fails due to dependency loop:
> > >
> > > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > > depmod: ERROR: Found 2 modules in dependency cycles!
> > >
> > > Break dependency loop by moving 8250_rsa.o into 8250_base and by
> > > passing univ8250_port_base_ops to univ8250_rsa_support() that can make
> > > a local copy of it.
> > >
> > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Reported-by: Alex Davis <alex47794@gmail.com>
> > > Fixes: b20d6576cdb3 ("serial: 8250: export RSA functions")
> > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> >
> > LGTM, thanks for the fix.
> >
> > Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> >
> > If the reporters could give it a shot and mark this by Tested-by, it would be great...
>
> I have not seen this for quite some time ... I assumed it had been
> fixed.
I too thought this was fixed a while ago, what changed to cause this to
happen now? Anyone have a .config to reproduce this, 'allmodconfig' on
x86 works for me.
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-09 0:49 ` Greg Kroah-Hartman
@ 2025-11-09 6:34 ` Stephen Rothwell
2025-11-10 10:43 ` Ilpo Järvinen
0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2025-11-09 6:34 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Jiri Slaby, Ilpo Järvinen, Alex Davis, Stephen Rothwell,
Borislav Petkov, Andy Shevchenko, Linux Kernel Mailing List,
John Ogness, linux-serial
[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]
Hi Greg,
On Sun, 9 Nov 2025 09:49:29 +0900 Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>
> On Sun, Nov 09, 2025 at 10:52:03AM +1100, Stephen Rothwell wrote:
> >
> > On Fri, 7 Nov 2025 07:20:26 +0100 Jiri Slaby <jirislaby@kernel.org> wrote:
> > >
> > > On 06. 11. 25, 19:00, Ilpo Järvinen wrote:
> > > > This seems to resolve the build issue for me:
> > > >
> > > > --
> > > > From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
> > > > Subject: [PATCH 1/1] serial: 8250: Fix 8250_rsa symbol loop
> > > >
> > > > make allmodconfig build fails due to dependency loop:
> > > >
> > > > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > > > depmod: ERROR: Found 2 modules in dependency cycles!
> > > >
> > > > Break dependency loop by moving 8250_rsa.o into 8250_base and by
> > > > passing univ8250_port_base_ops to univ8250_rsa_support() that can make
> > > > a local copy of it.
> > > >
> > > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > Reported-by: Alex Davis <alex47794@gmail.com>
> > > > Fixes: b20d6576cdb3 ("serial: 8250: export RSA functions")
> > > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> > >
> > > LGTM, thanks for the fix.
> > >
> > > Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> > >
> > > If the reporters could give it a shot and mark this by Tested-by, it would be great...
> >
> > I have not seen this for quite some time ... I assumed it had been
> > fixed.
>
> I too thought this was fixed a while ago, what changed to cause this to
> happen now? Anyone have a .config to reproduce this, 'allmodconfig' on
> x86 works for me.
Actually, I think the current report is for v6.17.1-rc1, so maybe
something got missed in a stable backport? My original report was for
next-20250728 (July 28). The only response I got was on October 1,
but I am pretty sure it was fixed well before then.
Also, you probably only get the error when you do a "make
modules_install" after the allmodconfig build (at least that is where I
got it).
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Regression] depmod fails on kernel 6.17.1 rc1
2025-11-09 6:34 ` Stephen Rothwell
@ 2025-11-10 10:43 ` Ilpo Järvinen
0 siblings, 0 replies; 14+ messages in thread
From: Ilpo Järvinen @ 2025-11-10 10:43 UTC (permalink / raw)
To: Stephen Rothwell, Greg Kroah-Hartman
Cc: Jiri Slaby, Alex Davis, Borislav Petkov, Andy Shevchenko,
Linux Kernel Mailing List, John Ogness, linux-serial
[-- Attachment #1: Type: text/plain, Size: 5044 bytes --]
On Sun, 9 Nov 2025, Stephen Rothwell wrote:
> On Sun, 9 Nov 2025 09:49:29 +0900 Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > On Sun, Nov 09, 2025 at 10:52:03AM +1100, Stephen Rothwell wrote:
> > > On Fri, 7 Nov 2025 07:20:26 +0100 Jiri Slaby <jirislaby@kernel.org> wrote:
> > > >
> > > > On 06. 11. 25, 19:00, Ilpo Järvinen wrote:
> > > > > This seems to resolve the build issue for me:
> > > > >
> > > > > --
> > > > > From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>
> > > > > Subject: [PATCH 1/1] serial: 8250: Fix 8250_rsa symbol loop
> > > > >
> > > > > make allmodconfig build fails due to dependency loop:
> > > > >
> > > > > depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
> > > > > depmod: ERROR: Found 2 modules in dependency cycles!
> > > > >
> > > > > Break dependency loop by moving 8250_rsa.o into 8250_base and by
> > > > > passing univ8250_port_base_ops to univ8250_rsa_support() that can make
> > > > > a local copy of it.
> > > > >
> > > > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > > Reported-by: Alex Davis <alex47794@gmail.com>
> > > > > Fixes: b20d6576cdb3 ("serial: 8250: export RSA functions")
> > > > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> > > >
> > > > LGTM, thanks for the fix.
> > > >
> > > > Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> > > >
> > > > If the reporters could give it a shot and mark this by Tested-by, it would be great...
> > >
> > > I have not seen this for quite some time ... I assumed it had been
> > > fixed.
> >
> > I too thought this was fixed a while ago, what changed to cause this to
> > happen now? Anyone have a .config to reproduce this, 'allmodconfig' on
> > x86 works for me.
>
> Actually, I think the current report is for v6.17.1-rc1, so maybe
> something got missed in a stable backport? My original report was for
> next-20250728 (July 28). The only response I got was on October 1,
> but I am pretty sure it was fixed well before then.
>
> Also, you probably only get the error when you do a "make
> modules_install" after the allmodconfig build (at least that is where I
> got it).
Hi all,
I don't want to waste my time building allmodconfig but this is with
allnoconfig + a few key CONFIGs set and without my patch:
$ git log -n1
commit e9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c (grafted, HEAD -> master,
tag: v6.18-rc5, origin/master, origin/HEAD)
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Nov 9 15:10:19 2025 -0800
Linux 6.18-rc5
$ make allnoconfig
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
$ echo -e "CONFIG_MODULES=y\nCONFIG_SERIAL_8250=m\nCONFIG_SERIAL_8250_EXTENDED=y\nCONFIG_SERIAL_8250_RSA=y" >> .config
$ make olddefconfig
.config:1528:warning: override: reassigning to symbol MODULES
.config:1529:warning: override: reassigning to symbol SERIAL_8250
.config:1530:warning: override: reassigning to symbol SERIAL_8250_EXTENDED
#
# configuration written to .config
#
$ make -j4 > /dev/null && sudo make modules_install
INSTALL /lib/modules/6.18.0-rc5/modules.order
INSTALL /lib/modules/6.18.0-rc5/modules.builtin
INSTALL /lib/modules/6.18.0-rc5/modules.builtin.modinfo
SYMLINK /lib/modules/6.18.0-rc5/build
INSTALL /lib/modules/6.18.0-rc5/kernel/drivers/tty/serial/8250/8250.ko
INSTALL /lib/modules/6.18.0-rc5/kernel/drivers/tty/serial/8250/8250_base.ko
INSTALL /lib/modules/6.18.0-rc5/kernel/drivers/tty/serial/serial_base.ko
DEPMOD /lib/modules/6.18.0-rc5
depmod: ERROR: Cycle detected: 8250 -> 8250_base -> 8250
depmod: ERROR: Found 2 modules in dependency cycles!
make[2]: *** [scripts/Makefile.modinst:132: depmod] Error 1
make[1]: *** [/home/user/linux/Makefile:1916: modules_install] Error 2
make: *** [Makefile:248: __sub-make] Error 2
...so no, it does not look fixed.
With the patch:
$ git am 0001-serial-8250-Fix-8250_rsa-symbol-loop.patch
Applying: serial: 8250: Fix 8250_rsa symbol loop
user@disp1097:~/linux$ make -j4 > /dev/null && sudo make modules_install
SYMLINK /lib/modules/6.18.0-rc5+/build
INSTALL /lib/modules/6.18.0-rc5+/modules.order
INSTALL /lib/modules/6.18.0-rc5+/modules.builtin
INSTALL /lib/modules/6.18.0-rc5+/modules.builtin.modinfo
INSTALL /lib/modules/6.18.0-rc5+/kernel/drivers/tty/serial/8250/8250.ko
INSTALL /lib/modules/6.18.0-rc5+/kernel/drivers/tty/serial/8250/8250_base.ko
INSTALL /lib/modules/6.18.0-rc5+/kernel/drivers/tty/serial/serial_base.ko
DEPMOD /lib/modules/6.18.0-rc5+
$
I'll just make the official submission with the #else block's prototype
fixed (thanks to lkp).
--
i.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-11-10 10:43 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CADiockCvM6v+d+UoFZpJSMoLAdpy99_h-hJdzUsdfaWGn3W7-g@mail.gmail.com>
2025-11-06 16:02 ` [Regression] depmod fails on kernel 6.17.1 rc1 Borislav Petkov
2025-11-06 16:15 ` Andy Shevchenko
2025-11-06 16:24 ` Borislav Petkov
2025-11-06 16:35 ` Ilpo Järvinen
2025-11-06 18:00 ` Ilpo Järvinen
2025-11-06 18:14 ` Andy Shevchenko
2025-11-07 8:17 ` Andy Shevchenko
2025-11-07 9:40 ` Ilpo Järvinen
2025-11-07 6:20 ` Jiri Slaby
2025-11-08 13:32 ` Borislav Petkov
2025-11-08 23:52 ` Stephen Rothwell
2025-11-09 0:49 ` Greg Kroah-Hartman
2025-11-09 6:34 ` Stephen Rothwell
2025-11-10 10:43 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox