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=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 09820C433DB for ; Wed, 20 Jan 2021 14:42:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7BF523356 for ; Wed, 20 Jan 2021 14:42:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7BF523356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wwfkAIuQrIlNsTtd1xFahMLFnEb1sxa9z4ieYJr/Ktk=; b=sbor3LZE0mEpGMZ7rbTQ5Nm/U zV8m0dYT3HlNFdaamEpx3PE3WT5rHnDu61XTEbygAjtN9r0E2eh5OX4MniUAmGUtZY9xSYfVHkNax XsTgf2QWW/7T15W9pY/OVTGB+biQx30MOXMEdw4GspY205sC9Gn5CLq1V5M3L9onXLJr7qnkdVpEw AB9IUAN9fscFAK0qlVvBvIsiPWIvF/eArlBTsp2k+a+dbIw3R7WTpyNi7q3sONoLWKzj400zViEZw Fw3ypI8oV2Pw9IdLBXesm1XbiE2F4C7G423qOHmKraTcGrPJP1oIgNZlB7CMdWsbxTZHh156mIx65 1GYcG062Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2Efj-00080W-2T; Wed, 20 Jan 2021 14:41:23 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2Efg-0007zZ-9w for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 14:41:21 +0000 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 C01D0D6E; Wed, 20 Jan 2021 06:41:17 -0800 (PST) Received: from [10.37.8.30] (unknown [10.37.8.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CE3F33F66E; Wed, 20 Jan 2021 06:41:15 -0800 (PST) Subject: Re: [PATCH v4 2/5] kasan: Add KASAN mode kernel parameter To: Andrey Konovalov References: <20210118183033.41764-1-vincenzo.frascino@arm.com> <20210118183033.41764-3-vincenzo.frascino@arm.com> From: Vincenzo Frascino Message-ID: <555f43d2-2753-b8b8-5ca9-53bc580c9def@arm.com> Date: Wed, 20 Jan 2021 14:45:05 +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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_094120_401228_F807F82A X-CRM114-Status: GOOD ( 15.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Branislav Rankov , Marco Elver , Catalin Marinas , Evgenii Stepanov , LKML , kasan-dev , Alexander Potapenko , Linux ARM , Andrey Ryabinin , Will Deacon , Dmitry Vyukov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Andrey, On 1/19/21 6:10 PM, Andrey Konovalov wrote: > On Mon, Jan 18, 2021 at 7:30 PM Vincenzo Frascino > wrote: >> --- a/Documentation/dev-tools/kasan.rst >> +++ b/Documentation/dev-tools/kasan.rst >> @@ -162,6 +162,9 @@ particular KASAN features. >> >> - ``kasan=off`` or ``=on`` controls whether KASAN is enabled (default: ``on``). >> >> +- ``kasan.mode=sync`` or ``=async`` controls whether KASAN is configured in >> + synchronous or asynchronous mode of execution (default: ``sync``). > This needs to be expanded with a short explanation of the difference. > Ok, I will extend it in v5. >> +static inline void hw_enable_tagging_mode(void) >> +{ >> + if (kasan_arg_mode == KASAN_ARG_MODE_ASYNC) >> + hw_enable_tagging_async(); >> + else >> + hw_enable_tagging_sync(); >> +} > It's OK to open-code this in kasan_init_hw_tags_cpu(), no need for an > additional function. > I added the new function to keep the code cleaner, but I do not have strong opinion hence it is fine by me to have open-code here. -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel