Linux s390 Architecture development
 help / color / mirror / Atom feed
* [RFC PATCH] net/iucv: Descend into net/iucv when AFIUCV is enabled
@ 2026-06-25  6:13 Pengpeng Hou
  2026-06-26  6:13 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pengpeng Hou @ 2026-06-25  6:13 UTC (permalink / raw)
  To: Alexandra Winter, Thorsten Winkler, David Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Heiko Carstens, linux-s390, netdev, linux-kernel,
	Pengpeng Hou

AFIUCV can be enabled by the QETH_L3/HiperSockets path even when IUCV
itself is not enabled.  However, the top-level net Makefile only descends
into net/iucv/ under CONFIG_IUCV.

That creates a Kconfig/Kbuild carrier mismatch: CONFIG_AFIUCV=m can be
selected, but af_iucv.o is never considered because the containing
directory is skipped.

This RFC uses an always-descend model for net/iucv/.  The subdirectory
Makefile already gates iucv.o and af_iucv.o on their own Kconfig symbols,
so entering the directory does not force either provider object on.

This is intentionally RFC because s390 maintainers should confirm whether
the QETH_L3-only AF_IUCV configuration is intended to build af_iucv.o
without the base IUCV object.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
 net/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/Makefile b/net/Makefile
--- a/net/Makefile
+++ b/net/Makefile
@@ -45,7 +45,7 @@
 obj-$(CONFIG_MAC80211)		+= mac80211/
 obj-$(CONFIG_TIPC)		+= tipc/
 obj-$(CONFIG_NETLABEL)		+= netlabel/
-obj-$(CONFIG_IUCV)		+= iucv/
+obj-y				+= iucv/
 obj-$(CONFIG_SMC)		+= smc/
 obj-$(CONFIG_RFKILL)		+= rfkill/
 obj-$(CONFIG_NET_9P)		+= 9p/
-- 
2.39.5


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] net/iucv: Descend into net/iucv when AFIUCV is enabled
  2026-06-25  6:13 [RFC PATCH] net/iucv: Descend into net/iucv when AFIUCV is enabled Pengpeng Hou
@ 2026-06-26  6:13 ` sashiko-bot
  2026-07-07  9:19 ` Alexandra Winter
  2026-07-07 14:54 ` Alexandra Winter
  2 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-06-26  6:13 UTC (permalink / raw)
  To: Pengpeng Hou; +Cc: Vasily Gorbik, linux-s390, Heiko Carstens, Alexander Gordeev

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Undefined reference to `iucv_if` when linking `vmlinux` if `CONFIG_AFIUCV=y` and `CONFIG_IUCV=m`.
--

commit f5dfba2251234de82ea8d770ca96db4b3b823733
Author: Pengpeng Hou <pengpeng@iscas.ac.cn>
net/iucv: Descend into net/iucv when AFIUCV is enabled

This commit modifies the top-level network Makefile to unconditionally descend
into the net/iucv directory. It allows af_iucv.o to be evaluated when
CONFIG_AFIUCV is selected without the base IUCV object.

> diff --git a/net/Makefile b/net/Makefile
> index 5b2dd7f07a85e..c0da946b281e1 100644
> --- a/net/Makefile
> +++ b/net/Makefile
> @@ -45,7 +45,7 @@ obj-$(CONFIG_WIRELESS)		+= wireless/
>  obj-$(CONFIG_MAC80211)		+= mac80211/
>  obj-$(CONFIG_TIPC)		+= tipc/
>  obj-$(CONFIG_NETLABEL)		+= netlabel/
> -obj-$(CONFIG_IUCV)		+= iucv/
> +obj-y				+= iucv/

[Severity: Low]
Does this create a linker error when CONFIG_AFIUCV=y and CONFIG_IUCV=m?

Because of this unconditional descent, af_iucv.o can be evaluated and built
into vmlinux even when IUCV is configured as a module.

In afiucv_init(), if CONFIG_IUCV=m, IS_ENABLED(CONFIG_IUCV) evaluates to 1:

net/iucv/af_iucv.c:afiucv_init() {
	...
	if (machine_is_vm() && IS_ENABLED(CONFIG_IUCV)) {
		cpcmd("QUERY USERID", iucv_userid, sizeof(iucv_userid), &err);
		if (unlikely(err)) {
			WARN_ON(err);
			err = -EPROTONOSUPPORT;
			goto out;
		}

		pr_iucv = &iucv_if;
	} else {
	...
}

Will this cause an undefined reference to the module-bound iucv_if symbol when
linking vmlinux?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260625061303.36326-1-pengpeng@iscas.ac.cn?part=1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] net/iucv: Descend into net/iucv when AFIUCV is enabled
  2026-06-25  6:13 [RFC PATCH] net/iucv: Descend into net/iucv when AFIUCV is enabled Pengpeng Hou
  2026-06-26  6:13 ` sashiko-bot
