svn commit: r360233 - in head: contrib/jemalloc . . . : This partially breaks a 2-socket 32-bit powerpc (old PowerMac G4) based on head -r360311

Mark Millard marklmi at yahoo.com
Sun Jun 28 01:01:26 UTC 2020


On 2020-Jun-27, at 17:02, Brandon Bergren <bdragon at FreeBSD.org> wrote:

> On Sat, Jun 27, 2020, at 5:32 PM, Mark Millard wrote:
> 
>> where moea64_pvo_remove_from_page involves
>> vm_page_aflag_clear(????,PGA_WRITEABLE | PGA_EXECUTABLE) via:
>> 
>> static inline void
>> moea64_pvo_remove_from_page_locked(mmu_t mmu, struct pvo_entry *pvo,
>>    vm_page_t m)
>> {
>> 
>>        . . . 
>>        /*
>>         * Update vm about page writeability/executability if managed
>>         */
>>        PV_LOCKASSERT(pvo->pvo_pte.pa & LPTE_RPGN);
>>        if (pvo->pvo_vaddr & PVO_MANAGED) {
>>                if (m != NULL) {
>>                        LIST_REMOVE(pvo, pvo_vlink);
>>                        if (LIST_EMPTY(vm_page_to_pvoh(m)))
>>                                vm_page_aflag_clear(m,
>>                                    PGA_WRITEABLE | PGA_EXECUTABLE);
>>                }
>>        }
>>        . . .
>> }
>> 
>> But 32-bit has/uses:
>> 
>>        static void mmu_null_remove_pages(mmu_t mmu, pmap_t pmap)
>>        {
>>                return;
>>        }
>> 
>> 
>> so it does not involve:
>> 
>>    vm_page_aflag_clear(????,PGA_WRITEABLE | PGA_EXECUTABLE)
>> 
>> but apparently should involve such in order to pass:
>> 
>>               KASSERT((m->a.flags & (PGA_EXECUTABLE | PGA_WRITEABLE)) == 0,
>>                   ("vm_page_free_prep: mapping flags set in page %p", m));
>> 
> 
> looking at the history of the 64 bit code:
> r233017 -- "Implement pmap_remove_pages(). This will be added later to the 32-bit MMU module."
> 
> Oops!

Looks like -r233949 is the first version of mmu_oea64.c
to involve clearing PGA_EXECUTABLE from the a.flags .
Later versions changed various aspects over the years
but clearing PGA_EXECUTABLE and PGA_WRITEABLE has been
a sustained property for PVO_MANANGED contexts from
what I see. (Not that I have any general understanding
of the code involved or what can be common for 32-bit
vs. what can not.)

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ppc mailing list