> On 7/22/26 08:30, Yeoreum Yun wrote:
> >  struct pg_state {
> >     struct ptdump_state ptdump;
> > +   int first_level;
> >     int level;
> >     pgprotval_t current_prot;
> >     pgprotval_t effective_prot;
> 
> There is zero reason on x86 to hold this value in a data structure. It
> is 100% determined at boot time or earlier. Pre-5-level-paging it's a
> compile-time constant.
> 
> On x86, it never varies per-mm.

However, mm_pXd_folded() requires to mm for other architecture like
s390. might save the mm instead of first_level and calls the
ptdump_pt_level_first() with static inline version would make the
constant comparison. So it requires to save *mm* structure in here.

[...]
-- 
Sincerely,
Yeoreum Yun

Reply via email to