@ 2026-07-07  9:19 ` Alexandra Winter
  2026-07-07 14:54 ` Alexandra Winter
  2 siblings, 0 replies; 4+ messages in thread
From: Alexandra Winter @ 2026-07-07  9:19 UTC (permalink / raw)
  To: Pengpeng Hou, Thorsten Winkler, David Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Heiko Carstens, linux-s390, netdev, linux-kernel



On 25.06.26 08:13, Pengpeng Hou wrote:
> AFIUCV can be enabled by the QETH_L3/HiperSockets path even when IUCV
> itself is not enabled.  However, the top-level net Makefile only descends
> into net/iucv/ under CONFIG_IUCV.
> 
> That creates a Kconfig/Kbuild carrier mismatch: CONFIG_AFIUCV=m can be
> selected, but af_iucv.o is never considered because the containing
> directory is skipped.
> 
> This RFC uses an always-descend model for net/iucv/.  The subdirectory
> Makefile already gates iucv.o and af_iucv.o on their own Kconfig symbols,
> so entering the directory does not force either provider object on.
> 
> This is intentionally RFC because s390 maintainers should confirm whether
> the QETH_L3-only AF_IUCV configuration is intended to build af_iucv.o
> without the base IUCV object.
> 
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
>  net/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/Makefile b/net/Makefile
> --- a/net/Makefile
> +++ b/net/Makefile
> @@ -45,7 +45,7 @@
>  obj-$(CONFIG_MAC80211)		+= mac80211/
>  obj-$(CONFIG_TIPC)		+= tipc/
>  obj-$(CONFIG_NETLABEL)		+= netlabel/
> -obj-$(CONFIG_IUCV)		+= iucv/
> +obj-y				+= iucv/
>  obj-$(CONFIG_SMC)		+= smc/
>  obj-$(CONFIG_RFKILL)		+= rfkill/
>  obj-$(CONFIG_NET_9P)		+= 9p/


I apologize for the late reply, I was on vacation.
I'm looking into this now.

May I ask whether you are using IUCV? Or even AFIUCV over HiperSockets?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] net/iucv: Descend into net/iucv when AFIUCV is enabled
  2026-06-25  6:13 [RFC PATCH] net/iucv: Descend into net/iucv when AFIUCV is enabled Pengpeng Hou
  2026-06-26  6:13 ` sashiko-bot
  2026-07-07  9:19 ` Alexandra Winter
@ 2026-07-07 14:54 ` Alexandra Winter
  2 siblings, 0 replies; 4+ messages in thread
From: Alexandra Winter @ 2026-07-07 14:54 UTC (permalink / raw)
  To: Pengpeng Hou, Thorsten Winkler, David Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Heiko Carstens, linux-s390, netdev, linux-kernel



On 25.06.26 08:13, Pengpeng Hou wrote:
> AFIUCV can be enabled by the QETH_L3/HiperSockets path even when IUCV
> itself is not enabled.  However, the top-level net Makefile only descends
> into net/iucv/ under CONFIG_IUCV.
> 
> That creates a Kconfig/Kbuild carrier mismatch: CONFIG_AFIUCV=m can be

the same is true for CONFIG_AFIUCV=y; please mention both cases.
(Maybe also mention explicitely that CONFIG_IUCV=n is required to trigger the issue)

> selected, but af_iucv.o is never considered because the containing
> directory is skipped.
> 
> This RFC uses an always-descend model for net/iucv/.  The subdirectory
> Makefile already gates iucv.o and af_iucv.o on their own Kconfig symbols,
> so entering the directory does not force either provider object on.
> 
> This is intentionally RFC because s390 maintainers should confirm whether
> the QETH_L3-only AF_IUCV configuration is intended to build af_iucv.o
> without the base IUCV object.
> 
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
>  net/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/Makefile b/net/Makefile
> --- a/net/Makefile
> +++ b/net/Makefile
> @@ -45,7 +45,7 @@
>  obj-$(CONFIG_MAC80211)		+= mac80211/
>  obj-$(CONFIG_TIPC)		+= tipc/
>  obj-$(CONFIG_NETLABEL)		+= netlabel/
> -obj-$(CONFIG_IUCV)		+= iucv/
> +obj-y				+= iucv/
>  obj-$(CONFIG_SMC)		+= smc/
>  obj-$(CONFIG_RFKILL)		+= rfkill/
>  obj-$(CONFIG_NET_9P)		+= 9p/


For the records: I do not see a usecase where somebody would
create  configuration with AF_IUCV=y/m and IUCV=n; i.e. where
somebody would support AF_IUCV over HiperSockets, but not via
z/VM. But technically, it is possible and who knows.

So please re-send as a regular problem patch to net and add my
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>

Thanks you.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-07 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-25  6:13 [RFC PATCH] net/iucv: Descend into net/iucv when AFIUCV is enabled Pengpeng Hou
2026-06-26  6:13 ` sashiko-bot
2026-07-07  9:19 ` Alexandra Winter
2026-07-07 14:54 ` Alexandra Winter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox