lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260130064011.GA2981809@ax162>
Date: Thu, 29 Jan 2026 23:40:11 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: Rong Zhang <i@...g.moe>, Jonathan Corbet <corbet@....net>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Nicolas Schier <nsc@...nel.org>,
	Masahiro Yamada <masahiroy@...nel.org>,
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH] kbuild: install-extmod-build: Add missing python
 libraries

On Fri, Jan 30, 2026 at 06:30:56AM +0100, Mauro Carvalho Chehab wrote:
> On Thu, 29 Jan 2026 18:11:06 -0700
> Nathan Chancellor <nathan@...nel.org> wrote:
> > On Fri, Jan 30, 2026 at 01:49:55AM +0800, Rong Zhang wrote:
...
> > >   $ make -C /lib/modules/6.19.0-rc6/build/ M="$(pwd)" modules V=1 W=1
> > >   [...]
> > >   make -f /usr/src/linux-headers-6.19.0-rc6/scripts/Makefile.build obj=. need-builtin=1 need-modorder=1
> > >   # CC [M]  mod.o
> > >   [...]
> > >   # cmd_checkdoc mod.o
> > >   PYTHONDONTWRITEBYTECODE=1 python3 /usr/src/linux-headers-6.19.0-rc6/scripts/kernel-doc.py -none mod.c
> 
> This sounds really weird, as it is trying to run scripts/kernel-doc.py
> instead of tools/docs/kernel-doc. Does the out-of-tree Makefile
> override KERNELDOC variable? The current version contains:
> 	
> 	KERNELDOC       = $(srctree)/tools/docs/kernel-doc
> 
> But somehow it is using the old version before the renames:
> 
> 	KERNELDOC       = $(srctree)/scripts/kernel-doc.py

Well I think based on the "6.19.0-rc6" in the path above, this is
mainline, not -next, so the rename has has not happend there yet.

> Btw, I did a very quick test here, using an old OOT project I have
> at github:
> 
> 	https://github.com/mchehab/xr_serial
...
> It sounds to me that Rong may be using a Makefile on his OOT project
> that was not updated to pick the right kernel-doc tool.

If I use that project with Rong's original command, the
linux-upstream-headers package from the pacman-pkg target (which uses
install-extmod-build), and the following fix up for a more modern kernel
version, I see the following error:

  $ make -C /usr/lib/modules/6.19.0-rc7-next-20260129/build M=/tmp/xr_serial modules V=1 W=1
  ...
  # CC [M]  xr_serial.o
    gcc ...
  # cmd_checkdoc xr_serial.o
    PYTHONDONTWRITEBYTECODE=1 python3 /usr/lib/modules/6.19.0-rc7-next-20260129/build/tools/docs/kernel-doc -none   xr_serial.c
  python3: can't open file '/usr/lib/modules/6.19.0-rc7-next-20260129/build/tools/docs/kernel-doc': [Errno 2] No such file or directory
  make[3]: *** [/usr/lib/modules/6.19.0-rc7-next-20260129/build/scripts/Makefile.build:287: xr_serial.o] Error 2

If it is not expected that kernel-doc runs for external modules, then
maybe cmd_checkdoc should also be wrapped in a check for KBUILD_EXTMOD?

Cheers,
Nathan

diff --git a/xr_serial.c b/xr_serial.c
index 63a45a2..d4f7d81 100644
--- a/xr_serial.c
+++ b/xr_serial.c
@@ -517,7 +517,7 @@ static void xr_dtr_rts(struct usb_serial_port *port, int on)
 		xr_tiocmset_port(port, 0, TIOCM_DTR | TIOCM_RTS);
 }
 
-static void xr_break_ctl(struct tty_struct *tty, int break_state)
+static int xr_break_ctl(struct tty_struct *tty, int break_state)
 {
 	struct usb_serial_port *port = tty->driver_data;
 	struct xr_port_private *port_priv = usb_get_serial_data(port->serial);
@@ -526,7 +526,7 @@ static void xr_break_ctl(struct tty_struct *tty, int break_state)
 	if (port_priv->model != XR21V141X) {
 		xr_usb_serial_ctrl_msg(port, USB_CDC_REQ_SEND_BREAK, state,
 				       NULL, 0);
-		return;
+		return 0;
 	}
 
 	if (break_state == 0)
@@ -538,6 +538,7 @@ static void xr_break_ctl(struct tty_struct *tty, int break_state)
 		state == UART_BREAK_OFF ? "off" : "on");
 	xr_set_reg_uart(port, xr_hal_table[port_priv->model][REG_TX_BREAK],
 			state);
+	return 0;
 }
 
 /* Tx and Rx clock mask values obtained from section 3.3.4 of datasheet */
@@ -645,7 +646,7 @@ static int xr_set_baudrate(struct tty_struct *tty,
 
 static void xr_set_flow_mode(struct tty_struct *tty,
 			     struct usb_serial_port *port,
-			     struct ktermios *old_termios)
+			     const struct ktermios *old_termios)
 {
 	struct xr_port_private *port_priv = usb_get_serial_data(port->serial);
 	u8 flow, gpio_mode;
@@ -701,7 +702,7 @@ static void xr_set_flow_mode(struct tty_struct *tty,
 
 static void xr_set_termios_cdc(struct tty_struct *tty,
 			       struct usb_serial_port *port,
-			       struct ktermios *old_termios)
+			       const struct ktermios *old_termios)
 {
 	struct ktermios *termios = &tty->termios;
 	struct usb_cdc_line_coding line = { 0 };
@@ -747,7 +748,7 @@ static void xr_set_termios_cdc(struct tty_struct *tty,
 
 static void xr_set_termios_format_reg(struct tty_struct *tty,
 				      struct usb_serial_port *port,
-				      struct ktermios *old_termios)
+				      const struct ktermios *old_termios)
 {
 	struct xr_port_private *port_priv = usb_get_serial_data(port->serial);
 	struct ktermios *termios = &tty->termios;
@@ -805,7 +806,7 @@ static void xr_set_termios_format_reg(struct tty_struct *tty,
 
 static void xr_set_termios(struct tty_struct *tty,
 			   struct usb_serial_port *port,
-			   struct ktermios *old_termios)
+			   const struct ktermios *old_termios)
 {
 	struct xr_port_private *port_priv = usb_get_serial_data(port->serial);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