From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=203.205.221.155 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793326604; b=3jG8/Cu+tMuk0y2XUs1HpG1s1EHwO7pmOxsLM0RsfEykxNCci1xA8EsT6e5dEibFCpv2 IvGD/XbOF5/ICau/5tcj7GK7B+RLZRF/nWb+nFatPwccBufGiJyixaJnjl0iBZCuB+GFz bgPcUvr3MEVovIiLPF6qMw9dJu+FaNsm5W2FThKCZpU0yVZgUgPZBZTLvuPr5ycVtr2cY M02FVPRlV/M7XIegO/Yb1TfYrVbPASXdMLhtZf9Ur1jlrUbNmB9yIuQw9E7cee5MxM113 qFEXJtZKwnw79eRrmaVq+ISSYLVYCsBlf7iVDwFfnHt7uQdg6p/VaXp+Cy0feFRBP5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793326604; h=DMARC-Filter:DKIM-Signature:Received:X-QQ-mid:Message-ID: X-QQ-XMAILINFO:X-QQ-XMRINFO:From:To:Cc:Subject:Date:X-OQ-MSGID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=0NybnSmxUimOrGaT/uhAY/1Lsyep1HNUoiXKlp/WhLI=; b=n/PsrOkthvZdllDaydqsOKdy1ElWyRCkEf9iacRD2sbq4tK6CFx4ZZGoOe3caJ8sSvS1 nleUlCQWg1QgcQLBEJTiZEKSzms7ySYWMYMlytCFjd4ijgKeGBiwukZwm0/Ypir0TL7GL yaLZFoEAlKxW2qkJrmei5dxQujZS2tuH/QV/07FppGz7CJCeXUtzTUDgNTPO+y5qCAI1Y m8xlYzrvlz8g0ICrbUalaZurTdy5o9+G1sOWwjtcUebZVvxRjRlrU5s+h+yhf/ftacoLW mSCHkx7+YhSUHHMDhE2JypVOUBR+/fYwLFG4xzj9JF5NU43FZQUwltudeAbHKuh6X2A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=qq.com; spf=pass smtp.mailfrom=qq.com; dkim=pass header.d=qq.com header.i=@qq.com header.a=rsa-sha256 header.s=s201512 header.b=nTeBGzIt; arc=none smtp.remote-ip=203.205.221.155 Received: from out203-205-221-155.mail.qq.com (out203-205-221-155.mail.qq.com [203.205.221.155]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9140C606A31A; Fri, 30 Oct 2026 02:16:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9140C606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=qq.com header.i=@qq.com header.a=rsa-sha256 header.s=s201512 header.b=nTeBGzIt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1793326573; bh=0NybnSmxUimOrGaT/uhAY/1Lsyep1HNUoiXKlp/WhLI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nTeBGzItB2SUwcTHXr9zkNZyfxF89nkWU3Ml3QBzumOKTFGIzf/rL6428Lq+7IiOk kFwoqqbOihLF2pUbGOvS83LiyeFDtDlXoMXTTTShfub10ZfvJBeu25cFWgYiOEUL/3 p+i7qzt5KMsMcGQYfwH7+dwRmkdzuGDfIB2Fy3FY= Received: from shuai-VMware-Virtual-Platform.. ([218.206.237.125]) by newxmesmtplogicsvrszc43-0.qq.com (NewEsmtp) with SMTP id 40BB1AA5; Fri, 30 Oct 2026 10:16:11 +0800 X-QQ-mid: xmsmtpt1793326571t4g2nzfk5 Message-ID: X-QQ-XMAILINFO: N/WmRbclY25GrDD+nu7mOEFK7wfeneumfepYk5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: Shuai Liu <847807867@qq.com> To: Kwanghoon Son Cc: Miguel Ojeda , 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 10:16:11 +0800 X-OQ-MSGID: <20261030021611.3800688-1-847807867@qq.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261029-rust-bl808-console-v1-6-b736ee920078@gmail.com> References: <20261029-rust-bl808-console-v1-6-b736ee920078@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, the console is unregistered before the serial state is freed, and removal drains the console readers via SRCU. 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 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