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.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,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 DCAF0C433DB for ; Fri, 8 Jan 2021 17:23:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96BE023A00 for ; Fri, 8 Jan 2021 17:23:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728417AbhAHRXS (ORCPT ); Fri, 8 Jan 2021 12:23:18 -0500 Received: from foss.arm.com ([217.140.110.172]:54500 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726749AbhAHRXS (ORCPT ); Fri, 8 Jan 2021 12:23:18 -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 662B111FB; Fri, 8 Jan 2021 09:22:32 -0800 (PST) Received: from [10.37.8.22] (unknown [10.37.8.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16B6F3F70D; Fri, 8 Jan 2021 09:22:29 -0800 (PST) Subject: Re: [PATCH 2/4] arm64: mte: Add asynchronous mode support To: Andrey Konovalov Cc: Linux ARM , LKML , kasan-dev , Catalin Marinas , Will Deacon , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Branislav Rankov References: <20210106115519.32222-1-vincenzo.frascino@arm.com> <20210106115519.32222-3-vincenzo.frascino@arm.com> From: Vincenzo Frascino Message-ID: <1e1e9d66-32da-6bb8-b4cf-91c03ea90180@arm.com> Date: Fri, 8 Jan 2021 17:26:10 +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: 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 Hi Andrey, On 1/8/21 1:36 PM, Andrey Konovalov wrote: > Perhaps we could add a generic arch-agnostic enum to > include/linux/kasan.h and use it in both arm64 and KASAN code? > > enum kasan_hw_tags_mode { > KASAN_HW_TAGS_SYNC, > KASAN_HW_TAGS_ASYNC > } > > Assuming other architectures that support memory tagging will end up > with sync/async mode separation as well, this should work. But even if > that doesn't happen, this interface can be adjusted later. I am fine with this solution, I will add it in my v3. As part of the enumeration I will add READ_SYNC mode as well, so we have all the possible combinations. -- Regards, Vincenzo