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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 B8ECBC433E0 for ; Wed, 20 Jan 2021 14:44:38 +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 61B8B23371 for ; Wed, 20 Jan 2021 14:44:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61B8B23371 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=dFv2fIsoIYeebrV0ub7yuagykhI2zhiBexYNJFy/Z4o=; b=i9G/a03uWwFMKjtaeygBkDII5 iSe9dFmRj+gszPBiHtwczdHhl+qN+PgBesbbP+6wZXSY7Zid1WDAoAMZsizx4ihI5zm5oeUz0mmfQ pn3eVC+UI+I+d6wJJzsASgtbVymmfJaKWiP/F3Ylr/OiVLzHEpY3kujwrKntUBnxPVrPfeuBq9Q1m K07co76fE7nCMa3Bk748C7zZIclu7LZg/VJXrdXzMv3afDWZRBq1MGd9g19EmHbIBklWhXYG9Mi6L +sunlY+fTl7rwifadYBo4OhJzrhb8ID3N1w7YVv7/5TiNjOULPsfWkIqFdojFyxFs82KW74Za/FYf 8yXBvhtRA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2EhK-0008NX-2W; Wed, 20 Jan 2021 14:43:02 +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 1l2EhI-0008Mu-6v for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 14:43:01 +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 987AFD6E; Wed, 20 Jan 2021 06:42:56 -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 7F7583F66E; Wed, 20 Jan 2021 06:42:54 -0800 (PST) Subject: Re: [PATCH v4 3/5] kasan: Add report for async mode To: Andrey Konovalov , Mark Rutland References: <20210118183033.41764-1-vincenzo.frascino@arm.com> <20210118183033.41764-4-vincenzo.frascino@arm.com> <20210119130440.GC17369@gaia> <813f907f-0de8-6b96-c67a-af9aecf31a70@arm.com> <20210119144625.GB2338@C02TD0UTHF1T.local> From: Vincenzo Frascino Message-ID: Date: Wed, 20 Jan 2021 14:46:44 +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_094300_315736_8FE491AE X-CRM114-Status: GOOD ( 19.10 ) 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 , Catalin Marinas , Marco Elver , kasan-dev , LKML , Alexander Potapenko , Linux ARM , Dmitry Vyukov , Andrey Ryabinin , Will Deacon , Evgenii Stepanov 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 On 1/19/21 6:12 PM, Andrey Konovalov wrote: > On Tue, Jan 19, 2021 at 3:46 PM Mark Rutland wrote: >> >> Given there's no information available, I think it's simpler and >> preferable to handle the logging separately, as is done for >> kasan_report_invalid_free(). For example, we could do something roughly >> like: >> >> void kasan_report_async(void) >> { >> unsigned long flags; >> >> start_report(&flags); >> pr_err("BUG: KASAN: Tag mismatch detected asynchronously\n"); > > "BUG: KASAN: invalid-access" > Ok, I will do in v5. It looks more uniform with what we have for the sync exception. > It also might make sense to pass the ip, even though it's not exactly > related to the access: > I would like to avoid to add a builtin for something that has not a real meaning as you are correctly pointing out. > pr_err("BUG: KASAN: invalid-access in %pS\n", (void *)ip); > > Up to you. > >> pr_err("KASAN: no fault information available\n"); > > pr_err("Asynchronous mode enabled: no access details available\n"); > >> dump_stack(); >> end_report(&flags); >> } > > This approach with a dedicated function is better. Thanks, Mark! > > Please put it next to kasan_report_invalid_free(). > Will do in v5. Thanks! -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel