From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28F2914BF9B; Tue, 6 Aug 2024 21:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722979800; cv=none; b=PZHeHC9MNp7ekeEbbYkOBIX19Ic35Z/ORHkJlY8hyuSGUaeVgOBW7runRvgX+DoIPX578ezNXTHdX6eP+r1Tmc66NbghyymqSoSzg2wMhjrYz+hNEHY2gUqk/fk/Thnmzs9y89IwJ1528dD354tJjxCj1ATGYc+1Aijcw/mGYx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722979800; c=relaxed/simple; bh=YAYm883qR2b+0OMMEKEDDwX0rE3CyHC+yxTlu4vjzeM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=A7JBVePcXEb3vJ+aR/b3hd1iPJ7cQORQYGRd6Eo7nF3I6xzahhH9+BDVxH6hec51Y1SqrM5TjpeN+mx28fj7D/a3fCKNlV0COyWk9fHX0LYwB/TG8Y2x+n+OyZcc76S850DxWk370I5xc+zP+6o8+i5VWXWzkIk5HRqoLCoY/Io= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CH6LohWg; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CH6LohWg" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2cb7cd6f5f2so835581a91.2; Tue, 06 Aug 2024 14:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722979798; x=1723584598; 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=YAYm883qR2b+0OMMEKEDDwX0rE3CyHC+yxTlu4vjzeM=; b=CH6LohWgP8/Zr9nWw/mQwjad8zqJbTLk2iR6epdtUvJwRFjEGShafjQpEcSzx/O5zq 7Axb5F7QIVrpx/lWj/dUj1fqy+IuTTdt8ZZHlo3bo39nvGIRtGDofb0ts0PFA2A8pNR1 uywWB0eED0SK0K2LH2hqC2AKGw1DnWlwZt6Qpyvi8ILIz9I4MUYLF/18YzejVdN/zp71 zpWpN3IDbqN5hiltCPC6qgW+wenTshp8hvmGpQ9IHtXX4wT/MuBIucw/XU3XMsHuGaJ5 GelVjtU9zqHb/WRrzR+8MdVOEHVLel5z0IC4HDUcXbMfcgsURRoRBxcRH9BTbYr6uUT8 x1Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722979798; x=1723584598; 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=YAYm883qR2b+0OMMEKEDDwX0rE3CyHC+yxTlu4vjzeM=; b=gszG08Brc9+jP4g53xmlRKDpNrinGh+T7nNOQ1qRXUVeE7BggUdF+5v5bOPL6m2sp0 AW8wa3AkLZCBR8gvYWKf2ToaynKlOX3tVWAUjpTrjmdd+NBTOrJVIdyMZ6szvcp7kBpi 4Cuixdt9wPmosc8tInLv6HCQvihLzbT9wta2/PgBg1Tn5iqRQJrBfHdMWkOokY1wgeZb iEu1hSc6J6PsREAhW6TGSzx+7lgAPzWJBVxSvFC5njONQGVrbqGGlonJB2gBoqAZghPp xCLetB9MDQHlSVXf8b5qaP1qQiXRCk3DuMCM5AwQLPX5GlRP718TUihz2aRYK/iqhmtc Wz7A== X-Forwarded-Encrypted: i=1; AJvYcCVhQjFMJ1mQ1Ucw1T5lRjYZJPeKRcBal3BQD8B+4P1TFnl6LpXMUYTqUH0nf/Cmi7a8HEMgXmcO5+YQekdtjdLl6m1VcnXMlEiPZhnlJDGeSCGlVs340SgBeqmfIEJJeKgvQ7y0BGiyMwStYYA= X-Gm-Message-State: AOJu0Ywl30TS/JSD0Iaj+awGwVwS1JdPdLPnwrLPvwVUPJ69Cl4DLOz4 H+6UfAb9H4gPnyNsQ9xFkoNx9J++6gYpdDV14xzTO5KXgH41IMgewcOFt+SQ1dkYoqDaGb49NqU HuLa6ZlNNf/uSAlxxlT2qyVX8rco= X-Google-Smtp-Source: AGHT+IEzClk6wi93u2N1ixrRD20SSYcAePSE4oKBt1hQ8ZNBYd1wNxcRTjFOXdxvnz2DSbe4P7vhA5aUuctrQ5oTFLo= X-Received: by 2002:a17:90b:1652:b0:2cb:55f9:b7c5 with SMTP id 98e67ed59e1d1-2cff9415bbfmr19564109a91.12.1722979798377; Tue, 06 Aug 2024 14:29:58 -0700 (PDT) Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240725183325.122827-1-ojeda@kernel.org> <20240725183325.122827-6-ojeda@kernel.org> <202408061241.855CB28@keescook> <20240806202217.GZ37996@noisy.programming.kicks-ass.net> In-Reply-To: <20240806202217.GZ37996@noisy.programming.kicks-ass.net> From: Miguel Ojeda Date: Tue, 6 Aug 2024 23:29:46 +0200 Message-ID: Subject: Re: [PATCH v3 5/6] objtool/rust: list `noreturn` Rust functions To: Peter Zijlstra Cc: Kees Cook , Miguel Ojeda , Josh Poimboeuf , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Masahiro Yamada , x86@kernel.org, "H. Peter Anvin" , Nathan Chancellor , Nicolas Schier , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 6, 2024 at 10:22=E2=80=AFPM Peter Zijlstra wrote: > > So it would be fairly simple to make objtool consume a magic section > emitted by the compiler.. I think we've asked the compiler folks for > that at some point even, but I don't have clear recollections. The section sounds like a good approach -- we will ask the Rust team about it. Then perhaps we can get Clang/GCC to implement something similar too -- for this sort of thing we can use the shorter cycles of `rustc` (and their unstable features concept too) to experiment with these things :) I have also added it to our `rustc` sublist of things we need. Cheers, Miguel