Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3099391iob; Mon, 16 May 2022 13:04:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznpIH5EB6M62Iwz0YlKXC4VAEbsUoPSZeE/QXnt4Qq0zRdGrEphekOYEAIEJccpXsk5oi/ X-Received: by 2002:a05:6402:744:b0:42a:aecc:49e3 with SMTP id p4-20020a056402074400b0042aaecc49e3mr8177459edy.352.1652731480171; Mon, 16 May 2022 13:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652731480; cv=none; d=google.com; s=arc-20160816; b=n4BNgTjGb7Y3z5c0tdPVLelA1/zoqaaL9ySJVgrxyRuAIe2IkDC2vcQW7uy8kUnOpy dBTrto2rPsAjfYCZwOAeUbpqgDaGn4eOEs8bLK7PEe17j5thFSEXUnHrQFl/5ST2Q3mp TKOeMufMIHZOyyuAgzj3IaJn07KE6IqPPoHPdF5Q42QBC9rLp7YDw+XiPvplnhhTRJ1L QDAsBZ6UcAeTnm5AScdGhwYOADTiSt5Y7NxnHA/qd2Nkp7fdHsHlLmmmJtqvGkkEmrh6 H+NsedYW9mbiDXmEKfS4kZmv9K3vFsnVB+jmh76gU6+uOkaiLXN1zEU02dUrAFKRn8FQ xuOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RFls9zXfp5eTyiIQ+m2636iSt9xdwj1AtOgJeBph0LY=; b=F46E+0l6sq9Qil44fyBnGlxgodqhqLOvPDLl4jcGj6I7G2dlCymesEcMDVDfPgls5r VmfeoJhdoDpSptJqYxiwkHZSOTsvLH9s+klFQ2NgJItIFJhnQr37EbTSTUwVN1qd2sbD FlFjqOMQhYYLLs7C988wZR83N9/ITvcGx/QyN1B16NBcRGgZF9x/0o7q9Y1y0Bj8vaeS /CDNWqhiw2Aoz1VecWbin3FByVI8kPgHsIjM6uutyfueeICBhLnN0ni9ELROy1uw8ItV +8JTtmEQQ070DPG8NBaBEVJd+Yd4srSBu9HhTcncP5ilTPrs1IwBvUBgwfHujAbCE94n Y4eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YhXgB7NN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oy17-20020a170907105100b006f3b69318fbsi268453ejb.210.2022.05.16.13.04.14; Mon, 16 May 2022 13:04:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YhXgB7NN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343578AbiEPQZ3 (ORCPT + 99 others); Mon, 16 May 2022 12:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343573AbiEPQZ2 (ORCPT ); Mon, 16 May 2022 12:25:28 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84A1B39163 for ; Mon, 16 May 2022 09:25:27 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-2fb9a85a124so156020347b3.13 for ; Mon, 16 May 2022 09:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RFls9zXfp5eTyiIQ+m2636iSt9xdwj1AtOgJeBph0LY=; b=YhXgB7NNVPD0yB1cDQg/SXVjUhX8SLXmuhEnMy8wBpqtJx2W1ubPNizgIU8zF85A9O 4NabimscaxUtttPG7Gr13TcfobOte2BzOayOW/nlwMPCItIILzLtfLGgrw0uPqLvr1vN XhCPSDdmLiEtsD6yxSIRy5iwnZW/KIs5ZQCvm+r8msHjrgEmUHxjk2lQ6TIaPDXKbnYz sZhpeFcc2mDSmxSZpJ7TQKJHp4vjLedto83hHVkTNkoOpl6hYpxqNRN2G2PQWhl4aJCW EgK5oKNTRRk7HwbzJy09mdNldhGb4JoY04hsQgAJjG7sZFNeQ1kpT4ixGA+HzY9SOCsG 1lBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RFls9zXfp5eTyiIQ+m2636iSt9xdwj1AtOgJeBph0LY=; b=NNyg8FCSbjassiQ+NOrAqNZQzDWlV5T+ujGuTvQXGqr+4kz2pUhWyUU3ieerXxnZoh nbBus7+Y7zyGf4ceCtXEfOtsiADphg1h0zcbw6rvTrVb/Wgp5NhGIeN//PBjjbJzEjIW dJ5MNZPtdZugvYGHRUek+ZItNPYTXD7OOf31lW5YY2lW0qgM34bn0P2EpS0WWHmAW4VA YT28ZvPhE4icCRUHswp4xC67qUBQdpH1HHc1K7m27th/3CPJRA9o57O/dNYmZ7gxWx5O 4KzrqccWM1g2l+J40wiH5R2hU/+E+JBgMTiXSyZWjEMA5gt0cozA+atJhWqUxIp8aKKS OqYQ== X-Gm-Message-State: AOAM533aje+K+S17gTDIran/QacPEpg1cp3Ojzw0QZofcbcsf4h7i9t/ NZA5NntRgwecWIiaVgjkExN0Rwo6oYWJalPb4oIypg== X-Received: by 2002:a81:4ecf:0:b0:2fe:d9f2:15b3 with SMTP id c198-20020a814ecf000000b002fed9f215b3mr10961808ywb.305.1652718326620; Mon, 16 May 2022 09:25:26 -0700 (PDT) MIME-Version: 1.0 References: <20220513202159.1550547-1-samitolvanen@google.com> <20220513202159.1550547-11-samitolvanen@google.com> <202205141451.AABEE8B@keescook> In-Reply-To: <202205141451.AABEE8B@keescook> From: Sami Tolvanen Date: Mon, 16 May 2022 09:24:50 -0700 Message-ID: Subject: Re: [RFC PATCH v2 10/21] arm64: Add CFI error handling To: Kees Cook Cc: linux-kernel@vger.kernel.org, Josh Poimboeuf , Peter Zijlstra , x86@kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 14, 2022 at 2:51 PM Kees Cook wrote: > > On Fri, May 13, 2022 at 01:21:48PM -0700, Sami Tolvanen wrote: > > With -fsanitize=kcfi, CFI always traps. Add arm64 support for handling > > CFI failures. The registers containing the target address and the > > expected type are encoded in the first ten bits of the ESR as follows: > > > > - 0-4: n, where the register Xn contains the target address > > - 5-9: m, where the register Wm contains the type hash > > > > Suggested-by: Mark Rutland > > Signed-off-by: Sami Tolvanen > > It might be nice just to include an example exception Oops in this > commit log. Agreed, I'll add an example. Sami