Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4076496rdb; Mon, 11 Dec 2023 08:12:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+3DTzyTDy0Nr8e15C6x8MEHXeMX3Lm7MD8SZANJnhfB9FNOnKhd0DcwqQRc86h47xR0Kx X-Received: by 2002:a05:6a00:2e89:b0:6cb:bc06:b085 with SMTP id fd9-20020a056a002e8900b006cbbc06b085mr2830603pfb.34.1702311130957; Mon, 11 Dec 2023 08:12:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702311130; cv=none; d=google.com; s=arc-20160816; b=cK7HZ0zQW+EoGj6HzEjQrLtiykoZX3gIVcdohZUlAtfMuN6O5OsQKczXP7m9IzOwKI 93TXCz6ZLs0Bcw9KffeWtNgzXYel+bIYWlCNE/xuhMd4fEXronHnYoTqxnK+0zD8R2ay YNE+d9LNgoWWf/LcEl8dcLxWVaKzLXqhofFjeH2/RjrlFlylFp+U7sOcSfahtoRmpuso g6+w6fc7f3qjUV1h3w/2kfRaYjep1DoU4UN1qZfDEXTa+steG55vYSv9sOfdQAjN+FZ3 8ukeUqyYwsndlyupIJ1FaMmXJKnppCO8U0XJMqvrmjJ5LpJX35YMcIK7+TB8G8eGB0Lq AVMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9ac5CXHbB9EVvU7FGXILRzOHBDMiYKvXAj6dgYe06Vw=; fh=t8XoFDx0rj9XeO92rhbRZTbwyuG646uG1ZOgkYXpWfM=; b=JdI+aWX2ZJpJotIwWsF6uWWaBO62BYvNfo47COtKy6URr6ZtD5R32Hk6q+iMMeoZti SiUJ6cL2eOXHHV6M9cCYSSFPayU+n5y8pSlfUYTnE9GnJE3islRB2RoeMG+iZRJd6FWF DmzoFDme6eTAsOxUn6CEZllAKvGcdWrAXxf6hMjUE3y/nWIFge5/lYIBwbjIFW3VI+zj BmbiX3xsAho45v/2UOdaOLJidGB0PeouImSVh2N5ej6tyuTE5fwip5PdTvJPHUT5EImJ /GbuIqC2xl40rRUw2zkiVkvS4pRESBGlGAApkS31AVRrGPqfQYGIiOPN5xSmnluNZJH2 7pXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=jRIEVIfp; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id a7-20020a631a47000000b005bdf596188asi6194131pgm.667.2023.12.11.08.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 08:12:10 -0800 (PST) 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=@google.com header.s=20230601 header.b=jRIEVIfp; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8FDA7805D6FB; Mon, 11 Dec 2023 08:12:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344039AbjLKQLx (ORCPT + 99 others); Mon, 11 Dec 2023 11:11:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343886AbjLKQLw (ORCPT ); Mon, 11 Dec 2023 11:11:52 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 827779E for ; Mon, 11 Dec 2023 08:11:56 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-548ae9a5eeaso12462a12.1 for ; Mon, 11 Dec 2023 08:11:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702311115; x=1702915915; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9ac5CXHbB9EVvU7FGXILRzOHBDMiYKvXAj6dgYe06Vw=; b=jRIEVIfpG9wemGooInt/Yl7R2xKwxocom7ZrDOnYg4xdjIIOoAGttn8av0Qm/gCg8Y Wuf2XxgyXIF2GZ9Z8A5qj1lOURePzS85LnIaeG5ztFsZu9Dkp4PvBTOHEsbRNTncF+Ou csWz393H7h/ybItHlNcRQzQrRNFL+0iVAdp1d8ObZBka6ptcD1BZpSQUh7kCvu0P1KQf CyubCYMbufpBgK1OzX45pquXRecUT/zueDEFFHl1+0+fPZI9jmwgcPAVRJK3dbNCZJvi 1o4xrIT7vtzgfOJY4i2LhtfmjJez6QANezn76VV1ZQvxFdj581HX55CjJ/h3AtfxbL09 GXJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702311115; x=1702915915; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9ac5CXHbB9EVvU7FGXILRzOHBDMiYKvXAj6dgYe06Vw=; b=HDeWKhlFjh2lrvKo7ht31anp6D7msDh9IUWyh47+Q3VNB0ssRMez6sdtKe/aCiM+8q y0ezQMBktlvBhhckUFmRvcCTXG4t2KznFd0Cim5hW3u8othwG9d7/IpwGdwHmQzUOxgL 7jagx/Cl64LOpKcBhf5TCDb12PniMRKGN1hdEISfTN5dFeiEb8OeaW/GiYum8m9oxOvA 7L399BXThhTMAiNGUEeQNiM5clYVHS9xOtKoJrcGV6tn+0fSYWFKuATRilisUVgX7406 w+qqnvoWNFh9wxuXrttUOeBDeEcLgCElYzN5zo+Haq+4TPtseuu2ITSQQWSF3Q4Qt0Dd 1Eqg== X-Gm-Message-State: AOJu0YwWEQnkP3Nr0BoZnKHGdhBn9SmAUJLBJRsYgXNN/bJFGue+DEQN Zl0IqJ2L9bJQSeQ3cRqgwGBFNYQIacYoswlVpT156w== X-Received: by 2002:a50:ccde:0:b0:54c:384b:e423 with SMTP id b30-20020a50ccde000000b0054c384be423mr206505edj.5.1702311113654; Mon, 11 Dec 2023 08:11:53 -0800 (PST) MIME-Version: 1.0 References: <20231211150753.293883-1-mmaurer@google.com> In-Reply-To: From: Matthew Maurer Date: Mon, 11 Dec 2023 08:11:40 -0800 Message-ID: Subject: Re: [PATCH] x86/Kconfig: rust: Patchable function Rust compat To: Miguel Ojeda Cc: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , "H. Peter Anvin" , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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]); Mon, 11 Dec 2023 08:12:08 -0800 (PST) On Mon, Dec 11, 2023 at 7:36=E2=80=AFAM Miguel Ojeda wrote: > > On Mon, Dec 11, 2023 at 4:08=E2=80=AFPM Matthew Maurer wrote: > > > > + def_bool $(rs-option,-Zpatchable-function-entry=3D16,16) > > We don't have `rs-option` in mainline yet -- missing dependency? We > will likely eventually need it, but currently we only support a single > Rust version anyway, so we could add it (and the flag check itself) > when we upgrade (especially if it is going to be supported soon). Sorry, I just realized this was only in a local patch. I hadn't sent it previously because, as you pointed out, we currently only support one compiler revision. I was taking this approach because Android's compilers can have patches backported onto them when needed, so our 1.73.0 could have this flag and make use of it. > > > Speaking of which, I can't find the flag in upstream Rust (i.e. > outside the LLVM submodule), and I couldn't find a PR adding it. Could > you please add a `Link:` tag to the tracking issue / PR / ... if it is > submitted / when it is submitted? Or am I very confused? I haven't uploaded it yet. I'm hoping to send it up later today. I can wait until it's uploaded for a v2 of the patch series so I can link to it directly. > > Cheers, > Miguel If I don't get the PR for `-Zpatchable-function-entry` done in a timely fashion, I'll send up an alternate version of this patch that just makes it depend on !RUST, as this can currently cause random runtime failures if features which assume patchable entry are used with Rust. Re: Martin's comments (unfortunately they aren't on the same email so I can't reply inline) would you like me to file an issue against the R4L repository about this before sending a v2? I thought that repository was just for staging/discussion, and this didn't seem likely to need it.