> Am 06.04.2021 um 18:34 schrieb Oscar Salvador <osalvador@xxxxxxx>: > > On 2021-04-06 17:32, David Hildenbrand wrote: >> I'd only relax start_pfn. That way the function is pretty much >> impossible to abuse for sub-section onlining/offlining. >> if (WARN_ON_ONCE(!nr_pages || >> !IS_ALIGNED(start_pfn, pageblock_nr_pages)) >> !IS_ALIGNED(start_pfn + nr_pages, PAGES_PER_SECTION))) > > But this is not going to work. > When using memmap_on_memory, the nr of pages that online_pages() and offline_pages() get might be less than PAGES_PER_SECTION, so this check will always blow us up. But not end_pfn as given in my version or what am I missing? > -- > Oscar Salvador > SUSE L3 >