Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3504607rwl; Mon, 27 Mar 2023 15:22:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ZMGjHaNwsxpgdOyIJCA2/fQhgTM/eVwxdEO04kF6c8G104TP0OpzAFVwgtR1WFwbdjaP6g X-Received: by 2002:aa7:8e8e:0:b0:625:7300:5550 with SMTP id a14-20020aa78e8e000000b0062573005550mr13679707pfr.31.1679955747924; Mon, 27 Mar 2023 15:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679955747; cv=none; d=google.com; s=arc-20160816; b=NDNz1DGlVSGqRQziILCLOzeZaEq4jcKOW6JBw8jHKXI9uWlqUKIqArjxOvR854leFW 04gftqqhu/NOinku+OJBw62vYzT9RGVDjZ1/GzsE9NknK7UPyNhg6XUYakDu2lbPZB/Q hL0NenVLzfh9CtCQypD5TL8Br7O0XRAufD2PiDEiHUlCmtLCxf3ITT75Xr48JZuiQNgL 37D+bQwY9ZLEfyOrb1/9ht8TPFa8wTBeKlLxIw8zoUbouG2MHKrukNboOUBTl0Z98e7H E9uovT4Scpbfwe5YoKGj1wGTTngOCqnCIO3lMEIlkl/i4DcmWnP5GZNhEOTjEUFV6nml OSyA== 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=8qpaub3I/CyGwEFR/k/WmlBCDNumW/+SJIaNcuoNk9k=; b=lmXcczLVWtmTetqkcSxYXWzMeR71eKtk3OkGq1XD5wSh8iVpLydDnnaOXYU0IJmh9O d9W+HoW5mK2hjpODAiEHjqnhtqom+Y2hryw/YwQ65X76jjPkKKhyXCjRHtpYRtnc8f/n gg1si7Y+OcrXRQmT67ZrasJaWs8f6vK8CuR9rxJOemDplk7cv/cBrPwoKruJhAcL9BiH C7eJQuqC+hLRiNnP0axLcjkx6CI/R9zrLg9ev1TQMp6qRXQICxdhEiWs8kYU2vQo5BQW AT7h5Sdol0iXI1ubz64ZFgoTTanVgij5BeEeIZuybnRBkfijxuztb9Fcb+B46fAMOmqU 3xrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=sLjlJgje; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a6543c7000000b0050faafb6a11si16389700pgp.807.2023.03.27.15.22.15; Mon, 27 Mar 2023 15:22:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=sLjlJgje; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbjC0WSY (ORCPT + 99 others); Mon, 27 Mar 2023 18:18:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbjC0WSX (ORCPT ); Mon, 27 Mar 2023 18:18:23 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D66919AB for ; Mon, 27 Mar 2023 15:18:21 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id r11so42217514edd.5 for ; Mon, 27 Mar 2023 15:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679955500; 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=8qpaub3I/CyGwEFR/k/WmlBCDNumW/+SJIaNcuoNk9k=; b=sLjlJgjeoT0WV0qFn9qz1kIcxyac6pMVMv4H0/t9YS7zXIrH7YfP7jRP4vvtxYuMhv ZkjmSM2TjJ2zegpBf5QGdb0Mg2dEBQNtRk9nXqhWfdzK8Cn2PNTlxJjlOr4L+7Qk675Y nXesSbqZ55WgkfqcvQkclW2y9t9tEOxFKzyyUPFbBZcRrU7ShBkSWppcY0urgbLMqJbf tLMwthWt0GlBeegianqR6puXwKX0gRuaDR6yup4MiyrXZu76w9isj8TE+VUN+DdOSY4A IQCaYyBU7XaWxUoZ4cGVm4P8s5+myV0YBVlJc6RiTvo7dF/Tw2pzx5QhD46MOXhuxEcU F3DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679955500; 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=8qpaub3I/CyGwEFR/k/WmlBCDNumW/+SJIaNcuoNk9k=; b=SEZM8emkDT44zCYs+ticH2Uu9sh7CpsMP+O67cu4CONPxKlNHepHN3sCxAVmT18Uhb dgxm9I/FUUfQdGVoySgKM8zyK1lczsCMCBYuSEmTxD54wIlY4h52jVlF6ybW0IiN1hOt jMbHDVfmxpkpERa0Vr1H+M4Oqnt5PqnJPluYhqU3urD2R+2258UEo1zbpicrnh5y+JJ+ CqES6+spLnNmaDMvq1qBWmJaFMSkQo8TkrOEuVVphm9uE02T4a97OX5yCigrabChg+6a KjRhAup9w88z3w2Pk+jfpE3ttcTFXeGysRT76zxjbsXp1JcTqhEnvoaGoaAjh6W7COfi Mu9g== X-Gm-Message-State: AAQBX9fyf5bCXQg5gXpEH2lwFrq8L3C40HWkJnZXc/ZN8mMZK/cM0yHe jLR0w+uBcQgukL3YqypUsT1MtiLpDckPH1VLRBKSWg== X-Received: by 2002:a17:907:cb86:b0:930:42bd:ef1d with SMTP id un6-20020a170907cb8600b0093042bdef1dmr6723296ejc.11.1679955499628; Mon, 27 Mar 2023 15:18:19 -0700 (PDT) MIME-Version: 1.0 References: <20221219061758.23321-1-ashimida.1990@gmail.com> <20230325085416.95191-1-ashimida.1990@gmail.com> <20230327093016.GB4253@hirez.programming.kicks-ass.net> In-Reply-To: <20230327093016.GB4253@hirez.programming.kicks-ass.net> From: Sami Tolvanen Date: Mon, 27 Mar 2023 15:17:43 -0700 Message-ID: Subject: Re: [RFC/RFT,V2] CFI: Add support for gcc CFI in aarch64 To: Peter Zijlstra Cc: Dan Li , Aaron Tomlin , Alexander Potapenko , Alexander Shishkin , Alexandru Elisei , Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Arnaldo Carvalho de Melo , Arnd Bergmann , Boqun Feng , Borislav Petkov , Borislav Petkov , Brian Gerst , Catalin Marinas , Changbin Du , Christophe Leroy , Dave Hansen , Dmitry Torokhov , "Eric W. Biederman" , Frederic Weisbecker , gcc-patches@gcc.gnu.org, Greg Kroah-Hartman , "H. Peter Anvin" , Ingo Molnar , Jiri Olsa , Josh Poimboeuf , Juergen Gross , Kalesh Singh , Kees Cook , Kumar Kartikeya Dwivedi , Luis Chamberlain , Marco Elver , Mark Brown , Mark Rutland , Masahiro Yamada , Masami Hiramatsu , Michael Roth , Michal Marek , Miguel Ojeda , Namhyung Kim , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , "Paul E. McKenney" , Richard Sandiford , Song Liu , Thomas Gleixner , Tom Rix , Uros Bizjak , Will Deacon , x86@kernel.org, Yuntao Wang , Yu Zhao , Zhen Lei , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org, linux-arch@vger.kernel.org, linux-modules@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-15.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Mon, Mar 27, 2023 at 2:30=E2=80=AFAM Peter Zijlstra wrote: > > On Sat, Mar 25, 2023 at 01:54:16AM -0700, Dan Li wrote: > > > In the compiler part[4], most of the content is the same as Sami's > > implementation[3], except for some minor differences, mainly including: > > > > 1. The function typeid is calculated differently and it is difficult > > to be consistent. > > This means there is an effective ABI break between the compilers, which > is sad :-( Is there really nothing to be done about this? I agree, this would be unfortunate, and would also be a compatibility issue with rustc where there's ongoing work to support clang-compatible CFI type hashes: https://github.com/rust-lang/rust/pull/105452 Sami