Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3752468pxb; Wed, 13 Oct 2021 12:11:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzw8NeWxIN+7CpjQ5fgcac9ZnqkhAVG79ptv1hjtefySv60xtnsFBcVKu714rIyLYr/U4K6 X-Received: by 2002:aa7:843b:0:b0:44c:53b8:54bd with SMTP id q27-20020aa7843b000000b0044c53b854bdmr1164347pfn.22.1634152317778; Wed, 13 Oct 2021 12:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634152317; cv=none; d=google.com; s=arc-20160816; b=aMGlvm4I725YHE9rfP4yXqsicC7yHn/icCw4Jkx5TzPcLhrE210bqpxLMoe5raC5Va D2xbkwSydmPG/meUk9cJPE3WpDJQRqUzpEXr9qFRF2DCTgF1T2sL2d0I4Z34AoKEnd1w PAxbsQdcku6O//yHc5nT8gbt+5/v6fOaNt+BtffR+BtVvunF02GLQbvX4OfyFCt0zcvH En6sdMNsk9NWQ9G/KtnQfzsHiZLWhGcSj3PGSeOYMmjg/1JFDIu6w9cwTGK1QMsP3ryO 6E25rfELHK9zF1iXd59gWS1DUy5rwS0XtcqD2qPDgS5TWDrvkveWUAWlXO3iw7tKs9at zXsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aFfFeFW/0U/lTkuA5hA19RCe0PU9m7+GEoH8ufhonLE=; b=ekXMDpwASPpOOi2B4XbScdNahj5Rsl5odRh29UTRH1N1Hr13ixz57Avsce67mWiNaS 9zGtYZwJs/K8IOireHdQXk0LUiDh8mZDbFMGfZF7MLQdfbVlnD40bPRbpFpjVnGWTMDS UmHP8i0Z5F+wCw3H1Jqco1+kWE5qgyp3Q6BC0439zZ+sxuvEj4lOAQnt9nemAfbQ8zTn MxyN+a23HmXo2DfTX5ipwPjCPdLfslk2fDwVJoGMMglrhtxQyxCx7QSCgAPwTI0Q2f3+ VOiVs55T6MkJ/Mr5mbNkmiWIGh4oHL725xdR0YTKQPLnfmr9ZcO6/K2yQleaeJAdHtwm Tulg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lXTG4x+Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 17si502685pgq.271.2021.10.13.12.11.44; Wed, 13 Oct 2021 12:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lXTG4x+Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239014AbhJMTL7 (ORCPT + 99 others); Wed, 13 Oct 2021 15:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239161AbhJMTLy (ORCPT ); Wed, 13 Oct 2021 15:11:54 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F277C061766 for ; Wed, 13 Oct 2021 12:07:53 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id y1so2471662plk.10 for ; Wed, 13 Oct 2021 12:07:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aFfFeFW/0U/lTkuA5hA19RCe0PU9m7+GEoH8ufhonLE=; b=lXTG4x+YLiIoWc4IXi2OJS/ALL9MYhs6CDCG5pMw0BUS7Jc80EUj80BVazu8NRJboH LUf8eT8d9WO52nesOw+iWiEUlQCceoDZQpeC93cZLxhKd5Hi2MqUyvshrxwDDzTK16yX GK2sYrjjuWBvpYgQV5LtJVStwCzUIPMpFfwTs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=aFfFeFW/0U/lTkuA5hA19RCe0PU9m7+GEoH8ufhonLE=; b=4vOGrExQ+njUcD+fvwUacmJwfqix2S/KDOvnprCvypGjafUdYETrg6eFf3dTqO6PVE 0hyJAkOXaJwRk6DUejjyWR1Y46ASJlGkFB9on9IEZ33hIDuRt2A925PvXXVAiX82Lirl V1fMf26COxSg8L1mNTqGDe+U0CFTeadcqMXlzCTDZDIoFLWpMLDvGOtXCwqCNpL/6jqG F87VUlcChEUa+CWzrO3k039Oe6Ol5jPVpXbWhCVCOfk2b62M9d9m/n5HjGRQZ21pioaR Ua2TVMT62/80D8YqAgkyHLn1kTYHEXWbHOKFgKEgseT7boyQS4UMk44VNi9g2EIPFpFV 14Rg== X-Gm-Message-State: AOAM530u5VX5vgAV7pFdtNo7Uw24nq11REIOZuobkHw5smDC6db8I6em vGtUcpse9WksvTN3SKnd9qU8Aw== X-Received: by 2002:a17:90a:10:: with SMTP id 16mr1218998pja.50.1634152072795; Wed, 13 Oct 2021 12:07:52 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y2sm262614pjl.6.2021.10.13.12.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 12:07:52 -0700 (PDT) Date: Wed, 13 Oct 2021 12:07:51 -0700 From: Kees Cook To: x86@kernel.org, Josh Poimboeuf , Peter Zijlstra Cc: Sami Tolvanen , Nathan Chancellor , Nick Desaulniers , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v5 00/15] x86: Add support for Clang CFI Message-ID: <202110131206.9D4B6A7F0@keescook> References: <20211013181658.1020262-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013181658.1020262-1-samitolvanen@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 11:16:43AM -0700, Sami Tolvanen wrote: > This series adds support for Clang's Control-Flow Integrity (CFI) > checking to x86_64. With CFI, the compiler injects a runtime > check before each indirect function call to ensure the target is > a valid function with the correct static type. This restricts > possible call targets and makes it more difficult for an attacker > to exploit bugs that allow the modification of stored function > pointers. For more details, see: > > https://clang.llvm.org/docs/ControlFlowIntegrity.html > > Note that v5 is based on tip/master. The first two patches contain > objtool support for CFI, the remaining patches change function > declarations to use opaque types, fix type mismatch issues that > confuse the compiler, and disable CFI where it can't be used. x86 folks: I'd prefer this series went via -tip, but I can carry it for -next as well. What would you like to do here? I think it's ready. Thanks! -Kees -- Kees Cook