Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2526542iob; Fri, 6 May 2022 05:04:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQdyHEJWD+wt83HU0aFtUmzrx/L/iHkbdwdu1+QOwgzZedDHEa78l6dCqM2fQ4/KK82OGM X-Received: by 2002:a05:6402:2995:b0:425:d3a1:28aa with SMTP id eq21-20020a056402299500b00425d3a128aamr3124532edb.247.1651838641849; Fri, 06 May 2022 05:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651838641; cv=none; d=google.com; s=arc-20160816; b=uZRNbY9il7TQAwTTQXx5FL8sciHcuiNqwtVhBvA4+ttFXTMlBH4EZ54AwTdsybuTjK Sy0KyYnUl+pCjfELZl0G7ORJHoBrI66jHdIhjzT7hK6yoHKnnS7boly7I48E9dHgD7wB iWBOONoUvivhsnf/QSc+Mb+mfhVX21Etlf1A9QY36Yk1ZJTOgZgjzJW5xEezVs49uVfx wfli+1NRHSj4QWh2cOhzKIbLPY28Xv+wlHAnsVAklY0SjB6wQIGc8b4ZXmbQQpzFWg+x g7OyyGAbx0CvfBipBeUDD1ilYI5XiGkCZ4HOTIwKJ2QzyuTkOvZAkwKIUbpsUtTGIjWu olXA== 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=rfQ3wFLudSyAVcYhy/IDVjHP+wEQPyVpR9aHM7jrE7Y=; b=jmcrbErZrEMr0JFUa3xLtZTvHereG5/pMx0CDTJi27lsF9Oeoq0YuH24sRwoWRnygx OaLt3P2/aY37dcS0qWNX/dAEeLeZisaz3CBeytWes7jemzfmxazlD2/LPf6L767ZiHE1 u7mlgXbcjG1s883V6qr6zg9+EUfs7b+pnNQos3mEoYkDp+zbKlQ9UJEoNKLWwyx1krUz 1RcIDIdJ6D8TOJTrxp40UFFvnGv69iiYpp9yf376IUAJnyIKXi+J8B/LU7+No/0eiMwM MfEtJOmiW93uD2YvMWpL5XwjXRXBMI84+Hrnfha59ZPC2g7JKosxf/bEIfZ4tdLf5d5o 9z3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=sw3JZLlE; 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 hq36-20020a1709073f2400b006f49faa49easi5343650ejc.974.2022.05.06.05.03.35; Fri, 06 May 2022 05:04:01 -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=sw3JZLlE; 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 S1349960AbiEEQz7 (ORCPT + 99 others); Thu, 5 May 2022 12:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbiEEQz4 (ORCPT ); Thu, 5 May 2022 12:55:56 -0400 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B03914AE0C for ; Thu, 5 May 2022 09:52:16 -0700 (PDT) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-2f7b815ac06so55389077b3.3 for ; Thu, 05 May 2022 09:52:16 -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=rfQ3wFLudSyAVcYhy/IDVjHP+wEQPyVpR9aHM7jrE7Y=; b=sw3JZLlEUvxXIbfiDbppduUwHQVv6t31IHX3OJUdmm5PWZiRUlPNBf9uXc7UUhU9kj n8wK3fbAWAbgSJ1ONS7xcHkFXO/ISm/HxkLEnSdYQ0ALSOw/4dXaZtfNOy/h0ta55j1l /wlHmLGGFrORYBuO21cB+SuthyaGjBCAt9vfgldo8hBl1LHw30uomfMRdy1RkOQuBXV1 pFUdSC9vpKmlpearNwbAp4MJ1G2cekiVhy4x2tt3zSPBLRRLDI2Y2y4f6DF5D41aVVcR cv0xveIl05fCjWu/Ur8j+9hYaccDQM7tZgXJDkt9xpl4Lc60ZQGUmW3llEBLobh41X12 oKGg== 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=rfQ3wFLudSyAVcYhy/IDVjHP+wEQPyVpR9aHM7jrE7Y=; b=1G7N2q1TBj8yl2xt1N/eEwWgH62cq96tbLWiSUeAp38NKuIEgmDxTSwDDfLa6j+wB3 FzkE80hycxiidlsOVrhTQNo1oNO3hJmOUorWt45li8uroxJnKjzGvq7fjHuiKa0MQCZ7 UYDOpeCMTqcsq04ET2X//l+xgmPkVzBfk+wIWGRF/Dyni1rCGa6ty+d2aZseLNtb7vOc hucqq8iBx/EnaxyI1ov3uz/8MlE80Vsxl9VRTKMuO8sGlfZPRPK31O+e1ZCbIs+AzQJJ +RqENcqEEHBjc9x7PbQyH86oSCEHRCLOpmT8ObTasliY1q5+ZpCsKl78uF1sfXRBm6qs +cSg== X-Gm-Message-State: AOAM530n37l/6vUzEV/cQHkoUlUKDUZmf0/58VbRNQpQZeR2SkTq+KNF 3Pelnn3iLiyGsH7qA5p9BukorEhE1eD7hY3C+uT4AQ== X-Received: by 2002:a81:1108:0:b0:2f7:bf11:3fb9 with SMTP id 8-20020a811108000000b002f7bf113fb9mr25421990ywr.305.1651769535660; Thu, 05 May 2022 09:52:15 -0700 (PDT) MIME-Version: 1.0 References: <20220429203644.2868448-1-samitolvanen@google.com> <20220429203644.2868448-11-samitolvanen@google.com> In-Reply-To: From: Sami Tolvanen Date: Thu, 5 May 2022 09:51:39 -0700 Message-ID: Subject: Re: [RFC PATCH 10/21] treewide: Drop function_nocfi To: Mark Rutland Cc: LKML , Kees Cook , Josh Poimboeuf , Peter Zijlstra , X86 ML , Catalin Marinas , Will Deacon , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel , 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 Thu, May 5, 2022 at 9:30 AM Mark Rutland wrote: > I also believe that in most cases we can drop the __nocfi annotation on callers > now that we can mark the called assembly function with SYM_TYPED_FUNC_START(). Good point, thanks for pointing that out. I'll add these to the next version of the series. > There' a latent bug here with the existing CFI scheme, since > `kpti_install_ng_mappings` isn't marked with __nocfi, and should explode when > calling `idmap_kpti_install_ng_mappings` via the idmap. The CONFIG_UNMAP_KERNEL_AT_EL0 version of kpti_install_ng_mappings is marked __nocfi > There' a latent bug here with the existing CFI scheme, since > `machine_kexec` isn't marked with __nocfi, and should explode when calling > `cpu_soft_restart` via the idmap. But it's indeed missing from this one. Sami