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 D317DC6FA82 for ; Tue, 20 Sep 2022 18:12:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 00864940008; Tue, 20 Sep 2022 14:12:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF9FD940007; Tue, 20 Sep 2022 14:12:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC33A940008; Tue, 20 Sep 2022 14:12:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id CF362940007 for ; Tue, 20 Sep 2022 14:12:28 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id AC146160750 for ; Tue, 20 Sep 2022 18:12:28 +0000 (UTC) X-FDA: 79933258776.12.80B2CC9 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by imf24.hostedemail.com (Postfix) with ESMTP id 30C61180006 for ; Tue, 20 Sep 2022 18:12:28 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id a41so5089557edf.4 for ; Tue, 20 Sep 2022 11:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=UxJ8rW//GvFRzYiqb7FcOc8c4uS74wXg/hmPFHHyeA0=; b=YBLruLr5DBNAIlTAxtA3I1Zr5N+6+7ZpxNpjzAFJ4O+39pTvESNS4BZszLmARDv7a5 yBVGN7GOBBJFowcCyD7FrfIhACWI8EiIQppJMJaZa8wTm+2kZ5jmVsdG6MH3/4c54TWr m7zeVAb/yWZMXPuWx03G5DAxMX2EYgjcoyCDTukhy0Qa5kwqgDL6Bs1EsxL8KwaVfp5E s0FnaGMDutVEoerMWhaleTosA9v+M8nKr8gzfaK3VKPvPDZgI8xbWfUuYaxuPjcxQK1x VD7DmpnW8dcB6cNTAaWvxZZ9t++KhlI8j4gK2jLPxkacqRGupsysmRuI2ou4nZX/u/DX +3Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=UxJ8rW//GvFRzYiqb7FcOc8c4uS74wXg/hmPFHHyeA0=; b=RobGuJvu6Sy1IccreQVWLQPSWaklsc8sP3mUmu/2636AswGuRPORi3CKz8kdu2abO2 Br7hsCFUu0xaVYRB4mE4NFkczibTKHYHyg5XTYJQh2vbmbTZZBtIlqoWWxdShjzignal 1Wl/QEvEN1Yka/1dNiWHUyuZZCvT+z7X5IftHQxa7GhzvNfNmRULaKx46z7vO+8z0Brc iq3E28Yx9Lut4f+fjm1vfrynrmaPhAkY3pZLY185cLBAd9gZEHjqtnnvf5/rsz7ocWA+ H45TBxUR7uF9tgXNLqjwVMn/jZlyrm+Ze1rJkw3Wm1zYRbIYrEckcvO6VM1mcFghycaK W1Lw== X-Gm-Message-State: ACrzQf2jd0LnYLVE85P4LNqYQ9lhjYm6AFhaE+K3fpMGwxoGOlrgeBjh TGngfsAa5za3Fa3WbWPA8e7LyNhGkpiB3ndfcQZmKQ== X-Google-Smtp-Source: AMsMyM7PMxdTFGqqTHkNV2MZvsSy/zTh84aME965vBYd0cNVakCzxExWkU8Vx5Y8SwaT9xnkrtg0AOKAgquknl6Z1K8= X-Received: by 2002:aa7:d3d3:0:b0:44e:baab:54d9 with SMTP id o19-20020aa7d3d3000000b0044ebaab54d9mr20817547edr.43.1663697546757; Tue, 20 Sep 2022 11:12:26 -0700 (PDT) MIME-Version: 1.0 References: <20220911095923.3614387-1-pasha.tatashin@soleen.com> <20220912132322.7c486c40c6acf8eec0785c87@linux-foundation.org> In-Reply-To: <20220912132322.7c486c40c6acf8eec0785c87@linux-foundation.org> From: Pasha Tatashin Date: Tue, 20 Sep 2022 14:11:50 -0400 Message-ID: Subject: Re: [PATCH 0/3] page table check default to warn instead of panic To: Andrew Morton Cc: Jonathan Corbet , linux-mm , Linux Doc Mailing List , LKML , Rick Edgecombe Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663697548; a=rsa-sha256; cv=none; b=IlnoLv+H3bz6hlSmsOmpbvs8qYyLvMrPPJ3Cp21BVNqm/22cxvqVCtVUkhOrJnR9dWbd0p mPEknwllJYZVE7chOG4SEHEe8rM5NxQ9zkUlVEJ5sZc9ec2wICsH729wgVZ9GsrRQeXNoE EU+c9gsfrrGsIsT4Mcpi3u+Y/Ca/5qk= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=YBLruLr5; dmarc=none; spf=pass (imf24.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663697548; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UxJ8rW//GvFRzYiqb7FcOc8c4uS74wXg/hmPFHHyeA0=; b=j5U95ZCyXQOJLohi3ANMnsLnsTaiRjC9L3DGupFy7OvFw+9WH/Iu6wi1RPfpNIVQWOQnvK CfJqeWzWt8sAyd0zOqeMCHb7K+0kGKPMhD1o7F6zney+1WQ42vqBsVudFQuNvW28OIT3AY eBVtzM9HFrPd02oAH/lUlC/5siAGaJc= Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=YBLruLr5; dmarc=none; spf=pass (imf24.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 1wbjteputkr3wy9tatqoqmxbmya5wqqx X-Rspamd-Queue-Id: 30C61180006 X-HE-Tag: 1663697548-99206 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 Mon, Sep 12, 2022 at 4:23 PM Andrew Morton wrote: > > On Sun, 11 Sep 2022 09:59:20 +0000 Pasha Tatashin wrote: > > > From: Pasha Tatashin > > > > Page table check when detects errors panics the kernel. Let instead, > > print a warning, and panic only when specifically requested via kernel > > parameter: > > > > page_table_check=panic > > > > The discussion about using panic vs. warn is here: > > https://lore.kernel.org/linux-mm/20220902232732.12358-1-rick.p.edgecombe@intel.com > > The changelog doesn't actually describe the reason for making this > change. Somebody obviously wants pagetable check errors to no longer > panic the kernel, but why?? (The same can be said of the [2/3] > changelog). This came from the discussion listed above. There seems to be a consensus that we should reduce the number of BUG_ON() in the kernel, and replace them with WARN_ON_ONCE() when possible to recover. In the case of page_table_check we can recover, but for some it may be unsafe because of security implications. Therefore, I would like to keep an option of being able to panic only because of page table check errors, but not keeping it enabled by default. I will add more info to the commit message. > > Also, should we be changing the default? People who like the panic > will get a big surprise when they find out that they should have added > a kernel parameter to get the old behaviour back. It would be less > disruptive to default to panic unless page_table_check=warn was added. I was thinking about this as well. I decided to change the default: the old users will still get a warning, but going forward we will be inline with the rest of the kernel: warn on by default, and optionally panic. > > If there's a solid reason for changing the default, it should be > changelogged. And if that reason is generally agreed to, perhaps the > kernel should print a warning at boot if neither page_table_check=panic > nor page_table_check=warn were provided. To tell people that the > default has been changed. I am not sure that is needed, and when do we remove that extra boot message? This is a relatively new feature, and existing users would still get an ugly warning about incorrect page table mappings. Thank you, Pasha > >