Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2315040pxb; Tue, 23 Feb 2021 04:12:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHrnR5j19Fw4XrVNVtyc6wUgBQNJdDUcx4CxmqXJFQCtoozCdwa8hG2rrBA6l1EfpXxkR0 X-Received: by 2002:a17:907:3da5:: with SMTP id he37mr25745437ejc.300.1614082367158; Tue, 23 Feb 2021 04:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614082367; cv=none; d=google.com; s=arc-20160816; b=aX51RwPbUzUmhLAupDwavZ2aRBZqutV7M604oxL3qSNAYhFxlfeQ363X7uMacffmyW 4i8zbPX2HexBWaZ1SpfbRHNDNbKNi5Q/C5FSw++bt7lar/mzTHbQR9UsM96nOs15tWKO /itycEgpI7V/gBhIhvtwhXfgJQoKbVCOH2UZnCMg0WPN4AZ+OqANKltT6NyAnwg40cEj v6m2MyUYtG41uDrd4jhsQHRU/X4iRIm91gpRYDv7AS2efFytibt/ljdhcMs7LkbpXEfD NgZIpWoI7pguPXu1uEaNxuj52Mot05lkKEu/99Gg5SoP2b9eoGzeLyFDYYjToLZmtDmi cfCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DJEdqVMA5Xb7dfViT2xH1IfEX+edUnN6apkbMWdRj7g=; b=w6czEG9UqH410zxoet/EGNpdLxgjHiSUWT2JRM57ZUEur+Q2yJ1Qgmh0D4todxTgSD Swhi22fgncfRecU0zZFTrAuLb3zxbumlOIBaRYdCdo9amnvGdoc+EQksLF7AKd9x520h w+S6fYFjY/mIK/oH5LIycslBsYydrGGfx9ocjcilQgN40SnCzFASvkB29OFXPBd9emZf Lbk5YFPXgbD3z66k2LrC0zw1gVyBAtXjeMDgA2LMb/3TbTSt/2ycj3ixxLDb9JQZy6tc hNel1bazVbnkgZDIUm1/PhdVbU1GJlWHLOGkh+ln9f4cPWQgsU9j2cTjQYschgbhPBLE UsRA== 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 eb13si15219120edb.465.2021.02.23.04.12.19; Tue, 23 Feb 2021 04:12:47 -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 S232555AbhBWMIK (ORCPT + 99 others); Tue, 23 Feb 2021 07:08:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:41016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232666AbhBWMGR (ORCPT ); Tue, 23 Feb 2021 07:06:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 21EEB601FF; Tue, 23 Feb 2021 12:05:34 +0000 (UTC) Date: Tue, 23 Feb 2021 12:05:32 +0000 From: Catalin Marinas To: Vincenzo Frascino 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 Subject: Re: [PATCH v13 4/7] arm64: mte: Enable TCO in functions that can read beyond buffer limits Message-ID: <20210223120530.GA20769@arm.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6111633c-3bbd-edfa-86a0-be580a9ebcc8@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 23, 2021 at 10:56:46AM +0000, Vincenzo Frascino wrote: > On 2/22/21 5:58 PM, Catalin Marinas wrote: > > We'll still have an issue with dynamically switching the async/sync mode > > at run-time. Luckily kasan doesn't do this now. The problem is that > > until the last CPU have been switched from async to sync, we can't > > toggle the static label. When switching from sync to async, we need > > to do it on the first CPU being switched. > > 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. > Probably it is worth to discuss it further once we cross that bridge. Yes. For now, a warning should do so that we don't forget. -- Catalin