From: Kwanghoon Son <asdfkwang@gmail.com>
To: Shuai Liu <847807867@qq.com>
Cc: Miguel Ojeda <ojeda@kernel.org>,
rust-for-linux@vger.kernel.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 06/12] rust: serial: Add minimal serial-core polling console support
Date: Fri, 30 Oct 2026 07:58:38 -0400 [thread overview]
Message-ID: <auSGbrP19XfI3S5N@debian> (raw)
In-Reply-To: <tencent_12B82162741365EE49D2A22CCDF2A04D6908@qq.com>
On Fri, Oct 30, 2026 at 10:16:11AM +0800, Shuai Liu wrote:
> Hi Kwanghoon,
>
> I reviewed the Rust side of this series (the serial abstractions in
> 06/12) and did not find any soundness issues. In particular I verified:
>
> - uart_port.lock is initialized by the serial core in
> uart_add_one_port(), so zeroing the Opaque port storage and relying
> on the core to initialize the lock is safe.
>
> - The set_termios() adapter unconditionally taking the UART lock is
> correct: the serial core callers (uart_change_line_settings(),
> uart_set_options() and the console resume path) do not hold the port
> lock when invoking the port->set_termios() callback.
>
> - The console callback accesses to driver->state are protected by the
> ownership chain: the port holds an Arc<Driver>, the console is
> unregistered before the serial state is freed, and removal drains
> the console readers via SRCU.
>
Thanks for review.
> One thing to consider: SERIAL_BFLB_RUST depends on COMMON_CLK, which
> cannot be enabled on x86, so neither the driver nor the abstractions
> get build coverage from the Rust CI (allmodconfig on x86). Something
I don't understand for now, COMMON_CLK not possible on x86?
or you mean CI not supported?
> like "depends on RISCV || COMPILE_TEST" (with the clk dependency
> handled for the COMPILE_TEST case), or splitting the abstraction
> Kconfig entry from the driver entry, might make it easier to
> build-test.
>
> While reviewing I also wrote KUnit tests for the pure-logic paths that
> can be exercised without hardware. The patch is attached; results with
> kunit.py under QEMU on arm64:
>
> rust_kernel_serial: pass:8 fail:0 skip:0 total:8
>
> and CLIPPY=1 is clean. Feel free to squash it into 06/12 or keep it on
> top of the series.
>
> Best regards,
> Shuai Liu
>
Best regards,
Kwang.
next prev parent reply other threads:[~2026-10-30 11:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 5:05 [PATCH RFC 00/12] Add BL808 UART3 support with a Rust serial-core polling console Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 01/12] dt-bindings: vendor-prefixes: Add Bouffalo Lab Kwanghoon Son
2026-10-29 18:52 ` Conor Dooley
2026-10-30 5:42 ` Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 02/12] dt-bindings: interrupt-controller: Add BL808 PLIC Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 03/12] dt-bindings: timer: Add BL808 CLINT Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 04/12] dt-bindings: riscv: Add Bouffalo Lab BL808 Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 05/12] dt-bindings: serial: Add BL808 UART Kwanghoon Son
2026-10-29 18:54 ` Conor Dooley
2026-10-29 19:18 ` Conor Dooley
2026-10-30 5:56 ` Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 06/12] rust: serial: Add minimal serial-core polling console support Kwanghoon Son
2026-10-30 2:16 ` Shuai Liu
2026-10-30 11:58 ` Kwanghoon Son [this message]
2026-10-29 5:05 ` [PATCH RFC 07/12] serial: bflb: Add Rust BL808 polling console Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 08/12] riscv: Add Bouffalo Lab SoC selection Kwanghoon Son
2026-10-29 18:58 ` Conor Dooley
2026-10-30 5:58 ` Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 09/12] riscv: dts: bouffalolab: Add BL808 SoC Kwanghoon Son
2026-10-29 19:05 ` Conor Dooley
2026-10-29 5:05 ` [PATCH RFC 10/12] riscv: dts: bouffalolab: Add Sipeed M1s Dock Kwanghoon Son
2026-10-29 19:07 ` Conor Dooley
2026-10-30 11:37 ` Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 11/12] riscv: defconfig: Enable Bouffalo Lab SoCs Kwanghoon Son
2026-10-29 5:05 ` [PATCH RFC 12/12] MAINTAINERS: Add Bouffalo Lab BL808 support Kwanghoon Son
2026-10-29 19:08 ` Conor Dooley
2026-10-29 19:20 ` Conor Dooley
2026-10-30 11:44 ` Kwanghoon Son
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=auSGbrP19XfI3S5N@debian \
--to=asdfkwang@gmail.com \
--cc=847807867@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@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