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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 BA735C433E0 for ; Tue, 9 Feb 2021 12:04:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BF0664E16 for ; Tue, 9 Feb 2021 12:04:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230216AbhBIME4 (ORCPT ); Tue, 9 Feb 2021 07:04:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:53338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbhBIMDd (ORCPT ); Tue, 9 Feb 2021 07:03:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C57E64DB1; Tue, 9 Feb 2021 12:02:44 +0000 (UTC) Date: Tue, 9 Feb 2021 12:02:42 +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 v12 7/7] kasan: don't run tests in async mode Message-ID: <20210209120241.GF1435@arm.com> References: <20210208165617.9977-1-vincenzo.frascino@arm.com> <20210208165617.9977-8-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210208165617.9977-8-vincenzo.frascino@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2021 at 04:56:17PM +0000, Vincenzo Frascino wrote: > From: Andrey Konovalov > > Asynchronous KASAN mode doesn't guarantee that a tag fault will be > detected immediately and causes tests to fail. Forbid running them > in asynchronous mode. > > Signed-off-by: Andrey Konovalov That's missing your SoB. > diff --git a/lib/test_kasan.c b/lib/test_kasan.c > index 7285dcf9fcc1..f82d9630cae1 100644 > --- a/lib/test_kasan.c > +++ b/lib/test_kasan.c > @@ -51,6 +51,10 @@ static int kasan_test_init(struct kunit *test) > kunit_err(test, "can't run KASAN tests with KASAN disabled"); > return -1; > } > + if (kasan_flag_async) { > + kunit_err(test, "can't run KASAN tests in async mode"); > + return -1; > + } > > multishot = kasan_save_enable_multi_shot(); > hw_set_tagging_report_once(false); I think we can still run the kasan tests in async mode if we check the TFSR_EL1 at the end of each test by calling mte_check_tfsr_exit(). -- Catalin