From: John Hubbard <jhubbard@nvidia.com>
To: "Huang, Shaoqin" <shaoqin.huang@intel.com>,
"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"pasha.tatashin@soleen.com" <pasha.tatashin@soleen.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: Check writable zero page in page table check
Date: Mon, 5 Sep 2022 17:49:23 -0700 [thread overview]
Message-ID: <1c05b986-e8bb-2ec1-7c81-06b7cfe50f94@nvidia.com> (raw)
In-Reply-To: <4f265843-bac1-944c-8119-aa4c1689c8e5@intel.com>
On 9/5/22 17:24, Huang, Shaoqin wrote:
>
>
> On 9/6/2022 2:50 AM, Edgecombe, Rick P wrote:
>> On Sat, 2022-09-03 at 10:13 +0800, Huang, Shaoqin wrote:
>>>> + BUG_ON(is_zero_pfn(pfn) && rw);
>>>> +
>>>
>>> Why we need use BUG_ON() here? Based on [1], we should avoid to use
>>> the
>>> BUG_ON() due to it will panic the machine.
>>>
>>> [1]:
>>> https://lore.kernel.org/lkml/20220824163100.224449-1-david@redhat.com/
>>
>> Yea, you are probably right. All the rest of this checker uses BUG_ON()
>> though. Maybe they should all be something else? Just felt weird to
>> have this be the only check that is different.
>>
>> I don't have any objections to changing it to WARN_ON(). Should I
>> switch the rest of the checks here while I'm at it?
>
> Yes. I think in most situation, WARN_ON() or WARN_ON_ONCE() is ok.
>
+1 for WARN_ON_ONCE(), and also for changing the other cases as you find
them, yes.
thanks,
--
John Hubbard
NVIDIA
next prev parent reply other threads:[~2022-09-06 0:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 23:27 Rick Edgecombe
2022-09-03 2:13 ` Huang, Shaoqin
2022-09-05 18:50 ` Edgecombe, Rick P
2022-09-06 0:24 ` Huang, Shaoqin
2022-09-06 0:49 ` John Hubbard [this message]
2022-09-06 0:37 ` Pasha Tatashin
2022-09-06 1:01 ` Huang, Shaoqin
2022-09-06 16:42 ` Edgecombe, Rick P
2022-09-06 0:38 ` Pasha Tatashin
2022-09-06 0:39 ` Pasha Tatashin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c05b986-e8bb-2ec1-7c81-06b7cfe50f94@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=rick.p.edgecombe@intel.com \
--cc=shaoqin.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox