From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D0FAC433DB for ; Tue, 23 Feb 2021 12:09:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0867664E57 for ; Tue, 23 Feb 2021 12:09:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232631AbhBWMI2 (ORCPT ); Tue, 23 Feb 2021 07:08:28 -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