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 97389C433EF for ; Sun, 24 Apr 2022 09:52:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D486F6B0074; Sun, 24 Apr 2022 05:52:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF8E76B0075; Sun, 24 Apr 2022 05:52:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBF8F6B0078; Sun, 24 Apr 2022 05:52:11 -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 ACD626B0074 for ; Sun, 24 Apr 2022 05:52:11 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 82C572C9C for ; Sun, 24 Apr 2022 09:52:11 +0000 (UTC) X-FDA: 79391306862.05.8EF2D94 Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) by imf11.hostedemail.com (Postfix) with ESMTP id C73DD4003A for ; Sun, 24 Apr 2022 09:52:08 +0000 (UTC) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-2ebf4b91212so122778557b3.8 for ; Sun, 24 Apr 2022 02:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rmy4idXC2eBClz5DkYm2e4LN35DXVZgPlYi+CftqWGY=; b=k+ussjTHyFwnFiBi0uQ5MNWwyonlF9MfOA+TgD8JtWtiYa+puwMoCziDRVoilv6/uh QtzmKbTLulTLjntahQa7/oGzgGY1UmpJebhAZHFZFiDWBHdnr/yCSIQRaHfGTYC4+bfu aiKvvQrIPFdDMPZG5Lv4IZrSy2XO2hcJU8zAicsoqSwml43WbfcyCd/L84kpT6mnJDOv 303tJOFDq3WWFH/e42/JiJuApIhcvTU03zC+Fp4lEv/IFjNmrgljuB5Yc3eUFZNiEWwm Yqqpl7m4oGft7CVIYtLh68nwMqUxxp2umWmDCBv2ZEHHplRwijju5HVaWSi3lDl9ouvu PQrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rmy4idXC2eBClz5DkYm2e4LN35DXVZgPlYi+CftqWGY=; b=xC2ADpx33/MYucm1BPjeOGdxxO/5j2U7Yop725iPivWBQMar3CVH+IWeBD0OyEGVp/ BhVKO5BUT4O6Suvh7WwLX3EEme/YlafwAInajKrhEtTaYjCnxUaUhGlvido7TE3QyDB/ uDsUKvPVe38sLYgbAasgcMynOijNRdGmi4HB9Q5Xnsgq6GcWEmmqrAbonYcv3mjfOjai yuzGZxldLH13kh0kQF8InsR1V0SuEHspWYr2KgUD0Q5AJ8WWU6eUFLoFaull4ooTI/aN t34Cr2EBGvgdd8ecTyqAD+m2WA+48SuLOb6Ryz7XjbrYGUXx/wuxbAXan7wlhTIF/KXz YBgg== X-Gm-Message-State: AOAM530Uzumay/AatmfdWR5QYz4f77IqPVUes/F9+7jM2DXsEXlKSBqy QSMViOcWhjvfb3SZibmdjtSq71DWERAhbqG3RrbY4g== X-Google-Smtp-Source: ABdhPJx1KTvUMODnyShVCUuKLp0JbEVKjGIWa3nLOZSYLWnRBLzlPlkMAnY4lx4bL3jRJb1yvOLnKtmgVlkjZAgKEFU= X-Received: by 2002:a81:1087:0:b0:2f7:da07:6d89 with SMTP id 129-20020a811087000000b002f7da076d89mr1567199ywq.412.1650793930117; Sun, 24 Apr 2022 02:52:10 -0700 (PDT) MIME-Version: 1.0 References: <20220424081049.57928-1-huangshaobo6@huawei.com> In-Reply-To: <20220424081049.57928-1-huangshaobo6@huawei.com> From: Marco Elver Date: Sun, 24 Apr 2022 11:51:34 +0200 Message-ID: Subject: Re: [PATCH] kfence: check kfence canary in panic and reboot To: Shaobo Huang Cc: akpm@linux-foundation.org, chenzefeng2@huawei.com, dvyukov@google.com, glider@google.com, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, nixiaoming@huawei.com, wangbing6@huawei.com, wangfangpeng1@huawei.com, young.liuyang@huawei.com, zengweilin@huawei.com, zhongjubin@huawei.com Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: C73DD4003A X-Stat-Signature: 38p85pkipbjxpcxteoxwk8t4a7te868g Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=k+ussjTH; spf=pass (imf11.hostedemail.com: domain of elver@google.com designates 209.85.128.181 as permitted sender) smtp.mailfrom=elver@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1650793928-965559 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000007, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, 24 Apr 2022 at 10:10, Shaobo Huang wrote: > > 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? I don't think it's necessary, after all the overall patch is still your idea - you're just using our review feedback to improve it. In the change-log (after ---) you can of course mention that, but it'll be stripped upon applying. Thanks, -- Marco