From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D222121423F for ; Wed, 19 Feb 2025 17:06:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739984806; cv=none; b=V5woiISAOYMDof/4m0oAct6CAjAy6qPwURHQrxAiFhri1tVq/sqq/nahdE8ff+BDXBa8x8CDfLcyvPLwqtC6lyNzoAn7l2l7xLsTiH9TUPGpqfkMrFTbbt2uSXdNT+KIJPaJcGJrGI/xiwTQ94N+85bvr9lZ2XLqN81jKMVkDmk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739984806; c=relaxed/simple; bh=Vwkc4kdAV45hUA3h7Hf6neKlLMmm2gyPbfb7wCifIyA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pb7LxsDH9fXVYjUuISQiUWIVbWWSqp+YRQM2Po4ovcR07RQZdoLcx2cHjUVvfpPeirbcA8lV7goP+9ukAJgmm/o9D+E5nKo2D/mK0OQY+PsrsYRyaaKRn6HmIyjO36yDSUS5Nskct763m19p2S+renAR1VHxGJrlI9w+R85kJ08= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from trampoline.thunk.org (pool-173-48-127-146.bstnma.fios.verizon.net [173.48.127.146]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 51JH6NSu022319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Feb 2025 12:06:24 -0500 Received: by trampoline.thunk.org (Postfix, from userid 15806) id A79B22E011A; Wed, 19 Feb 2025 12:06:23 -0500 (EST) Date: Wed, 19 Feb 2025 12:06:23 -0500 From: "Theodore Ts'o" To: Miguel Ojeda Cc: James Bottomley , Christoph Hellwig , rust-for-linux , Linus Torvalds , Greg KH , David Airlie , linux-kernel@vger.kernel.org, ksummit@lists.linux.dev Subject: Re: Rust kernel policy Message-ID: <20250219170623.GB1789203@mit.edu> References: Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Feb 19, 2025 at 05:44:16PM +0100, Miguel Ojeda wrote: > Hmm... I am not sure exactly what you mean here. Are you referring to > Wedson's FS slides from LSF/MM/BPF? i.e are you referring to Rust > signatures? > > If yes, those signatures are manually written, they are not the > generated bindings. We typically refer to those as "abstractions", to > differentiate from the generated stuff. The problem with the bindings in Wedson's FS slides is that it's really unreasonable to expect C programmers to understand them. In my opinion, it was not necessarily a wise decision to use bindings as hyper-complex as a way to convince C developers that Rust was a net good thing. I do understand (now) what Wedson was trying to do, was to show off how expressive and powerful Rust can be, even in the face of a fairly complex interface. It turns out there were some good reasons for why the VFS handles inode creation, but in general, I'd encourage us to consider whether there are ways to change the abstractions on the C side so that: (a) it makes it easier to maintain the Rust bindings, perhaps even using automatically generation tools, (b) it allows Rust newbies having at least some *hope* of updating the manually maintained bindings, (c) without causing too much performance regressions, especially on hot paths, and (d) hopefully making things easier for new C programmers from understanding the interface in question. So it might not be that increasing C safety isn't the primary goal, in general, one of the ways that we evaluate a particular patchset is whether addresses multiple problems at the same time. If it does, that's a signal that perhaps it's the right direction for us to go. Cheers, - Ted