[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2bf4062d-b3f1-671f-0aa4-7f3e98402160@redhat.com>
Date: Sat, 13 May 2023 05:34:19 +0200
From: David Hildenbrand <david@...hat.com>
To: Peter Collingbourne <pcc@...gle.com>,
Catalin Marinas <catalin.marinas@....com>
Cc: Qun-wei Lin (林群崴)
<Qun-wei.Lin@...iatek.com>, linux-arm-kernel@...ts.infradead.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
"surenb@...gle.com" <surenb@...gle.com>,
Chinwen Chang (張錦文)
<chinwen.chang@...iatek.com>,
"kasan-dev@...glegroups.com" <kasan-dev@...glegroups.com>,
Kuan-Ying Lee (李冠穎)
<Kuan-Ying.Lee@...iatek.com>,
Casper Li (李中榮) <casper.li@...iatek.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
vincenzo.frascino@....com,
Alexandru Elisei <alexandru.elisei@....com>, will@...nel.org,
eugenis@...gle.com, Steven Price <steven.price@....com>,
stable@...r.kernel.org
Subject: Re: [PATCH 2/3] mm: Call arch_swap_restore() from arch_do_swap_page()
and deprecate the latter
On 13.05.23 01:57, Peter Collingbourne wrote:
> The previous patch made it possible for MTE to restore tags before they
> are freed by hooking arch_do_swap_page().
>
> However, the arch_do_swap_page() hook API is incompatible with swap
> restoration in circumstances where we do not have an mm or a vma,
> such as swapoff with swapped out shmem, and I expect that ADI will
> currently fail to restore tags in these circumstances. This implies that
> arch-specific metadata stores ought to be indexed by swap index, as MTE
> does, rather than by mm and vma, as ADI does, and we should discourage
> hooking arch_do_swap_page(), preferring to hook arch_swap_restore()
> instead, as MTE already does.
>
> Therefore, instead of directly hooking arch_do_swap_page() for
> MTE, deprecate that hook, change its default implementation to call
> arch_swap_restore() and rely on the existing implementation of the latter
> for MTE.
>
> Fixes: c145e0b47c77 ("mm: streamline COW logic in do_swap_page()")
Can you enlighten me how this change fixes that commit? I'm afraid I am
missing something important.
What is the user-visible impact of the problem, how was it caused by
c145e0b47c77, and how does your change fix it?
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists