[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFEp6-3qMwN8rN0Muk4uB5cOu-1J68kXsPDxrJUA33kO+tM70A@mail.gmail.com>
Date: Fri, 9 Jan 2026 09:56:36 +0100
From: Loic Poulain <loic.poulain@....qualcomm.com>
To: "wanquan.zhong" <zwq2226404116@....com>
Cc: chandrashekar.devegowda@...el.com, chiranjeevi.rapolu@...ux.intel.com,
haijun.liu@...iatek.com, ricardo.martinez@...ux.intel.com,
netdev@...r.kernel.org, ryazanov.s.a@...il.com,
johannes@...solutions.net, davem@...emloft.net, andrew+netdev@...n.ch,
kuba@...nel.org, pabeni@...hat.com, linux-kernel@...r.kernel.org,
"wanquan.zhong" <wanquan.zhong@...ocom.com>
Subject: Re: [PATCH] wwan: t7xx: Add CONFIG_WWAN_DEBUG_PORTS to control ADB
debug port
On Thu, Jan 8, 2026 at 1:53 PM wanquan.zhong <zwq2226404116@....com> wrote:
>
> From: "wanquan.zhong" <wanquan.zhong@...ocom.com>
>
> Add a new Kconfig option CONFIG_WWAN_DEBUG_PORTS for WWAN devices,
> to conditionally enable the ADB debug port functionality. This option:
> - Depends on DEBUG_FS (aligning with existing debug-related WWAN configs)
> - Defaults to 'y',If default to n, it may cause difficulties for t7xx
> debugging
> - Requires EXPERT to be visible (to avoid accidental enablement)
>
> In t7xx_port_proxy.c, wrap the ADB port configuration struct with
> CONFIG_WWAN_DEBUG_PORTS, so the port is only exposed when
> the config is explicitly enabled (e.g. for lab debugging scenarios).
>
> This aligns with security best practices of restricting debug interfaces
> on production user devices, while retaining access for development.
>
> Signed-off-by: wanquan.zhong <wanquan.zhong@...ocom.com>
> ---
> drivers/net/wwan/Kconfig | 11 +++++++++++
> drivers/net/wwan/t7xx/t7xx_port_proxy.c | 2 ++
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/net/wwan/Kconfig b/drivers/net/wwan/Kconfig
> index 410b0245114e..0ab8122efd76 100644
> --- a/drivers/net/wwan/Kconfig
> +++ b/drivers/net/wwan/Kconfig
> @@ -27,6 +27,17 @@ config WWAN_DEBUGFS
> elements for each WWAN device in a directory that is corresponding to
> the device name: debugfs/wwan/wwanX.
>
> +config WWAN_DEBUG_PORTS
> + bool "WWAN devices ADB debug port" if EXPERT
> + depends on DEBUG_FS
> + default y
> + help
> + Enables ADB (Android Debug Bridge) debug port support for WWAN devices.
> +
> + If this option is selected, then the ADB debug port functionality in
> + WWAN device drivers is enabled, allowing for Android Debug Bridge
> + connections through WWAN modems that support this feature.
> +
So, ultimately, this port will depend on debugfs being enabled, so it
might be simpler to move the `port_conf/debug` attribute from sysfs
to debugfs? Additionally, the symbol config name is quite generic,
while its description is specific to ADB.
Regards,
Loic
Powered by blists - more mailing lists