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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94A05C433F5 for ; Sun, 24 Apr 2022 08:10:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F18AE6B0074; Sun, 24 Apr 2022 04:10:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EA1D36B0075; Sun, 24 Apr 2022 04:10:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D69596B0078; Sun, 24 Apr 2022 04:10:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id C366F6B0074 for ; Sun, 24 Apr 2022 04:10:55 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 996F628407 for ; Sun, 24 Apr 2022 08:10:55 +0000 (UTC) X-FDA: 79391051670.11.D683C57 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf10.hostedemail.com (Postfix) with ESMTP id C6424C003D for ; Sun, 24 Apr 2022 08:10:48 +0000 (UTC) Received: from kwepemi100026.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KmLRD4PglzfZtP; Sun, 24 Apr 2022 16:10:00 +0800 (CST) Received: from kwepemm600020.china.huawei.com (7.193.23.147) by kwepemi100026.china.huawei.com (7.221.188.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sun, 24 Apr 2022 16:10:50 +0800 Received: from DESKTOP-E0KHRBE.china.huawei.com (10.67.111.5) by kwepemm600020.china.huawei.com (7.193.23.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sun, 24 Apr 2022 16:10:50 +0800 From: Shaobo Huang To: CC: , , , , , , , , , , , , , Subject: Re: [PATCH] kfence: check kfence canary in panic and reboot Date: Sun, 24 Apr 2022 16:10:49 +0800 Message-ID: <20220424081049.57928-1-huangshaobo6@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.67.111.5] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600020.china.huawei.com (7.193.23.147) X-CFilter-Loop: Reflected Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf10.hostedemail.com: domain of huangshaobo6@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=huangshaobo6@huawei.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: C6424C003D X-Rspam-User: X-Stat-Signature: m6arm69cq9jhdz8iyo8hhrffx1qfxgt6 X-HE-Tag: 1650787848-938562 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, 21 Apr 2022 15:28:45 +0200, Marco Elver wrote: > On Thu, 21 Apr 2022 at 15:06, Alexander Potapenko wrote: > [...] > > This report will denote that in a system that could have been running for days a particular skbuff was corrupted by some unknown task at some unknown point in time. > > How do we figure out what exactly caused this corruption? > > > > When we deploy KFENCE at scale, it is rarely possible for the kernel developer to get access to the host that reported the bug and try to reproduce it. > > With that in mind, the report (plus the kernel source) must contain all the necessary information to address the bug, otherwise reporting it will result in wasting the developer's time. > > Moreover, if we report such bugs too often, our tool loses the credit, which is hard to regain. > > I second this - in particular we'll want this off in fuzzers etc., > because it'll just generate reports that nobody can use to debug an > issue. I do see the value in this in potentially narrowing the cause > of a panic, but that information is likely not enough to fully > diagnose the root cause of the panic - it might however prompt to > re-run with KASAN, or check if memory DIMMs are faulty etc. > > We can still have this feature, but I suggest to make it > off-by-default, and only enable via a boot param. I'd call it > 'kfence.check_on_panic'. For your setup, you can then use it to enable > where you see fit. Can I implement your suggestion into the second patch and add the "Suggested-by: Marco Elver " tag to it? > Thanks, >-- Marco