Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6561674rwb; Tue, 9 Aug 2022 18:38:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR7LU0NGOrO8XhlaAocKr0xOjAjmg864IzP6Je871+uigUs8ytrHsV6Of5jGRHyMe3xi5Xlz X-Received: by 2002:a17:90a:fe06:b0:1f3:547:1b31 with SMTP id ck6-20020a17090afe0600b001f305471b31mr1274955pjb.114.1660095512270; Tue, 09 Aug 2022 18:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660095512; cv=none; d=google.com; s=arc-20160816; b=kNb3gske8yIhwZYDgYWOSlNAVwSPeRJnoDyrHP+rGG4trlKnFsNYsoYMfgXQxtWgmC QumaZegIjZLBBVK5sSxDo3I73ZELY7StVyh+wUb5f9DoVj8Z23MTrtsjl+2HlR/r8aKR HSoA2VWjtUwxSXeLvow5Hh0hqm5fDCuENg7n2by/suL6TOqGPOtcw9En7nDsATX6t+oL Wz6UhwUv/TXVOVBcVIjQ0DVCtqR/yHYbuNt4RYDhyhbmnLTCHt4dqvSreTqaAOZlIbud fiTn7TVQQeq4qaqFpAaZlE2cCuNF0vAn1SQN+9oylpp7CoKPhxfNfN1YF/nCtiQJdRSG LwMQ== 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=mXbQNg6xL4amK0e8t2R+lhFBx4wz53d/3c+qVrE8XHQ=; b=c8/FFsIAGbFt5evGgwYPgdapGl5CJwAT5K/oM0UHxC7kr5ptaBrYCGxaXqarU1DMGi /a3tN76TEnVPvMf4z2uJfuZRYvb4Gc92+Y7OZpsn3ti2upNpQPByYySgOlknE7ob9z7k dy8oMKPEj06WQ21Zo45mvi+7xafdeBAmkgvP2ulHFkuImXI6/DQkQ6kUfCMxxXENFOZ5 QFCeRmBhedmlKu28W9lWVbiaA7XC4YMxrzyrUhXTFgE/0FJFHyBdb5pUObcFCJ0QAyx/ VKe7QfokZp+EletZsIP83FvCCMVQO+e4uCfAnoKURCGGvEgeMhRIeXmaH3RD54nFdib3 fK9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="op7XGQ/C"; 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 n18-20020a056a0007d200b00527f8a9d158si1030042pfu.178.2022.08.09.18.38.17; Tue, 09 Aug 2022 18:38:32 -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="op7XGQ/C"; 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 S229636AbiHJBZE (ORCPT + 99 others); Tue, 9 Aug 2022 21:25:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbiHJBYh (ORCPT ); Tue, 9 Aug 2022 21:24:37 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A3EE60686 for ; Tue, 9 Aug 2022 18:24:36 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id v3so16188901wrp.0 for ; Tue, 09 Aug 2022 18:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=mXbQNg6xL4amK0e8t2R+lhFBx4wz53d/3c+qVrE8XHQ=; b=op7XGQ/C392xu2zrnE49ze1FL2X/BB3TSORunubDIWKmitp1TLcY6O90TfdNYXvIW/ I7nWo69gvFaL3WiOO7zePx5tpo2DJNfPXcdSNBZYKedmn0vrrNrh7n7zFL+Def1g2U7/ fMUlVyAIFFHQR74Wfsfp6J21m1Y35D2MyCLOOIKEKnJToIz3tp/+fi7Ap/jiLfKkvDaz mAp9Zz851/7pQPHSJXlCxdQq8uKfxguAT27V+Hze0qDBI896Jia8hJShF/FbA/RBLlhK elLfNrOA702fCyHYKMBhdUEr85bN/XPjGgenSxWZCDEhg3PzcxR2Hf0b5J+V7D6IagQd wqkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=mXbQNg6xL4amK0e8t2R+lhFBx4wz53d/3c+qVrE8XHQ=; b=TRQmdvGMtoFG6AH6xtt0lX+hw8N+w/6hb4P+EmJogjjOT/N8m/Kql/psRX+y+BnjJs Ee+zjmDPnZXDhtwYTrmghJNXA2ToehncK+hPontIWSUGOf9Us3Kuj0KyNk2ub0xSVW3Y MJ0FPSwpXP8zxEYK+kgxryKC+dTkxl5rzQLAU7HnqZDILb1HEDu8FjhAyfPc/LVnWHID fSwXZZQTPiqEvvHltC72/bn5zfPrvMIEIL0ggZ27PzJogAzK2xausOIwKd5KsktbW1hR j4vks7D5hYyepPrLoiYtEab1CfAamH8vXMZ1b/Ql559wjgp1JPpcFijmEhV+K7HNpEqw cRQg== X-Gm-Message-State: ACgBeo34wmtefwmVO6q61cCX5orMRLnXEcB4GPKqY64l/3aw7Z44kZEv fxUdF5JuyQbxcDjjaFvgRhdTTXkuzcDlxT7wuHWwIQ== X-Received: by 2002:a05:6000:1869:b0:220:639b:8337 with SMTP id d9-20020a056000186900b00220639b8337mr16291929wri.572.1660094674949; Tue, 09 Aug 2022 18:24:34 -0700 (PDT) MIME-Version: 1.0 References: <20220805214734.1937451-1-eugenis@google.com> <875yj1x0k0.wl-maz@kernel.org> <87v8r1uztz.wl-maz@kernel.org> In-Reply-To: From: Peter Collingbourne Date: Tue, 9 Aug 2022 18:24:23 -0700 Message-ID: Subject: Re: [PATCH] mte: Follow arm64.nomte override in MMU setup. To: Evgenii Stepanov Cc: Marc Zyngier , Catalin Marinas , Will Deacon , Vincenzo Frascino , Andrey Konovalov , Mark Brown , Linux ARM , LKML 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 Tue, Aug 9, 2022 at 10:29 AM Evgenii Stepanov wrote: > > On Tue, Aug 9, 2022 at 9:49 AM Marc Zyngier wrote: > > > > In which case what is the tag memory doing in the linear map? > > Shouldn't it be marked as reserved, not mapped, and in general > > completely ignored by the NS OS? > > That would be wasteful. The idea is to only reserve the parts of the > tag memory that correspond to the TZ carveout and release the rest to > the NS OS. More generally, one can imagine a system where *any* tagged memory transaction can result in an SError because the MTE implementation was not configured by an earlier bootloader phase, e.g. because the bootloader was configured to disable MTE at runtime. On such systems, the kernel must refrain from causing tagged memory transactions to be issued via the linear map, and that's exactly what this patch does. Peter