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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 BEC65C433ED for ; Thu, 22 Apr 2021 15:06:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 42F2A61222 for ; Thu, 22 Apr 2021 15:06:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42F2A61222 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9F0456B006C; Thu, 22 Apr 2021 11:06:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A11A6B006E; Thu, 22 Apr 2021 11:06:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 868506B0072; Thu, 22 Apr 2021 11:06:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id 6D1C86B006C for ; Thu, 22 Apr 2021 11:06:47 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2E92D18215FB3 for ; Thu, 22 Apr 2021 15:06:47 +0000 (UTC) X-FDA: 78060330054.02.2BE6E26 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by imf06.hostedemail.com (Postfix) with ESMTP id B6E51C0007F5 for ; Thu, 22 Apr 2021 15:06:49 +0000 (UTC) Received: by mail-ed1-f51.google.com with SMTP id k17so14375370edr.7 for ; Thu, 22 Apr 2021 08:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aiWM9rp85vgyV36ASLFY/jLiQfSBITIqRxoGkPrE4Iw=; b=YwpW4PO5GfM7uc9mqvAfOC7AUhsP7CQug/ztxN73rTTEjyZz7CiKQbTaOsKDSWewRa mcwnVDJ+c9GxNh0/A8uETV8xX2JPc9nxP0JMXn9fTV0ZY69SLR69IL1rYAnCUJPthZH5 Zf45WuZ9PFYVUuaX5L1QG3FlcXh9Mj71Wwfxp1jv9JNny21QabQy5mBqPpEUcQ2/j8eI PKKMaybb0D9l6OxlBxjv9b8gsdGSSVLSschuRSkt1v7LEhUt7zg8Ll8sgLMAP43Pf1xp huDbO2xlAqR/7hDnNdCm0gLlQNmUBG0Fw1hKvb6QhRWifWA/Y9ndl4t6sjhfXZnfP9+S 34aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aiWM9rp85vgyV36ASLFY/jLiQfSBITIqRxoGkPrE4Iw=; b=MIMTHgpHYT2J6PQ1GY+aZc50M26ea6kTByaXYCKvOoPlahRHI5uVupKxp+9V7kx2lM wLShLwfgCsrLCoPMund0RMGW1w0EM++nou+9DXvvTWjGCjfbz3ZNHsYv44voWc9MUcEj CAEGeprXYNc655vsZfrqX3CIqfj5Egb2AV08717r1vpZ3yr/4uflVQg/kpfqDcFstS5r QpTjA8cidGCXEPyzujF4/Tn9m8Lc+SG2JW0Jpn7k7pZaqf2w2ks0uc9/xS+7qFVV/dZ7 wXT9zpRRYihFJFk6WG3FHSK+QkVEuEY2v5D/74iXS7CuPxk8E9fH7q193XI5ChcTKl7a gBZw== X-Gm-Message-State: AOAM530b1qXoiBSOoz9JxJfzOI2G13VM+U5eH5dGMtPmbNZiAIAVgPzo eGnGnpCiJbvoSgYOf/lPhQ4eX8KI4hd1kNsv2yk= X-Google-Smtp-Source: ABdhPJxbP1TmUrQ97NwLsThwzUDAJleXRX2PcIjO0fG9L+ZmBwObZbrMH9YUojnkjgnzDsiBEU3ltMGL/JMtWgrRH2w= X-Received: by 2002:aa7:d541:: with SMTP id u1mr4497795edr.95.1619104005534; Thu, 22 Apr 2021 08:06:45 -0700 (PDT) MIME-Version: 1.0 References: <1619079317-1131-1-git-send-email-maninder1.s@samsung.com> In-Reply-To: From: Andrey Konovalov Date: Thu, 22 Apr 2021 17:06:34 +0200 Message-ID: Subject: Re: [PATCH 1/2] mm/kasan: avoid duplicate KASAN issues from reporting To: Marco Elver , Maninder Singh Cc: Andrey Ryabinin , Alexander Potapenko , Andrew Morton , Dmitry Vyukov , kasan-dev , Linux Memory Management List , LKML , a.sahrawat@samsung.com, Vaneet Narang Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: B6E51C0007F5 X-Stat-Signature: i9xd64etmd8o3ee7jwja8s4539ghgmky Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail-ed1-f51.google.com; client-ip=209.85.208.51 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619104009-847970 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 22, 2021 at 4:10 PM Marco Elver wrote: > > On Thu, 22 Apr 2021 at 11:17, Maninder Singh wrote: > > > > when KASAN multishot is ON and some buggy code hits same code path > > of KASAN issue repetetively, it can flood logs on console. > > > > Check for allocaton, free and backtrace path at time of KASAN error, > > if these are same then it is duplicate error and avoid these prints > > from KASAN. > > On a more fundamental level, I think this sort of filtering is the > wrong solution to your problem. One reason why it's good that > multishot is off by default is, because _every_ KASAN report is > critical and can destabilize the system. Therefore, any report after > the first one might be completely bogus, because the system is in a > potentially bad state and its behaviour might be completely random. > > The correct solution is to not leave the system running, fix the first > bug found, continue; rinse and repeat. Therefore, this patch adds a > lot of code for little benefit. I agree with Marco here. It doesn't make sense to have this deduplication code in the kernel anyway. If you want unique reports, write a userspace script that parses dmesg and groups the reports. Thanks!