Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp477558pxb; Thu, 21 Oct 2021 03:28:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ13a0yayZZPB4TGYnHaQ2WbYV7W3N6hTDYjRT0HcrOWVbnXqB1s0tlGEKfotNYhb4Bd/g X-Received: by 2002:a05:6a00:22d1:b0:44c:f752:a216 with SMTP id f17-20020a056a0022d100b0044cf752a216mr4781393pfj.45.1634812114072; Thu, 21 Oct 2021 03:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634812114; cv=none; d=google.com; s=arc-20160816; b=teKzU04fKYeJz1bY3Df0u1ePQjKRp7zSdCwSEnS5AQP0G1HRT/YEO/vgbmg07156jA qT3/39oz8fLM09XzNt7vBhuS7FPHNRmjJmori+zTEcKocR2cPo87bZfqiilIhAv7O+2n hajp5mlZMud4ZfgAGWd92fx05RO4Q8FayXZexlviURYCatlgsaAlGsJTVvAnzOUO1eJA ZhmmGG4NJMQz9gg3QnHLuMrVTBloarDstNmivchX5HvG3r8iiwPeXpvFobPFr4lfaEi0 Mb/4MFlooHj24/tg83wOJ/pwrZf9KfPXiURN0kc9mg3SHHEqDFy9B8Vle8By1LEJYRNg FuDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=u9dXeRHmyJjJ/lRfD7FnZKxrYeIO9pbRnhaEFiIApHA=; b=NYK1cKOaXKH2Uzv5hck1CW++xCIZ5dKuj0V2pIeHNksbNV7q1gBVhA6I3BtI7gUUU7 HlAv5voErDZQa6kcfvdcfkSYafLDtt1CzACzxaX7CNHQk0qt+wM0sncS7J0IB4h/NNXc ANH08QNq2lCA+HREBAjn6ldF0sb1VQ/2E8AVZrHP9EToogIZIN638Pi/zcBZ4vBVhuGx 4dThwBy0Y2UMTxyPMfYijqpKLTUuM7UkooZkHfZhUVhWP2+NnBEIIcTBpGZkoWRpBaLU XfQmnK4E9w/YRRDCQYtE2dAWnTKKf8AbV71hz1uUSp93Azrpj1ENKHfOgPsyDCGh0+Ee 71nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b="gF/MS+Rd"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si6429733ply.108.2021.10.21.03.28.20; Thu, 21 Oct 2021 03:28:34 -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=@pm.me header.s=protonmail header.b="gF/MS+Rd"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230117AbhJUK3h (ORCPT + 99 others); Thu, 21 Oct 2021 06:29:37 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:56812 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbhJUK3g (ORCPT ); Thu, 21 Oct 2021 06:29:36 -0400 Date: Thu, 21 Oct 2021 10:27:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1634812035; bh=u9dXeRHmyJjJ/lRfD7FnZKxrYeIO9pbRnhaEFiIApHA=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=gF/MS+RdqblRdgH+fw/8LduG7fvCXAKuqA0bgpPF+hbc0/+Kw69rDI1cuvnLasAuU 9+S6pR3opgbGDcWGcqQeLFFkrkDoQMYg45kX+cyZ8FYKTtRgNAsFbWTLmTa4rRK/4P 5lw7SdMy256qFG54vaXLhgzJqMqR4Bnu1aM2J4OUMZbdFqa9rg7VgoYWGX6wK4UYCA tlCabXp35jPeuuDvo29ZNMTmMKKvfxtZMS66Hg1jRt/rGMnIApHYp5rdQP3OwY65CO eiyFjjGgaFZOeS042BBFKN6waG6Ymg0aqB5+FZD8DwaMhAtIRtDRTYPhLcPiHrU4Jq zR+bwdYwEAUdg== To: Sami Tolvanen From: Alexander Lobakin Cc: Alexander Lobakin , Kees Cook , Josh Poimboeuf , Peter Zijlstra , Nathan Chancellor , Nick Desaulniers , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, x86@kernel.org Reply-To: Alexander Lobakin Subject: Re: [PATCH v5 00/15] x86: Add support for Clang CFI Message-ID: <20211021102033.113197-1-alobakin@pm.me> In-Reply-To: <20211013181658.1020262-1-samitolvanen@google.com> References: <20211013181658.1020262-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sami Tolvanen Date: Wed, 13 Oct 2021 11:16:43 -0700 > 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. > > You can also pull this series from > > https://github.com/samitolvanen/linux.git x86-cfi-v5 [ snip ] I've been using it since the end of May on my x86_64, so for v5 (with changing retpoline thunks prototypes to opaque): Reviwed-by: Alexander Lobakin Tested-by: Alexander Lobakin Thanks! Al