Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2079221lqe; Tue, 9 Apr 2024 09:00:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4mZoMq8yk6SLSut4rH1cUFMZUNHIR+dusGxzT6N+ZbDVpTS27o0x5D9/5GCNAict7xdKVOWDYyWsrzWCdQs4jviheGpOtfatH7Ewqdg== X-Google-Smtp-Source: AGHT+IH4EEe6+eleUEgC44yn1SBQ34aNBydohpZbh5KTuCaleI9Nt40su33W44zRmB+cjNV2m1F6 X-Received: by 2002:a17:90a:be0c:b0:2a4:739a:23c4 with SMTP id a12-20020a17090abe0c00b002a4739a23c4mr38456pjs.35.1712678427700; Tue, 09 Apr 2024 09:00:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712678427; cv=pass; d=google.com; s=arc-20160816; b=FiySUq/JwfKawozN1Rbad+jMHSBzE3xCXa9RJ3lO9a5/+GDa2UOT/c2AWHS+4nQE0j d/mwkxV7k/MiIHD+cgv8GR6f5m0CUrS/77IH6JrK8OBfMic0dHrLNPwDEPcbIakv7WBX dhv6ojKwor+viJCfsJsUfRc/mu4a+3jInaBj/Zc/y1c8ru+6pfJHDyDMZb+fy/WDxbID jAR40A2XNOwO11cK2ArUFmXDzj/IQKarDIk047p3HDqXAfTOgolkk3WzTPr6MMmaSGXN 3R7YenvCkSu05dxQYT3dJUyporptorNOZm0BhDLe7HyTKgHGZIiFEgyaievXlT/7qqlZ EtkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=yUKisf+hNaAY9pCVyNA3uiO6miIBAOlujYSfIxr5gac=; fh=vM9UZnIGow+l1tYsagxoW7CQX5h3/tcstQGdA1zEI/M=; b=ryf3df1XX8HwAiIz24hxOrpNVQ4kejRMqBtV9faJF74ft+H1J63hCB3UyB4qT7kfL0 ctrto4l8jMMv6r4nyh0TpfKiCH5sfdIG2WJHGGHTj6qEq3cuOFL9Cx6m37wF5PS1i0nx Oi6ipBjR6ku9MVh7y3VhyXgDNwe0UThx+maMa4uqkGgZVpe8atB0ECjS5L3XWr9wHKlU HXdEHEi8ZREIl6zGT7CE1XcvpDkwll33enNbXfc9fdjDlQkjSgIzmyDcx95EymWxxv2z VIWneugzbtde2Nd+5wOeBr0p0brp3DjfKn8euF44axlk2FDGA0OWsUXss7zFoo7gqeeB Iqyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GC2gw7Ny; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-137277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r21-20020a17090b051500b002a30910be42si8957120pjz.63.2024.04.09.09.00.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 09:00:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GC2gw7Ny; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-137277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2BA92286A39 for ; Tue, 9 Apr 2024 15:56:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B95A13BC03; Tue, 9 Apr 2024 15:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GC2gw7Ny" Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (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 48AF7137C4B; Tue, 9 Apr 2024 15:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712678149; cv=none; b=VlUrIEGoxba2LJnfVgS6ToE4j9Tj9u1ft4bJafX9+6w/t/QFOp3Jatg8adL4njjnQvr4uZKuPMl6cFTUR8K4OVQS2eWd6/wn/gK+qheUJDekPsS68eVhAkBS86sGH4aAGJ1C4O0TWw5cHifLeMGrWRclK3kGZikTQi9rJf+ndxM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712678149; c=relaxed/simple; bh=yUKisf+hNaAY9pCVyNA3uiO6miIBAOlujYSfIxr5gac=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=YsHzqe91yC4yo1y5EWA4MXL5HLrGSUaRFpCocAs3uTj3x9PD1UpNQfo7HxTiQFSb2KEOH1Z/3oDGHAdoxWDwFJfLRMM4V1iKLc3h1bcjOZ4NcUj1OfeAwKv7jBdxI6CTtpi4eVAVbwGYcWdCWsBWGlXUjgiF131taCorgqicyLQ= 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=GC2gw7Ny; arc=none smtp.client-ip=209.85.216.49 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 Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2a2f82ded89so3051698a91.1; Tue, 09 Apr 2024 08:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712678147; x=1713282947; 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=yUKisf+hNaAY9pCVyNA3uiO6miIBAOlujYSfIxr5gac=; b=GC2gw7NyMXsWQSwR8Aiz9+URfToJFSLGeI9wDUoqwmhJMajRMukSyBd9PwXkrFhVEN TqEadsfXZB/TRlX4SvJiA52C0VEy25O6jPjw3PBxkQXw7+HJoso3Lib8QmCxLxgwjc59 2KxyUusSpvZAxJ+H4b6QXiMHw9iCjNzvSp+Bc5MG5RbDIk92UWm1HwCkXnbtkdPyq+IV 9+RgxyWyM7Ai09yXybKKw+Cp6S/qVReSN3ls9hWBlgqQ4MMGYDlbKlkXxCqDjdMyIgGY C2uyleVVJ3wwxzpKI8KnJrflNzxc6zXuFN+oKEOguqi4vTj8OVl+knfqdGlCo/15hizf Aq4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712678147; x=1713282947; 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=yUKisf+hNaAY9pCVyNA3uiO6miIBAOlujYSfIxr5gac=; b=t6OUUyhQUfKJiD6krTbSjRLEEq84TgZ7S792Q+WDUbMFutifDDgclEX4cJNJuOz2MR 2XyDfM6uGTjb5EMA+hc3uL3Mio7RCfi6ij/8EEVsmScW8eQvHSbB+mKZB22xx/KlAVl8 Tcyu6vV3v7KBrZau35OnUWEHyZ5AfrdmqUCdlWagkvphstIdsDw/3ZBnpZIJRoZ5eGXx 1lKhfFyE++tVXtXTxmsETvjykEmerM5dTbWDUeGPfz39SFObOtmo4NyBsCUFFqMIUKOw 4B03tXv1FEVc3t7jlNebzXoXopgcZ6nDQVcEHdoXIM3gaK5FCN4CVXTac/dlRVFQmmGZ IzrA== X-Forwarded-Encrypted: i=1; AJvYcCVYHps5BSi5/8GzFKkceiGqav5HOoIWIbAftjL4YdhkL2JxAklwaay9Ctyf1QIN1FEGurAK7kR+Gp0UPxiO4F1o3vKivigvu2Jgnj64yFtqgBKHu1VcrGqv+QJDE5DxO2+1UYvLlxMxhCkInGyJCTzLryRkR9uSTbaTSaFanuKxYxMELu6yykV4yfU= X-Gm-Message-State: AOJu0YypXcfMxtq0uUlJntWQrcPIHH842o3VPiT4iOfX55k6MxtTVXb6 KAZ7VAxAdcXoFgpPxBMNfyX7zgrWzyuNFaSOb07BmySca8Z7XYu156RkBMgzPYN6g+ywvjscdAa VexlQqZe13/uc5Rej5Gx4mXDsAdA= X-Received: by 2002:a17:90b:278a:b0:2a2:35e5:f04f with SMTP id pw10-20020a17090b278a00b002a235e5f04fmr21722pjb.38.1712678147518; Tue, 09 Apr 2024 08:55:47 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240305-shadow-call-stack-v2-1-c7b4a3f4d616@google.com> <20240409103120.GA22557@willie-the-truck> In-Reply-To: <20240409103120.GA22557@willie-the-truck> From: Miguel Ojeda Date: Tue, 9 Apr 2024 17:55:04 +0200 Message-ID: Subject: Re: [PATCH v2] rust: add flags for shadow call stack sanitizer To: Will Deacon Cc: Alice Ryhl , Catalin Marinas , Jamie Cunliffe , Sami Tolvanen , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Ard Biesheuvel , Marc Zyngier , Mark Rutland , Mark Brown , Nick Desaulniers , Kees Cook , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Valentin Obst , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rust-for-linux@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 9, 2024 at 12:31=E2=80=AFPM Will Deacon wrote= : > > I think we have time to do this properly, like we did for the clang > enablement a few years ago. In hindsight, avoiding hacks for the early > toolchains back then was a really good idea because it meant we could > rely on a solid baseline set of compiler features from the start. Yeah, it sounds fair, thanks! After the warning is fixed (i.e. `-Zfixed-x18` or similar is implemented etc.), I would recommend adding support to the kernel for the `-Z` (unstable) flags, similar to this patch, in order to test them easily and getting `rustc` to stabilize them. Then the only change required should be a name change to `-C` or similar. Cheers, Miguel