From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (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 2FA771C02 for ; Mon, 19 Dec 2022 13:32:10 +0000 (UTC) Received: by mail-pg1-f170.google.com with SMTP id 62so6130246pgb.13 for ; Mon, 19 Dec 2022 05:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=dBdUZZuJPOmpy2Xr6QADuWry9xil1hvmnye/zX2ZeGs=; b=fudn22QQR0cZNc/3RoQpxRlTLjwWSHPdJ3HbEt/WxpuONQEkIQnkWpBlerF9kEPodJ nHhQFOykKEx6IwR5/KfRtAGdVyduWE4KKnkENOc2szemL+pJqARz2salHLoW95MwEbdA 4l8C9DgDXblVaaqJ7qI9X4RGT4ChxV2bMC1ENtWvdqwdBfsedCwcpXE4H+LW+wNxHezu PrVxhEJl0r5aoDk7qfpvB3XMyrRfWqp0XjyDX+nwKDJBCaYRg3q9T6oErlC4ykTpLMIo lmb8XMScdS8JKQTabKQpf5aytupGC3t56WCAiBDQ8xriUGgm665URRddp66Cq+IxHZ93 WjWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dBdUZZuJPOmpy2Xr6QADuWry9xil1hvmnye/zX2ZeGs=; b=6OPmOxbcgqMNn0bqTgVMf3asWN02FQj3QnVApRpdlbwf1IlLMarRPDMrevE/GRUO7T eVizPDlmDctbyc/pWJxJBnYgCN1LB689q7gY1nDPfvV7ZA/pqonJxSk33lNVWNFEchFZ crilVD7lwofW6msmabHa8VJ85bY1dzaHwjGfLpEvm5OwqVYmQvXkkOS7P7948FmY0pUx jl8BOmf9T3YrNWMsFMeB0XTA+TTRBMxg/MLYAsI0olpJ8ZWuO2pea0+Nk96g7aaivl/1 hIcjWliJb5ZgRJSSnI7pVFE2FM7lifBqnKQLuEhpZsHA34YGCZ/rhI28VE/qXq1jq6X/ TbSA== X-Gm-Message-State: ANoB5pk7SS4awUG10sw0qPvh09Vkp6eDksqTANv9snLONZYgu5oyEgLA KhRkdKpyoc/uW32izC1B/ns= X-Google-Smtp-Source: AA0mqf7lo7GM8x5UdwEdtv60/3460fbiPsGJh8g4HC8TKv3RHlSb+qHW4uv3yzbalqxIGN7bytAd6Q== X-Received: by 2002:aa7:9f04:0:b0:577:4168:b5ef with SMTP id g4-20020aa79f04000000b005774168b5efmr42472793pfr.3.1671456729555; Mon, 19 Dec 2022 05:32:09 -0800 (PST) Received: from localhost ([124.248.219.206]) by smtp.gmail.com with ESMTPSA id s7-20020a625e07000000b0057691fb0d37sm6553392pfb.193.2022.12.19.05.32.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Dec 2022 05:32:09 -0800 (PST) Date: Mon, 19 Dec 2022 05:32:04 -0800 From: Dan Li To: Peter Zijlstra Cc: Masahiro Yamada , Michal Marek , Nick Desaulniers , Catalin Marinas , Will Deacon , Sami Tolvanen , Kees Cook , Nathan Chancellor , Tom Rix , "Paul E. McKenney" , Mark Rutland , Josh Poimboeuf , Frederic Weisbecker , "Eric W. Biederman" , Marco Elver , Christophe Leroy , Song Liu , Andrew Morton , Uros Bizjak , Kumar Kartikeya Dwivedi , Juergen Gross , Luis Chamberlain , Borislav Petkov , Masami Hiramatsu , Dmitry Torokhov , Aaron Tomlin , Kalesh Singh , Yuntao Wang , Changbin Du , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [RFC/RFT] CFI: Add support for gcc CFI in aarch64 Message-ID: <20221219132731.6ng4sz2nv6ujvu7i@ubuntu> References: <20221219061758.23321-1-ashimida.1990@gmail.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Hi Peter, On 12/19, Peter Zijlstra wrote: > On Sun, Dec 18, 2022 at 10:17:58PM -0800, Dan Li wrote: > > > 1. When a typeid mismatch is detected, the cfi_check_failed function > > will be called instead of the brk instruction. This function needs > > to be implemented by the compiler user. > > If there are user mode programs or other systems that want to use > > this feature, it may be more convenient to use a callback (so this > > compilation option is set to -fsanitize=cfi instead of kcfi). > > This is not going to be acceptible for x86_64. I'm not familiar enough with the x86_64 platform, could you please tell me why this is not acceptable? Is there a similar situation on the arm64 platform? > > 5. The current implementation of gcc only supports the aarch64 platform. > > What, if any, are the plans for x86_64 support? I'd like to implement something similar on x86_64 later, but currently I'm doing this in my spare time, so it might take a little longer. :( Thanks, Dan