Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2403559pxb; Tue, 23 Feb 2021 06:23:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9PUpw0dazJj5F301T0jeua15Vkw7o3jHiOBxj2+VCSk+ZyqGlGJBxnXb8z1IETfiIXdlo X-Received: by 2002:a17:906:792:: with SMTP id l18mr25674428ejc.198.1614090213852; Tue, 23 Feb 2021 06:23:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614090213; cv=none; d=google.com; s=arc-20160816; b=s1mryTJbWW9yYWCWwU0HEYh6gqRoOdN5S/gYZFqzSbDV7YU7pqS6330SayJ3Cxy4Fr b9B8JRL5WOlxSMa7TrhVRghO2qmXQkj5la9R2l2xt7JgRd4DOcyrmDVxZiBXHm1zxri4 kvTMo1aJcrylE3Mqtc9ymU6jSE0C5KpP/LdsZuiD9MRU6+c1MDmTAXhOipwyKh/L3V2F F1bGIgnHtJLGvD3oQQwDXFS93XgZ9blfuq8UBnVQ8pQV2FsTvQhhFmWxMeVfgIzXmu84 0+sg9jQC/pYnRdWZK2PLwd4n4zAIWQvTy0LiokhxNQeABHpXVwDyFp97uxkdkpre8u7L odCw== 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=iTQvOA6RIK/62AjpK/6mpJWPQkVh3Hcfm2XaqHfpnuI=; b=KoLT45RZWkBqWDTM6zl5+h2483/IN/iN0Wl8dDDJsygmd6RgcG/fa5wr3POa5n8qMA yZl4LcvagcgeovhlJ/r5PTa+LXHeN4lSO03oT/pdZwhg+X7xQPpQmzTvLVGxzQuRMAZy i5TLgljN+1E5i8R2NCtPnhYOCoN+F3nR1gceg3MxQO7g3gjmeLo6HYagmZyNZN/TIcas H2O+kqVoHZFzagW0IPsr4pl6I5hoknMWHDmmvT/RzrMBQwH3yN8mhPFd3awwRDHtczwR xdAZ0um7sHD40oh433PpWYYXBunzUCnWW1HuVqtoOvB70DvoqKJjffHgAsL2S7E9/NmT 9b0A== 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 a26si12939001edv.427.2021.02.23.06.23.09; Tue, 23 Feb 2021 06:23:33 -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 S232250AbhBWMTC (ORCPT + 99 others); Tue, 23 Feb 2021 07:19:02 -0500 Received: from foss.arm.com ([217.140.110.172]:46614 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231403AbhBWMTC (ORCPT ); Tue, 23 Feb 2021 07:19:02 -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 9676831B; Tue, 23 Feb 2021 04:18:15 -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 C54B63F70D; Tue, 23 Feb 2021 04:18:12 -0800 (PST) Subject: Re: [PATCH v13 4/7] arm64: mte: Enable TCO in functions that can read beyond buffer limits To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Andrew Morton , Will Deacon , 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> From: Vincenzo Frascino Message-ID: <6865788c-7e63-fbd7-bb88-ba01eafb2f63@arm.com> Date: Tue, 23 Feb 2021 12:22:27 +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: <20210223120530.GA20769@arm.com> 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:05 PM, Catalin Marinas 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. > In such a case we might need to track the state based on cpuid() and have a mask that tells us when cpus are all sync. Not as expensive as stop_machine() but still requires a valid use case to be introduced according to me. -- Regards, Vincenzo