[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230801082729.GA26036@willie-the-truck>
Date: Tue, 1 Aug 2023 09:27:31 +0100
From: Will Deacon <will@...nel.org>
To: Lorenzo Stoakes <lstoakes@...il.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Baoquan He <bhe@...hat.com>,
Uladzislau Rezki <urezki@...il.com>,
linux-fsdevel@...r.kernel.org, Jiri Olsa <olsajiri@...il.com>,
Mike Galbraith <efault@....de>,
Mark Rutland <mark.rutland@....com>,
wangkefeng.wang@...wei.com, catalin.marinas@....com,
ardb@...nel.org, David Hildenbrand <david@...hat.com>,
Linux regression tracking <regressions@...mhuis.info>,
regressions@...ts.linux.dev, Matthew Wilcox <willy@...radead.org>,
Liu Shixin <liushixin2@...wei.com>,
Jens Axboe <axboe@...nel.dk>,
Alexander Viro <viro@...iv.linux.org.uk>,
stable@...r.kernel.org
Subject: Re: [PATCH] fs/proc/kcore: reinstate bounce buffer for KCORE_TEXT
regions
On Mon, Jul 31, 2023 at 10:50:21PM +0100, Lorenzo Stoakes wrote:
> Some architectures do not populate the entire range categorised by
> KCORE_TEXT, so we must ensure that the kernel address we read from is
> valid.
>
> Unfortunately there is no solution currently available to do so with a
> purely iterator solution so reinstate the bounce buffer in this instance so
> we can use copy_from_kernel_nofault() in order to avoid page faults when
> regions are unmapped.
>
> This change partly reverts commit 2e1c0170771e ("fs/proc/kcore: avoid
> bounce buffer for ktext data"), reinstating the bounce buffer, but adapts
> the code to continue to use an iterator.
>
> Fixes: 2e1c0170771e ("fs/proc/kcore: avoid bounce buffer for ktext data")
> Reported-by: Jiri Olsa <olsajiri@...il.com>
> Closes: https://lore.kernel.org/all/ZHc2fm+9daF6cgCE@krava
> Cc: stable@...r.kernel.org
> Signed-off-by: Lorenzo Stoakes <lstoakes@...il.com>
> ---
> fs/proc/kcore.c | 26 +++++++++++++++++++++++++-
> 1 file changed, 25 insertions(+), 1 deletion(-)
Tested-by: Will Deacon <will@...nel.org>
I can confirm this fixes the arm64 issue reported by Mike over at [1].
Cheers,
Will
[1] https://lore.kernel.org/r/b39c62d29a431b023e98959578ba87e96af0e030.camel@gmx.de
Powered by blists - more mailing lists