mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: netdev-bot+sashiko@kernel.org
Cc: mat.jonczyk@o2.pl, javen_xu@realsil.com.cn, hkallweit1@gmail.com,
	linux@armlinux.org.uk, kuba@kernel.org,
	maxime.chevallier@bootlin.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] net: phy: realtek: fix listing of sysfs directory tree
Date: Tue, 17 Nov 2026 01:46:57 +0100	[thread overview]
Message-ID: <5f27878a-1206-4f67-aee9-833f31506997@lunn.ch> (raw)
In-Reply-To: <179486542983.3136.9636959145442798025@kernel.org>

> [Severity: High]
> 
> This fixes one driver, but does it leave the root cause in place?
> 
> The symlink name under /sys/module/<mod>/drivers is built from the raw
> driver name in make_driver_name():
> 
> drivers/base/module.c:make_driver_name() {
> 	driver_name = kasprintf(GFP_KERNEL, "%s:%s", drv->bus->name, drv->name);
> 	...
> }
> 
> module_add_driver() then creates the link under that name:
> 
> 	ret = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, driver_name);
> 
> kernfs accepts the '/'. When the directory is read, verify_dirent_name()
> in fs/readdir.c rejects the name and getdents fails for the whole
> directory:
> 
> 	if (memchr(name, '/', len))
> 		return -EIO;
> 

This is a kernel wide problem, so i don't think this patch needs to
address it.

>   drivers/net/phy/smsc.c: "SMSC LAN8710/LAN8720"
>   drivers/net/phy/qcom/at803x.c: "Qualcomm Atheros AR8031/AR8033"
>   drivers/net/phy/marvell.c: "Marvell 88E308X/88E609X Family"
>   drivers/net/phy/davicom.c: "Davicom DM9161B/C"
>   drivers/net/phy/intel-xway.c: "Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.3"
>     (plus three more entries in the same file)
>   drivers/net/phy/microchip_t1s.c: "LAN865X Rev.B0/B1 Internal Phy"
>   drivers/net/phy/xpowers/acx00.c: "X-Powers AC200/AC300 EPHY"

Maybe turn this into a patch series and address all these, one patch
each. That way, if we have any ABI issues, it is easy to revert just
one driver.

	Andrew

  reply	other threads:[~2026-11-17  0:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 21:40 Mateusz Jończyk
2026-11-15 23:00 ` Andrew Lunn
2026-11-16 21:43 ` netdev-bot+sashiko
2026-11-17  0:46   ` Andrew Lunn [this message]
2026-11-19  0:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f27878a-1206-4f67-aee9-833f31506997@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=hkallweit1@gmail.com \
    --cc=javen_xu@realsil.com.cn \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mat.jonczyk@o2.pl \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®