From: Mike Galbraith <efault@gmx.de>
To: Will Deacon <will@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>, Mark Rutland <mark.rutland@arm.com>
Subject: Re: arm64: perf test 26 rpi4 oops
Date: Sun, 30 Jul 2023 07:54:40 +0200 [thread overview]
Message-ID: <069dd40aa71e634b414d07039d72467d051fb486.camel@gmx.de> (raw)
In-Reply-To: <20230728141852.GA21718@willie-the-truck>
On Fri, 2023-07-28 at 15:18 +0100, Will Deacon wrote:
>
> Looking at this quickly with Mark, the most likely explanation is that
> a bogus kernel address is being passed as the source pointer to
> copy_to_user(). On a whim, are you able to revert 4c91c07c93bb ("mm:
> vmalloc: convert vread() to vread_iter()") and see if the issue persists? If
> not, maybe you can try the commit before?
Ok, did that. Neither helped, I had to revert 2e1c0170771e
6.1.42 clean
6.2.16 not so clean
[ 180.564427] __vm_enough_memory: pid: 1935, comm: objdump, no enough memory for the allocation
[ 180.564445] __vm_enough_memory: pid: 1935, comm: objdump, no enough memory for the allocation
6.4.7 oops
+Revert-mm-vmalloc-convert-vread-to-vread_iter.patch oops
+Revert-iov_iter-add-copy_page_to_iter_nofault.patch oops
+Revert-fs-proc-kcore-convert-read_kcore-to-read_kcore_iter.patch oops
+Revert-fs-proc-kcore-avoid-bounce-buffer-for-ktext-data.patch back to 6.2 induced alloc failures
[ 48.718233] __vm_enough_memory: pid: 1747, comm: objdump, not enough memory for the allocation
[ 48.718264] __vm_enough_memory: pid: 1747, comm: objdump, not enough memory for the allocation
6.4.7 plus only arm64 revert (sorta) of e025ab842ec3 does the same
[ 37.587688] Unhandled KCORE type: 0
[ 37.611042] __vm_enough_memory: pid: 1736, comm: objdump, not enough memory for the allocation
[ 37.611073] __vm_enough_memory: pid: 1736, comm: objdump, not enough memory for the allocation
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -554,6 +554,8 @@ static ssize_t read_kcore_iter(struct ki
fallthrough;
case KCORE_VMEMMAP:
case KCORE_TEXT:
+ if (!kern_addr_valid(start))
+ goto invalid_addr;
/*
* We use _copy_to_iter() to bypass usermode hardening
* which would otherwise prevent this operation.
@@ -563,6 +565,7 @@ static ssize_t read_kcore_iter(struct ki
goto out;
}
break;
+invalid_addr:
default:
pr_warn_once("Unhandled KCORE type: %d\n", m->type);
if (iov_iter_zero(tsz, iter) != tsz) {
next prev parent reply other threads:[~2023-07-30 5:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 4:06 Mike Galbraith
2023-07-28 14:18 ` Will Deacon
2023-07-28 15:12 ` Mike Galbraith
2023-07-28 15:23 ` Will Deacon
2023-07-28 16:35 ` Mike Galbraith
2023-07-29 16:30 ` Mike Galbraith
2023-07-30 5:54 ` Mike Galbraith [this message]
2023-07-30 11:01 ` Mike Galbraith
2023-07-30 16:09 ` Mike Galbraith
2023-07-31 10:43 ` Will Deacon
2023-07-31 11:37 ` Mike Galbraith
2023-07-31 11:52 ` Will Deacon
2023-07-31 16:07 ` Mike Galbraith
2023-07-31 21:08 ` Lorenzo Stoakes
2023-07-31 21:54 ` Lorenzo Stoakes
2023-07-31 23:27 ` Mike Galbraith
2023-07-31 23:48 ` Mike Galbraith
2023-08-01 0:33 ` Mike Galbraith
2023-08-01 4:34 ` Mike Galbraith
2023-08-01 7:27 ` Will Deacon
2023-08-01 8:39 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=069dd40aa71e634b414d07039d72467d051fb486.camel@gmx.de \
--to=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®