lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 06 May 2022 08:48:37 +1000 From: Alistair Popple <apopple@...dia.com> To: "Sierra Guiza, Alejandro (Alex)" <Alex.Sierra@....com> Cc: "jgg@...dia.com" <jgg@...dia.com>, "rcampbell@...dia.com" <rcampbell@...dia.com>, "willy@...radead.org" <willy@...radead.org>, "david@...hat.com" <david@...hat.com>, "Kuehling, Felix" <Felix.Kuehling@....com>, "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>, "linux-xfs@...r.kernel.org" <linux-xfs@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>, "jglisse@...hat.com" <jglisse@...hat.com>, "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>, "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>, "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>, "hch@....de" <hch@....de> Subject: Re: [PATCH v1 04/15] mm: add device coherent checker to remove migration pte "Sierra Guiza, Alejandro (Alex)" <Alex.Sierra@....com> writes: > @apopple@...dia.com Could you please check this patch? It's somehow related to > migrate_device_page() for long term device coherent pages. Sure thing. This whole series is in my queue of things to review once I make it home from LSF/MM. - Alistair > Regards, > Alex Sierra >> -----Original Message----- >> From: amd-gfx <amd-gfx-bounces@...ts.freedesktop.org> On Behalf Of Alex >> Sierra >> Sent: Thursday, May 5, 2022 4:34 PM >> To: jgg@...dia.com >> Cc: rcampbell@...dia.com; willy@...radead.org; david@...hat.com; >> Kuehling, Felix <Felix.Kuehling@....com>; apopple@...dia.com; amd- >> gfx@...ts.freedesktop.org; linux-xfs@...r.kernel.org; linux-mm@...ck.org; >> jglisse@...hat.com; dri-devel@...ts.freedesktop.org; akpm@...ux- >> foundation.org; linux-ext4@...r.kernel.org; hch@....de >> Subject: [PATCH v1 04/15] mm: add device coherent checker to remove >> migration pte >> >> During remove_migration_pte(), entries for device coherent type pages that >> were not created through special migration ptes, ignore _PAGE_RW flag. This >> path can be found at migrate_device_page(), where valid vma is not >> required. In this case, migrate_vma_collect_pmd() is not called and special >> migration ptes are not set. >> >> Signed-off-by: Alex Sierra <alex.sierra@....com> >> --- >> mm/migrate.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/mm/migrate.c b/mm/migrate.c index >> 6c31ee1e1c9b..e18ddee56f37 100644 >> --- a/mm/migrate.c >> +++ b/mm/migrate.c >> @@ -206,7 +206,8 @@ static bool remove_migration_pte(struct folio *folio, >> * Recheck VMA as permissions can change since migration >> started >> */ >> entry = pte_to_swp_entry(*pvmw.pte); >> - if (is_writable_migration_entry(entry)) >> + if (is_writable_migration_entry(entry) || >> + is_device_coherent_page(pfn_to_page(pvmw.pfn))) >> pte = maybe_mkwrite(pte, vma); >> else if (pte_swp_uffd_wp(*pvmw.pte)) >> pte = pte_mkuffd_wp(pte); >> -- >> 2.32.0
Powered by blists - more mailing lists