From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 388A6C05027 for ; Wed, 8 Feb 2023 19:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3imIibWStWtv2DpR8nUYqclMJgbkLbjB4WS670dIIG0=; b=whH+JzV1qoCA9d dxz5If0vmcfTtYb+8ZOcFvrQvT8j+Z7dw1aLUzEe9jatyk91qVyd9ouRWPjEEVcLjzsX38XsUOht0 sKVqqYBeHOK9hjP+LFCyrtjSAiCwQfaSQqM02YLwtUgjV1r0fyoLaEUSKikHOx6r9bJd85DP3CyOM 5i9winAwioStiUjnM+0F5eET8P5Wrs61XfaRnS6diw/YI3BaDvvfR67OsjgvVU2cIMFLCnwBhk7FM eW9wb0mr6Ot0HyxtUwMqHjDV9CmkExIVV8urhm0jbNE0UCSDDyk60q3gDrGYYrAAxnTphMFKtAY7S p5u9cAD3OOCMyLrrF1wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPqEJ-00Gkpl-Jp; Wed, 08 Feb 2023 19:35:43 +0000 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPqEF-00Gkok-RO for linux-arm-kernel@lists.infradead.org; Wed, 08 Feb 2023 19:35:41 +0000 Received: by mail-pj1-x1035.google.com with SMTP id o13so19421026pjg.2 for ; Wed, 08 Feb 2023 11:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=fAJlaNEf9h29bd8ZkCwxz0tgZ1g6+/vtKmnhDMYhw14=; b=Z+ropjWaZw/qeE6gBW6+idTTpgNFbXec1UuKtNv+KwRvRqvYww0Qyw82gl8VdUjD1B ACJF5dPWNYsUa7aR3pW85ooqgpccPNH1Dp+kQZnlxlvvSNCHRIPzJc8csModV1rzyDMD 0ekiiqa5qwsESerHQbxFrAQkqMUH4COBTL4XE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fAJlaNEf9h29bd8ZkCwxz0tgZ1g6+/vtKmnhDMYhw14=; b=nh3MmlS4em+SeOCcda6p8Tk6y4JjUkHcm7+0asRLDVn5tRAkoy7KGTk7eH9TkA3NrM PM1tWPK/ulGXX+zw3a7CIK5W+liWpInN92mjb53qgK3v2cf8c3PMbuWIDkGGEzhInCNh LpLwVfj5oL9wPmg5O0WeZ5NFfu7pCQVA808WSBSQPvNX8cOBKji9viMnkRDpdgLkP9Bw HtM/+xYSW/VIo9+ZbFZXjTSX0v94I1WPe83W8w4wubnELQ+CajdRIqtfSYc1azvrI2d3 svJC7IvcJaj0opYkvA0GHBt++lPh4x2EBMdIqKq4YZempxhECfX6rQBE2glXamhpqvK+ 3/1g== X-Gm-Message-State: AO0yUKXsA8ppukQ0KZZdsKiyKUBV3ZFREFrLvF9AjQLpj3kjL9FZA2nr qFLYvMbRBgh1dikAAGBySfjWMQ== X-Google-Smtp-Source: AK7set8GfKiDufztTpkuEDYL1b8u28pgvoPHLFhPAmA2kCMFZHHpGOh1C22kzQkvkpANzp/CQdvA0w== X-Received: by 2002:a17:902:ced2:b0:199:fc6:9a9b with SMTP id d18-20020a170902ced200b001990fc69a9bmr10210092plg.17.1675884938273; Wed, 08 Feb 2023 11:35:38 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id iz17-20020a170902ef9100b001990e1aeae4sm7268564plb.47.2023.02.08.11.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 11:35:37 -0800 (PST) Message-ID: <63e3f989.170a0220.60c91.c5ce@mx.google.com> X-Google-Original-Message-ID: <202302081133.@keescook> Date: Wed, 8 Feb 2023 11:35:37 -0800 From: Kees Cook To: Dan Li Cc: concord@gentoo.org, linux-hardening@vger.kernel.org, Peter Zijlstra , Masahiro Yamada , Michal Marek , Nick Desaulniers , Catalin Marinas , Will Deacon , Sami Tolvanen , Nathan Chancellor , Tom Rix , Mark Rutland , Josh Poimboeuf , Qing Zhao , "Paul E. McKenney" , 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 References: <20221219061758.23321-1-ashimida.1990@gmail.com> <20221219132731.6ng4sz2nv6ujvu7i@ubuntu> <202301061929.6881F6CD40@keescook> <20230107154213.ocyghxd2k66gbvv6@ubuntu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230107154213.ocyghxd2k66gbvv6@ubuntu> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230208_113539_904924_41D3C23C X-CRM114-Status: GOOD ( 30.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Jan 07, 2023 at 07:42:13AM -0800, Dan Li wrote: > Hi Kees, > > On 01/06, Kees Cook wrote: > > On Mon, Dec 19, 2022 at 05:32:04AM -0800, Dan Li wrote: > > > Hi Peter, > > Hi! > > > > First of all, thank you thank you for working on this in GCC. This will > > make a big difference for folks that don't have the option to build with > > Clang to gain CFI coverage. > > > > As for the implementation details, the core issue is really that this > > type of CFI is specifically designed for the Linux kernel, and it took a > > rather long time to figure out all the specifics needed (down to the > > byte counts and instruction layouts). GCC's version will ultimately need > > to exactly match the Clang output, or Linux is unlikely to support it. > > > > We're already on our second CFI -- the original Clang CFI was just too > > clunky for long-term use in Linux, so unless we're going to improve on > > the latest Clang KCFI implementation in some way, it's better to stick > > to exactly byte-for-byte identical results. The KCFI support in Linux > > depends on the arm64 and x86_64 runtimes for catching the traps, and the > > post-processing done (on x86_64) with objtool that prepares the kernel > > for IBT use, and converts to the optional FineIBT CFI mechanism. With > > all those moving parts, there needs to be a very compelling reason to > > have GCC KCFI implementation differ from Clang's. > > > > Hopefully that context helps a little. I'm excited to try out future > > versions! > > Thanks for the context, it makes sense and helped me a lot. :) > > In the next version I'll make the gcc implementation consistent with clang. Hi! Just checking in on this, since there are a lot of interested folks. :) What's the status on the next version (and has anyone been found to tackle the x86 backend part)? Is there anything we can help with? Thanks! -Kees -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel