Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp793742rdg; Fri, 13 Oct 2023 00:51:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHV2mDr72cItRvmTeevbgk0bum1YLH5vReU0c80H9TrrxYsPH/aTTB+mPe5yF27N+IbMc/q X-Received: by 2002:a05:6358:fd04:b0:164:8d78:257d with SMTP id ui4-20020a056358fd0400b001648d78257dmr14842894rwb.28.1697183463039; Fri, 13 Oct 2023 00:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697183463; cv=none; d=google.com; s=arc-20160816; b=Z9M71nlANMO2teAnaacQNt5lQm54B/YV+PfnWN5e25HmH9sUgEI+PyukQMK7o+4to3 RU5wACtpmCs1RMnfKlYpz5VFTtpTtt4nmpFD8hBr6oMdGyMyWQIQm+UOCSN2aAzaNFUy fCRbrAT5vJCLEnEB03dfeJYoFfBmCVzGP9VNOUQA7JSxM8YtRpGSlhIb3DTm7iE95aqE hQBSpUKDd25EnFgJIbN9N0jteQmNqt1PF9pIVhonzX3MqZOMSrgCcc8ZOBYQPJ5GsoNB WTAHpOc+pBZP7v7eInTdnbAYzwwZUzkxNHNUPp12f+Qe+6oLkX3E1419A+spUnrlM9Ff EXxw== 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=oiX2EcOICtWMCl8O283II31c/DVhUshikMhSt0dtcbs=; fh=i7Lmxynpv9LGABQj8kv2GH24MYKHJu3ZoPa7kOCbiyo=; b=c/LtN6LUiYI3L4kCq8xgfFd9BJhYL59/AAS8tuby1fhbGnU1DWhYw9GHLsFuMnQ1n+ 2qQWKYwNJ/j25jLi80QbxcmE3LkwswqtXWw2w1R/UwB+OZUZ1Hb6cfNgWw10MYB3cwuM pEd71tNGWf1UvBElDo4IJ/UArfJSbPy3twYWCoK8K9/Bk8t+moOOxij4TLm0alTOBwps XEF/vtPn2eNYi+MhRZs9MGKQ5OkR0/y6Me1AkezSvuLCZp2OZRZ8/maNyNzpE/tTZw2y TR9wL7nLh3Qzx1/x2ah3XTyfQt30iHdJi5BJ0RL9bJX/yQc6IXEqv+pISnoW1RV86f+c RB7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=i0dkNR48; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y73-20020a638a4c000000b005ab46595d5dsi847340pgd.471.2023.10.13.00.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 00:51:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=i0dkNR48; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 62125808A8C7; Fri, 13 Oct 2023 00:51:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbjJMHuu (ORCPT + 99 others); Fri, 13 Oct 2023 03:50:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbjJMHus (ORCPT ); Fri, 13 Oct 2023 03:50:48 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 202D4BF; Fri, 13 Oct 2023 00:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=oiX2EcOICtWMCl8O283II31c/DVhUshikMhSt0dtcbs=; b=i0dkNR48dE8Mxm1KVD2599Pyx6 DmKGXdCjALh+8s6KMmM7qlfoEYO+LJHtza7ZMfvTDy4TmU8t+QbRwYz9JyWCoRoGdanlwF0/XA2Jz iIn1cIw6DMhqxl5AyakiBAq0thCcllWjQeeeAr6EUYcedV52QwB1KdnYSqRdhPtbH8zCrwNtzWrTz VQ88TKxaCd0Q0p45FIAXIMUfBmhy4S0VcG2VCUEfJP8oayX8gjBR12FoEnrLRL3gZA2eGCgBW9ldV c7vy+sR/3J46YjZ07jSvoRLacZ/d6w334jFA6mhkcfD+CKBcnsEBHSwFImH+6n7rq0eOYpchM24Xg S8ANZ/vg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qrCvu-004B18-3K; Fri, 13 Oct 2023 07:50:06 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id BEF04300365; Fri, 13 Oct 2023 09:50:05 +0200 (CEST) Date: Fri, 13 Oct 2023 09:50:05 +0200 From: Peter Zijlstra To: Ramon de C Valle Cc: Kees Cook , Sami Tolvanen , Miguel Ojeda , Miguel Ojeda , Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, patches@lists.linux.dev, Jarkko Sakkinen , Alex Gaynor , Wedson Almeida Filho , David Gow , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-doc@vger.kernel.org Subject: Re: [PATCH v10 25/27] x86: enable initial Rust support Message-ID: <20231013075005.GB12118@noisy.programming.kicks-ass.net> References: <20220927131518.30000-1-ojeda@kernel.org> <20220927131518.30000-26-ojeda@kernel.org> <20231012104741.GN6307@noisy.programming.kicks-ass.net> <202310121130.256F581823@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 13 Oct 2023 00:51:00 -0700 (PDT) On Thu, Oct 12, 2023 at 03:15:12PM -0700, Ramon de C Valle wrote: > [1]: > https://doc.rust-lang.org/nightly/unstable-book/language-features/cfi-encoding.html I'm sorry, but that looks like a comment from where I'm sitting :-( Worst part is it being on a line of it's own and thus unrelated to anything. This rust syntax is horrific.. > [2]: > https://doc.rust-lang.org/book/ch19-04-advanced-types.html#using-the-newtype-pattern-for-type-safety-and-abstraction I don't speak enough rust to even begin following this :/ > [3]: Wrapping a type in a struct should achieve something similar even > without using the cfi_encoding attribute since the encoding for structs in > both are , where is . You're not talking about C, right?