Re: [PATCH] x86/mm: fix cpu stuck issue in __change_page_attr_set_clr
From: Thomas Gleixner
Date: Mon Jul 16 2018 - 03:48:36 EST
On Tue, 10 Jul 2018, Yang, Bin wrote:
> > + * FIXME:
> > + * 1) Make this yell loudly if something tries to set a full
> > + * large page to something which is not allowed.
>
> I am trying to work out a patch based on your sample code and
> comments.
> I do not understand here why it needs to yell loudly if set a full
> large page to something which is not allowed. It can split the large
> page to 4K-pages finally. And static_protection() will also be called
> for 4K-page change. Why not just add warning if 4K-page change is not
> allowed?
Think about it. If there is a large page which contains an area which
requires a different mapping that the one which the large page provides,
then something went wrong _before_ this code is called.
Thanks,
tglx