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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2D3FC433B4 for ; Thu, 8 Apr 2021 23:02:47 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5876161008 for ; Thu, 8 Apr 2021 23:02:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5876161008 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SjwXIU8X7alEqJ4KC1B+Kgbx9+gG9r2KBpHx8s62uMU=; b=fH8XCySxuIaJq0TC0dtHyrPdc eeqHQ9uuASEy6FqfDzH8OpejzUKtyIHhqVn3YsZSXAs8EdLOv9ahWarDsv6YcLTQdLA1T/QAgksB1 Ee9cAoo5DY+DYBWFUeuiB3zbqloYMANBkYgz5RvWZhH7Nbe+RYNIRhQADxmAjVAiLu/fFbITVsHjm O9mWVjnCbeYplzf4mKy1axOBTvJTQfSQeY0PXZ1FUt1YBC0/DlEVAmb2ki1q8ZDRJVbLmK4PExeUB ejPQs4yWEW9Ymg3W5wPuISO47ng2eocpPA3jwfBxmddXMw0naN4F2nokAPHfl8xrdazw273BZnAHm v/Mx1/+UA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUdd7-009Pod-Gc; Thu, 08 Apr 2021 23:00:05 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUdd1-009PmJ-2a for linux-arm-kernel@lists.infradead.org; Thu, 08 Apr 2021 23:00:02 +0000 Received: by mail-pj1-x1030.google.com with SMTP id lr1-20020a17090b4b81b02900ea0a3f38c1so5537269pjb.0 for ; Thu, 08 Apr 2021 15:59:55 -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=60tuWIbUjG0iyC8nYrQdXxsGuNpmQhEiUDZqyLR6c1Y=; b=mTnrJmw6Pc4S3mQP2I8SdRxPl0N5UkqJYhxgb56iNBXgYefgG11RdYQzPa/MB/dvPV jbLIhoH9o0hDGMLI5J3taqG+MEIgRNkMDDkUxbyMT5US7eZygaGqQIpeNB+TgGrghMRI gHQzdPXo0gJXu2PRuODNsA4Gmr8eePdCipd+c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=60tuWIbUjG0iyC8nYrQdXxsGuNpmQhEiUDZqyLR6c1Y=; b=QnnAS3cjSBT8yLlyZ0hIFBMWANH/tz/3mBuFhWIWuXAZSN1wSQzq5ObGcS0KvEsrTj ujTnJNNRso44IE/hQ4eBrggZmbQpik/tOsmlZgXXB9Igj2KORUzs8wFN/237wBYtC5nd dXh6ovy+TOApf4DgcVt25XsEykCQBLE0e5OdkWHVfxI20nQo9VxNoBVAuAf9DUOTCAOA N11gMzcXEF04J9Pc6PtoHFLRoS5GxvHVX0cV4ovHeBq3AqnUzLQHFrJC8RiGji6rTrLM z6lFn0q+YpSPTIcbknC9Rqpqi2T8fllBja6jIh+KfqA7BxX52GU0yk3GnFJ8Eysx219N e41g== X-Gm-Message-State: AOAM532JP2a+NjoxkmT8vXUKsiMDuH/WrXC/K9oKvDsQ0K6DhAp9LM8/ prHn+jlOTEM7YMWJi42SyxxcBA== X-Google-Smtp-Source: ABdhPJxpI62oGhUH5bf1MYiaJE6hoG/InXmCoxk2tAKn9J92fdY9RsD06VJoBDcDoxV3vya9jT2KOA== X-Received: by 2002:a17:902:7c83:b029:e8:c368:543 with SMTP id y3-20020a1709027c83b02900e8c3680543mr9895464pll.58.1617922794624; Thu, 08 Apr 2021 15:59:54 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q95sm368117pjq.20.2021.04.08.15.59.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 15:59:54 -0700 (PDT) Date: Thu, 8 Apr 2021 15:59:53 -0700 From: Kees Cook To: Sami Tolvanen Cc: Nathan Chancellor , Nick Desaulniers , Masahiro Yamada , Will Deacon , Jessica Yu , Arnd Bergmann , Tejun Heo , "Paul E. McKenney" , Christoph Hellwig , Peter Zijlstra , Sedat Dilek , Mark Rutland , Catalin Marinas , bpf@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH v6 00/18] Add support for Clang CFI Message-ID: <202104081558.9A5FE3A@keescook> References: <20210408182843.1754385-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210408182843.1754385-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210408_235959_456801_5E991B1B X-CRM114-Status: GOOD ( 21.30 ) 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 Thu, Apr 08, 2021 at 11:28:25AM -0700, Sami Tolvanen wrote: > This series adds support for Clang's Control-Flow Integrity (CFI) > checking. 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 > > The first patch contains build system changes and error handling, > and implements support for cross-module indirect call checking. The > remaining patches address issues caused by the compiler > instrumentation. These include fixing known type mismatches, as well > as issues with address space confusion and cross-module function > address equality. > > These patches add support only for arm64, but I'll post patches also > for x86_64 after we address the remaining issues there, including > objtool support. > > You can also pull this series from > > https://github.com/samitolvanen/linux.git cfi-v6 This is working quite well for me and it looks like there are good reviews. I'm going to toss it in linux-next unless anyone has objections. I'm very excited to start using this. :) -Kees -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel