Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2045522rdb; Mon, 9 Oct 2023 10:37:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGw0HuA/hSzarEEStRo7x1ULUbKRdLAkYu46YZEOeNS75c9DZovzjStBqKpfWdO9kZmSzCY X-Received: by 2002:a05:6a00:1954:b0:693:3be8:feba with SMTP id s20-20020a056a00195400b006933be8febamr17209514pfk.19.1696873033951; Mon, 09 Oct 2023 10:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696873033; cv=none; d=google.com; s=arc-20160816; b=HzetDWn/5ef8S6Vf/fKZqDIxjM2Ulo5e8Cyo0c0biDeBz51IZ79I9rL+U3LwggFppU M52qT2lZsu6l2VYYKBis63esotPsRgUsnxkWFpjPsQyt0m7BxDxNSsLVoGV+uCdXSzC3 2+uQykI1E81rRj8THBJJH4VFq9nzYyRU4GUDu3D+qD6/K+Vl4fMgCENjduMZPyTDEFKK aonIROKdUbR0S7K49L2S8c0ZuS9FchlY4YvZGHY8kZnFc6373i1oqcksGomUsofEHQb5 2l+BwnrWj28dUl6Yrkpd28XRHLirWF5Fli6FjREy/8wmDi++vaukvLQ6OL17KPHbirsk ZTcQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=B3zuDB1atc8Tg1twDdPwAyE5M1GIgn/u0PB+nQJ8bR8=; fh=OuNI0RoBKhdgLZvqE3jIdhy0lqts/WaW/08dY8q+t84=; b=u2uuA2cPVLh/Jsic8g9IXNJyItkOWQlJyypU5jk5ChG9OTgNbE70Ilz2Qe4A7KHNs/ 8ONFruJohTc6BBGz/A9XfjEaHPjeuCL40jQkGQh8rDvzNYiHgHBUM1vgBg4PRwU+1hVC w02YdvniQ4Vtc320mkIMpWp9huFORztecrJhIxByrJE0IPk7X33W2Sdf09+krddv7cdv OxRh3w0+tdBwYqnXOsRnxosjagXtRMsqFgJBElMxo3Pk2T5GS+JklExghaO5BAg6M+0P vLRm6+SQj04hAyHdN1620c5bGdfucnemV53AeyrdamGZQ5wdYl3xv9QF9kcj6/q+pjd+ U+Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j8NkldTq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id cv12-20020a056a0044cc00b0068e243a72basi7673460pfb.330.2023.10.09.10.37.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 10:37:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j8NkldTq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 19E1E801C1A7; Mon, 9 Oct 2023 10:37:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377432AbjJIRhG (ORCPT + 99 others); Mon, 9 Oct 2023 13:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232860AbjJIRhF (ORCPT ); Mon, 9 Oct 2023 13:37:05 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E89494; Mon, 9 Oct 2023 10:37:03 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86F2AC433CA; Mon, 9 Oct 2023 17:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696873023; bh=BW2UXyZrvXyT/FZW+LrBqggagNr5D5MBdlmAiZdBZHQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j8NkldTqlYjXAwPgzwSb89ZPTQnyDof4SI3tlaYG99WZSrp5QrGoEhumwJzN5ZtZK Z7kQmdB1MEZO39b4QGLSseg2+P1TNcvf4++UwpMBg/D3Tys23SK2POEaI0NNPPiVnI 3UQmZwZApjsaLVdRjXh2JiRtifgw9pyaa7El88b8= Date: Mon, 9 Oct 2023 19:37:00 +0200 From: Greg Kroah-Hartman To: Miguel Ojeda Cc: Matthew Maurer , Sami Tolvanen , Peter Zijlstra , rcvalle@google.com, Miguel Ojeda , Linus Torvalds , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, patches@lists.linux.dev, Jarkko Sakkinen , Kees Cook , 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: <2023100909-disperser-washable-4cbe@gregkh> References: <20220927131518.30000-1-ojeda@kernel.org> <20220927131518.30000-26-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 10:37:13 -0700 (PDT) On Mon, Oct 09, 2023 at 06:31:13PM +0200, Miguel Ojeda wrote: > On Mon, Oct 9, 2023 at 6:01 PM Matthew Maurer wrote: > > > > If the IBT part would be helpful by itself immediately, I can split > > that out - it's only the KCFI portion that won't currently work. > > Thanks Matthew. I don't think we are in a rush, but if it is not too > much work to split it, that would be great, instead of adding the > restriction. > > For retthunk, by the way, I forgot to mention to Greg above that (in > the original discussion with PeterZ) that I did a quick test back then > to hack the equivalent of `-mfunction-return=thunk-extern` into > `rustc` to show that the compiler could use it via LLVM (by passing > the attribute in the IR). At least at a basic level it seemed to work: > I got a userspace program to count the times that it went through the > return thunk. I didn't try to do anything on the kernel side, but at > least for the compiler side, it seemed OK. So it may be way easier (on > the compiler side) than the CFI work? It should hopefully be much easier than CFI, it was a much simpler change to gcc and clang when it landed. thanks, greg k-h