Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5679385pxv; Wed, 7 Jul 2021 09:15:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV8K5HpFKS9RgxnynJMkBzrOed4dQ+rSPQNPYoCbq1PD6JO1HtG5peke6E1+KshXbUzPJf X-Received: by 2002:a50:8fc3:: with SMTP id y61mr30247985edy.107.1625674501854; Wed, 07 Jul 2021 09:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625674501; cv=none; d=google.com; s=arc-20160816; b=PpHCMKKVLDjph1C1sPiTM3fMWrmMRTN2XNgyTV0klKo8SOGBntjgHuBu18Xhu9wd/1 17iduE+v/zU6cD5o4LZIEWVuSO0iMTOcLaBBuHbNM3ggMQLRcIksbXcxZiJr9Ncf0EgD weJthHXdCCX4piB3Gms8isge15E6PYO5Uv3wEgUcGBbu3EQpte/okRub8uNX3fk9J52C zA2REOzawkzFzO50XHCGIarCXy50vuGNQZqXau/vMRfRC/4JXyRqpWmjvdwIbfFtkO4d FXjayMGnL+gU6vgdM2aGzTtELFsTDOvywfKpmsc5+2kFfVr5URW/D+GZxOj/UwVRTwGs TiHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kWyuGMwX+ZNUDXD7vDpVa4A2OyqG/8p+xZdri8V20uc=; b=jPe0D80yvASmLXlCtrCMf+1oTPEln+eIK1YkYRz84ExD6/7H/6Uui447SFYrvrZf54 UDPYToVWDT/DGOPSan6NpDv7MzPHH5qzRrg2fHGTF2MLCyWukeQ2BsUJSdiTqyebGXMh sGdUGd+RxcaY0mWTioewPCQGZt/3ZFYoJYpItjgIvIgCfsYqsn4kn9wrBkCW3M02llPJ cAQmNHP8h9soumsCI1fbzQjyfQWreyQTaAGMeG/zx28rntAU8gnPb4mhF1D1DSGZQPwk tO2g/wblt71+xdJsPKlnqBhUox4JSYYP/KeoJdeTwxJkHoC79FxJHyg3zUBm1YqczsPI oNgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=T2dqzRwP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si17981818edc.463.2021.07.07.09.14.38; Wed, 07 Jul 2021 09:15:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=T2dqzRwP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231905AbhGGOKh (ORCPT + 99 others); Wed, 7 Jul 2021 10:10:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231865AbhGGOKg (ORCPT ); Wed, 7 Jul 2021 10:10:36 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DC4DC061760 for ; Wed, 7 Jul 2021 07:07:56 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id d12so2603955wre.13 for ; Wed, 07 Jul 2021 07:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kWyuGMwX+ZNUDXD7vDpVa4A2OyqG/8p+xZdri8V20uc=; b=T2dqzRwPotD5ZOjn6JCz0tkAm6jUi7jcBoxaUMn0E8tLfrXB0oQe6az48pOSGJeQOW 178QgAoV2QSn0YP58N1pUNvWbviBPoa+YmpgoiPa7onI0WpIAZ/dSIQv5hS1gUaaqREJ kO32XVR27MdLkzkZJa2JQSqI1EUnfYR+YjUuoTJ+uqmoTBXGwuX7DQmCaNhLiYoVAXow cPcp1zIGaVOyt8InKS58l8xUrIOs8k9obW3pQvApQNh1DwtllPUndcl/wrN9CHKK7mi5 cfWBeLOO6jBVnT6Q9OuOnZap2IOh2UbzlIS20nbxa4Z+4d7oFG7B1ozeGTdk3YJ3FTjA QkJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kWyuGMwX+ZNUDXD7vDpVa4A2OyqG/8p+xZdri8V20uc=; b=XyquIJVHr2G0WNYTyhwjqTgPBhWg4B1/VmosKTxu7EF3wOd+3ybmA0CrvQ0mzPd4wV 5syQbbwDAd7+7Bpcnvcryb76XwEsyy0bWrpVrcBUtTT3wG8wyiTqM1tsXOYnaVkBnHgm HYUO6SIY9FVWL/BOdlZWAh0fO7X6bl7zcN1byvHnRMEjdsB4xvghgLGMutxE8hVhonG6 EQ9+9Du46JSXb86YhVj8qHFXXNoLk5Qh+D5W0drjbtLwn3db7CtA/4lk2uaRc1JakYMV S4zdEHjlS68yI3eO2zzE4mRzMk0B+/xIBhLkqdvh6qCeO9pbDLC2zLNtAZEZjZpEnnyi 2qgQ== X-Gm-Message-State: AOAM533hoLYhZo6ktCpLiGHmzCPmuBb4w779jVLtLxBbK1aFNsd7qbei qpKAyJGbei9oFVPvB0gh8r0x X-Received: by 2002:a05:6000:1867:: with SMTP id d7mr21264188wri.263.1625666874582; Wed, 07 Jul 2021 07:07:54 -0700 (PDT) Received: from google.com ([2a00:79e0:d:209:860d:625a:fd59:d699]) by smtp.gmail.com with ESMTPSA id u9sm21396849wmq.41.2021.07.07.07.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jul 2021 07:07:54 -0700 (PDT) Date: Wed, 7 Jul 2021 15:07:50 +0100 From: Wedson Almeida Filho To: Greg Kroah-Hartman Cc: Miguel Ojeda , Christoph Hellwig , Miguel Ojeda , Linus Torvalds , rust-for-linux , Linux Kbuild mailing list , Linux Doc Mailing List , linux-kernel Subject: Re: [PATCH 00/17] Rust support Message-ID: References: <20210704202756.29107-1-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 07, 2021 at 02:50:54PM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 07, 2021 at 02:33:57PM +0200, Miguel Ojeda wrote: > > Now, if you are OK with non-hardware modules, you can take a look at > > Rust Binder (last patch in the series) which is a non-trivial module > > and it is already working. > > Cool, does it actually pass the binder self-tests that the Android > systems have for the codebase? We haven't run the Android tests yet because they depend on an Android-specific service (servicemanager) running and other Android-specific libraries. What we are doing instead is adding binder tests that don't depend on anything Android-specific; in fact, we are putting them in tools/testing/selftests/binder so that they can run on any vanilla system. The commit is available here: https://github.com/wedsonaf/linux/commit/f90ec49be9207fa765f07ad1071210ad871712ac The tests are written in C and run successfully against both C and Rust drivers. I still have another ~20 tests that I wrote in another harness that I will convert to selftests soon, but the two together I believe have more coverage than the ones in Android. We also have a trivial latency benchmark (ping with no payload) where the Rust version performs better than the C one. The benchmark is available here: https://github.com/wedsonaf/linux/commits/ping > Last I looked at this thing, it was not > feature-complete compared to the in-kernel binder code, has that been > resolved and the needed filesystem changes added? It is not feature-complete in comparison to the C one just yet, it is missing a few things but not for any fundamental reason -- we were mostly focusing on the kernel crate and tests. Miguel's point is that it does implement the vast majority of binder features and is non-trivial, so it could be used as evidence that useful kernel drivers can be built with Rust; not just "transpiled" from C, but written with the Rust safety guarantees. Cheers, -Wedson