Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2423024pxb; Tue, 23 Feb 2021 06:48:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuDvbISCdboVHFgin+jQQ9log/Al9Bq0A7FJjlVeoD3RRDwtZ4ZpFX20+nC1navKSVW/M1 X-Received: by 2002:a05:6402:22a8:: with SMTP id cx8mr29277475edb.376.1614091709327; Tue, 23 Feb 2021 06:48:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614091709; cv=none; d=google.com; s=arc-20160816; b=hgnJrl+DmLaH1HUbGjP7jU9az/B3YNOHRvwzktxGPUuQKXeNBR8IetVk0NIxHle0Te WixTG7E5bknddvR/EBxVQbgC9pGh9mYOuNAjUtg8AYtGLoAHeF/UPvzlK4+Qk0Lrcfg0 AYzGlvISXPwRg+IkJ+jIIux26mkk6/DpB8aICq+EAymemGprYcACWHwQcZAP9mErCDhF XPAxNDQk2OeO/uvd+IeRF9EV9hNrbnLDxZYhkyf7so57pqvOsfqO/qnCOHYSc9WS90HV 5qklAjsjqRYq8FOoMWKIq9+QDbhkDrWKGhcYSmj0S+TsJwInyQVDQUTo0vRW4Aap7gdJ WNYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=GZqBYwx2y9FE9Ziq4+OKl0cRPbE5Rtru87ojPxiAYl0=; b=nhpZglG+O4WFDCd8dWWLkFEBwVeasTyskHEZNozZuDgTpG5fFEXY7FblLEiIv4XP/I q8/Fd3UF8D0vezXz58zjyFy/Dl1qGLTV3HuCl6F1KDCAwFcL0hQzcmowgZK7zIaJcJD7 8uEUek6JFnfS1VAASkaV+5ZzsGzpeFagOHT/W5GBUHgaBHSXse3sT9R7iuK/wSWsPQ1B HvOZVfAQ/2t61qFvO5kN94SG13YQFIl+fgtifLBlZ/ob/hfDGLgc9gMAsLa9RWEyJYN0 u438Y2VLRqFikTfF7HpRZdgIY4aElfb5HPDo+8Uxu5FZUdS67uUmyESHgAx6noI6b5BL OVFg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si14456748edv.313.2021.02.23.06.48.05; Tue, 23 Feb 2021 06:48:29 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232718AbhBWOVt (ORCPT + 99 others); Tue, 23 Feb 2021 09:21:49 -0500 Received: from foss.arm.com ([217.140.110.172]:52494 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232313AbhBWOVs (ORCPT ); Tue, 23 Feb 2021 09:21:48 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F3DE71FB; Tue, 23 Feb 2021 06:21:01 -0800 (PST) Received: from [10.37.8.9] (unknown [10.37.8.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 03D8B3F73B; Tue, 23 Feb 2021 06:20:59 -0800 (PST) Subject: Re: [PATCH v13 4/7] arm64: mte: Enable TCO in functions that can read beyond buffer limits To: Will Deacon , Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Andrew Morton , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Branislav Rankov , Andrey Konovalov , Lorenzo Pieralisi References: <20210211153353.29094-1-vincenzo.frascino@arm.com> <20210211153353.29094-5-vincenzo.frascino@arm.com> <20210212172128.GE7718@arm.com> <20210222175825.GE19604@arm.com> <6111633c-3bbd-edfa-86a0-be580a9ebcc8@arm.com> <20210223120530.GA20769@arm.com> <20210223124951.GA10563@willie-the-truck> From: Vincenzo Frascino Message-ID: Date: Tue, 23 Feb 2021 14:25:14 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210223124951.GA10563@willie-the-truck> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/23/21 12:49 PM, Will Deacon wrote: >>> I totally agree on this point. In the case of runtime switching we might need >>> the rethink completely the strategy and depends a lot on what we want to allow >>> and what not. For the kernel I imagine we will need to expose something in sysfs >>> that affects all the cores and then maybe stop_machine() to propagate it to all >>> the cores. Do you think having some of the cores running in sync mode and some >>> in async is a viable solution? >> stop_machine() is an option indeed. I think it's still possible to run >> some cores in async while others in sync but the static key here would >> only be toggled when no async CPUs are left. > Just as a general point, but if we expose stop_machine() via sysfs we > probably want to limit that to privileged users so you can't DoS the system > by spamming into the file. I agree, if we ever introduce the runtime switching and go for this option we should make sure that we do it safely. -- Regards, Vincenzo