From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381180; b=QYGnHtP9HwtxJ8a/gi/9+46teidRjeKCYyyf3HQuBiCprcDcfMbM0C4Wb2LL/7p/DRMT VObm3QQieR77bC9HpOuLn3Trpw7RekfEN18omUFOxNAeS6+wbTggIRCXPEbjGrYz1kSab Els/pl/D1gP4T4zqB1yG8L4/27fA/zHzC5naDuKN15OKriqi5omFDwJMkHx7uIHLleVWH 2+DXDniK7pFP6w/VUbZPQlY8K4EHpXi00/0c7Gz6HU5/aynanaiUFDtZfMRJLH3ltNnbV bN/g2y41Py4v8DMy42PUA739Xcq6VzSAmWKK6eDbn/AJQyq4zl4l3+qJfwZFNoQ0+fA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381180; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=W1vy2WrNJQ0al8Dq26toF796WXaYPh4iGlJS2orXxck=; b=OsocaT+Xe0Zy4FWQdjjUakTr/T+nUWbYUAzVOKAiy5zTyvTHPFxpwuGM+vbcoAlV7h1c YAxSjLW6k2leVoldyMOIdZdTMlzk997kWnui+F1BPDQl6SvhBmHTP6XZNPgDTgh2jFDrv Yrpnaw7dX4l2Z/iu4XVndtm5pPTmGie0/Gr92Ss/sGTiw2TYJ0NWtNQNCguf11zRpX3G5 7ZtWUM5FtQvVfQ+mqHHHB0nRROUIl0cev5cf7KUtEkaLyZFPFeylnCoYo4chDoV1EPSid qsqxCUrWQRru19/8xIxkbo8C+ebITLRkjHnDn/Y4JukxAASQ8oteeS5x3ie4TcG9NQA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YCKgRGUO; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A2A5606A333; Fri, 4 Dec 2026 10:46:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YCKgRGUO Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA5481F000C2; Fri, 4 Dec 2026 10:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796381180; bh=W1vy2WrNJQ0al8Dq26toF796WXaYPh4iGlJS2orXxck=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=YCKgRGUOqkZf45kMYQomBSkrh4zO4B+BUFVD2e1zH/40yVe9cVVyTPYCj88TxA/gO cKDh1KpQSVPbhZMtzUSXq1AGGr+Qgj7IFY9hJVuQKRx1yELmALyb+00sU++nRxdkfG CvHIEoqCZUcZJD6UPoP2RvpA+p3FjXy+VUqmaCD6AkjSnz3YWz2wvvEl3uKSgd5Hch qgoEpyvJHI6Qt5le8uSOWo2Ysd2S5rGuug6+SyMNdKXj+s2I9Yu7tOsedT8Zt+Hz71 7YTcj1oXYAYhyRElm+JHFirlbdRksOG+MqaJX4BqybaPxWCtjP8h8zg0yQe8F5MJ/4 Y3aiKLwObG32Q== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v10 03/11] serial: 8250: widen RX trigger byte counts to 16 bits Reply-To: sashiko-reviews@lists.linux.dev To: "James Hilliard" Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261204-submit-h616-uart-fifo-v1-v10-3-1a9fb4f79635@gmail.com> References: <20261204-submit-h616-uart-fifo-v1-v10-0-1a9fb4f79635@gmail.com> <20261204-submit-h616-uart-fifo-v1-v10-3-1a9fb4f79635@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 10:46:18 +0000 X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] serial: 8250_mxpcie: u16-to-u8 truncation in mxpcie8250_set_rxtrig() -- commit c0bd87c22f5fd195b99868bf224819efdd25bf4c Author: James Hilliard serial: 8250: widen RX trigger byte counts to 16 bits This commit widens the 8250 RX trigger threshold tables, sysfs parser, and uart_port set_rxtrig callback from unsigned char to u16 to support UARTs with larger FIFOs. > diff --git a/drivers/tty/serial/8250/8250_mxpcie.c b/drivers/tty/serial/8= 250/8250_mxpcie.c > index 0a3fb63991c1c..eff1643396110 100644 > --- a/drivers/tty/serial/8250/8250_mxpcie.c > +++ b/drivers/tty/serial/8250/8250_mxpcie.c > @@ -257,7 +257,7 @@ static int mxpcie8250_get_rxtrig(struct uart_port *po= rt) > return serial_port_in(port, MOXA_PUART_RTL); > } > =20 > -static int mxpcie8250_set_rxtrig(struct uart_port *port, unsigned char b= ytes) > +static int mxpcie8250_set_rxtrig(struct uart_port *port, u16 bytes) > { > struct mxpcie8250 *priv =3D dev_get_drvdata(port->dev); [Severity: Low] Can mxpcie8250_set_rxtrig() silently truncate bytes when writing MOXA_PUART_RTL and rx_trig_level? mxpcie8250_set_rxtrig() only checks bytes > port->fifosize, but TIOCSSERIAL allows CAP_SYS_ADMIN to overwrite uport->fifosize via uart_set_info() without serial8250_verify_port() validating xmit_fifo_size, even with UPF_FIXED_TYPE set. With rx_trig_bytes_store() now using kstrtou16(), values above 255 can pass the fifosize check and get truncated modulo 256 when written to the 8-bit MOXA_PUART_RTL register and stored in u8 rx_trig_level (e.g. writing 256 programs 0) while returning success. Bounding bytes against U8_MAX (or the hardware 128-byte FIFO limit) in mxpcie8250_set_rxtrig() would avoid the truncation. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-submit-h61= 6-uart-fifo-v1-v10-0-1a9fb4f79635@gmail.com?part=3D3