Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jun 2020 18:01:20 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Brandon Bergren <bdragon@FreeBSD.org>
Cc:        Justin Hibbits <chmeeedalf@gmail.com>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: svn commit: r360233 - in head: contrib/jemalloc . . . : This partially breaks a 2-socket 32-bit powerpc (old PowerMac G4) based on head -r360311
Message-ID:  <78B7326C-A706-4F6F-B3A3-7ABC3F74E6B9@yahoo.com>
In-Reply-To: <db7d1e5c-06e9-4073-9e4f-876649eb0795@www.fastmail.com>
References:  <C24EE1A1-FAED-42C2-8204-CA7B1D20A369@yahoo.com> <18E62746-80DB-4195-977D-4FF32D0129EE@yahoo.com> <F5953A6B-56CE-4D1C-8C18-58D44B639881@yahoo.com> <D0C483E5-3F6A-4816-A6BA-3D2C82C24F8E@yahoo.com> <C440956F-139E-4EF7-A68E-FE35D9934BD3@yahoo.com> <9562EEE4-62EF-4164-91C0-948CC0432984@yahoo.com> <9B68839B-AEC8-43EE-B3B6-B696A4A57DAE@yahoo.com> <359C9C7D-4106-42B5-AAB5-08EF995B8100@yahoo.com> <20200513105632.06db9e21@titan.knownspace> <B1225914-43BC-44EF-A73E-D06B890229C6@yahoo.com> <20200611155545.55526f7c@ralga.knownspace> <5542B85D-1C3A-41D8-98CE-3C02E990C3EB@yahoo.com> <20200611164216.47f82775@ralga.knownspace> <DEA9A860-5DEE-49EE-97F1-DBDB39D5C0A3@yahoo.com> <DCB0BC72-1666-49F3-A838-B2A0D653A0C2@yahoo.com> <20200611212532.59f677be@ralga.knownspace> <1EDCA498-0B67-4374-B7CA-1ECDA8EE32AD@yahoo.com> <3605089E-7B5D-4FBA-B0D1-14B789BDF09B@yahoo.com> <CE56E7B6-7189-41BD-9384-6E492FEA85F3@yahoo.com> <F27CB198-2169-4FB2-AA67-F8244C7D39C5@yahoo.com> <20200616213205.05f365dd@titan.knownspace> <E1B78D50-D62E-43A1-9360-8C9F4B32A50F@yahoo.com> <45988F4F-56D0-4FDD-90C9-97570B2F0FCF@yahoo.com> <db7d1e5c-06e9-4073-9e4f-876649eb0795@www.fastmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>=20
>> where moea64_pvo_remove_from_page involves
>> vm_page_aflag_clear(????,PGA_WRITEABLE | PGA_EXECUTABLE) via:
>>=20
>> static inline void
>> moea64_pvo_remove_from_page_locked(mmu_t mmu, struct pvo_entry *pvo,
>>    vm_page_t m)
>> {
>>=20
>>        . . .=20
>>        /*
>>         * Update vm about page writeability/executability if managed
>>         */
>>        PV_LOCKASSERT(pvo->pvo_pte.pa & LPTE_RPGN);
>>        if (pvo->pvo_vaddr & PVO_MANAGED) {
>>                if (m !=3D NULL) {
>>                        LIST_REMOVE(pvo, pvo_vlink);
>>                        if (LIST_EMPTY(vm_page_to_pvoh(m)))
>>                                vm_page_aflag_clear(m,
>>                                    PGA_WRITEABLE | PGA_EXECUTABLE);
>>                }
>>        }
>>        . . .
>> }
>>=20
>> But 32-bit has/uses:
>>=20
>>        static void mmu_null_remove_pages(mmu_t mmu, pmap_t pmap)
>>        {
>>                return;
>>        }
>>=20
>>=20
>> so it does not involve:
>>=20
>>    vm_page_aflag_clear(????,PGA_WRITEABLE | PGA_EXECUTABLE)
>>=20
>> but apparently should involve such in order to pass:
>>=20
>>               KASSERT((m->a.flags & (PGA_EXECUTABLE | PGA_WRITEABLE)) =
=3D=3D 0,
>>                   ("vm_page_free_prep: mapping flags set in page %p", =
m));
>>=20
>=20
> 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."
>=20
> 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.)

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?78B7326C-A706-4F6F-B3A3-7ABC3F74E6B9>