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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32BDBC433F5 for ; Sun, 24 Apr 2022 08:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238647AbiDXIN6 (ORCPT ); Sun, 24 Apr 2022 04:13:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236428AbiDXINx (ORCPT ); Sun, 24 Apr 2022 04:13:53 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C73B8DEC3 for ; Sun, 24 Apr 2022 01:10:52 -0700 (PDT) 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: 7BIT Content-Type: text/plain; charset=US-ASCII 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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