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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E4B2C433EF for ; Mon, 4 Oct 2021 15:45:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FC286137C for ; Mon, 4 Oct 2021 15:45:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235909AbhJDPrR (ORCPT ); Mon, 4 Oct 2021 11:47:17 -0400 Received: from foss.arm.com ([217.140.110.172]:53644 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235455AbhJDPrQ (ORCPT ); Mon, 4 Oct 2021 11:47:16 -0400 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 E436FD6E; Mon, 4 Oct 2021 08:45:26 -0700 (PDT) Received: from [10.57.53.1] (unknown [10.57.53.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6701A3F70D; Mon, 4 Oct 2021 08:45:24 -0700 (PDT) Subject: Re: [PATCH 5/5] kasan: Extend KASAN mode kernel parameter To: Andrey Konovalov Cc: Marco Elver , Linux ARM , LKML , kasan-dev , Andrew Morton , Catalin Marinas , Will Deacon , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Evgenii Stepanov , Branislav Rankov , Lorenzo Pieralisi References: <20210913081424.48613-1-vincenzo.frascino@arm.com> <20210913081424.48613-6-vincenzo.frascino@arm.com> From: Vincenzo Frascino Message-ID: <3e6a5797-4690-ea54-c14b-75d6ca58e744@arm.com> Date: Mon, 4 Oct 2021 17:45:41 +0200 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 10/3/21 7:16 PM, Andrey Konovalov wrote: > Hi Vincenzo, > > Up till now, the code assumes that not having the async mode enabled > means that the sync mode is enabled. There are two callers to > kasan_async_mode_enabled(): lib/test_kasan.c and mm/kasan/report.c. > Assuming tests support will be added later, at least the second one > should be adjusted. > > Maybe we should rename kasan_async_mode_enabled() to > kasan_async_fault_possible(), make it return true for both async and > asymm modes, and use that in mm/kasan/report.c. And also add > kasan_sync_fault_possible() returning true for sync and asymm, and use > that in lib/test_kasan.c. (However, it seems that the tests don't work > with async faults right now.) > It is ok by me, I will add the changes you are mentioning in v2. > Thanks! -- Regards, Vincenzo