Path: csiph.com!weretis.net!feeder8.news.weretis.net!news.usenet.ovh!news.corradoroberto.it!gothmog.csi.it!bofh.it!news.nic.it!robomod From: NoisyCoil Newsgroups: linux.debian.kernel Subject: Re: Package for development of out-of-tree kernel modules written in Rust Date: Sun, 13 Apr 2025 17:40:01 +0200 Message-ID: References: X-Original-To: Miguel Ojeda , debian-kernel@lists.debian.org, debian-rust@lists.debian.org X-Mailbox-Line: From debian-kernel-request@lists.debian.org Sun Apr 13 15:36:52 2025 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.098 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, LDO_WHITELIST=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailing-List: archive/latest/148212 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/c3b33d00-9f7b-4153-9960-819b458b76f9@disroot.org Approved: robomod@news.nic.it Lines: 24 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sun, 13 Apr 2025 17:36:32 +0200 X-Original-Message-ID: X-Original-References: <20250402211027.yned7ytqevpygnpj@shell.thinkmo.de> <0fb7dc74-1ee5-4b30-8edd-c1db97bbaa85@disroot.org> <20250403142812.kf5ucbblwytoac7h@shell.thinkmo.de> <5058a094-6d9a-4164-aabc-34c3f0db4a75@disroot.org> <20250403183302.iao7vqal7uxh7zn4@shell.thinkmo.de> <6b625d6c-4111-4645-9a24-cc02300d32fb@disroot.org> <7a198601-652a-4c25-a80e-462a7140c5da@disroot.org> <20250413111408.jh7busq5cvvj36o7@shell.thinkmo.de> Xref: csiph.com linux.debian.kernel:86878 On 13/04/25 13:14, Bastian Blank wrote: > So we can only ship rust source in any way and the > kernel module make stuff needs to rebuild anything for the external > modules. Yep, this seems to work [1]. The two tests I did are: 1. Native build on arm64. Installed the build on amd64, replaced the Rust files (rmeta and libmacros) with ones obtained by cross-compiling the same kernel with the same config on amd64. Pointing KDIR to the natively-built /usr/src/linux-headers with the replaced Rust files correctly builds the OOT module, and the module correctly loads on arm64. 2. Cross-build on amd64. Installed the build on arm64, replaced the Rust files with those from the twin native build. Same as above, the module builds and correctly loads on arm64. This seems to be the way to go, although my limited testing may well be neglecting unknown failure modes. [1] At least with MODVERSIONS enabled. Not sure what would happen with MODVERSIONS disabled, perhaps nothing, as long as the kernel version remains the same?