Re: [PATCH v3 3/5] x86/mm: add help function to check specific protection flags in range

2018-09-03 Thread Yang, Bin
On Tue, 2018-09-04 at 00:10 +0200, Thomas Gleixner wrote: > On Tue, 21 Aug 2018, Bin Yang wrote: > > /* > > + * static_protections() "forces" page protections for some address > > + * ranges. Return true if any part of the address/len range is forced > > + * to change from 'prot'. > > + */ > > +s

Re: [PATCH v3 3/5] x86/mm: add help function to check specific protection flags in range

2018-09-03 Thread Thomas Gleixner
On Tue, 21 Aug 2018, Bin Yang wrote: > /* > + * static_protections() "forces" page protections for some address > + * ranges. Return true if any part of the address/len range is forced > + * to change from 'prot'. > + */ > +static inline bool > +needs_static_protections(pgprot_t prot, unsigned lo

[PATCH v3 3/5] x86/mm: add help function to check specific protection flags in range

2018-08-20 Thread Bin Yang
Introduce the needs_static_protections() helper to check specific protection flags in range. It calls static_protection() to check whether any part of the address/len range is forced to change from 'prot'. Suggested-by: Dave Hansen Signed-off-by: Bin Yang --- arch/x86/mm/pageattr.c | 36 +++