From: "Robert Święcki" <robert@swiecki.net>
To: Hugh Dickins <hughd@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Miklos Szeredi <miklos@szeredi.hu>,
Michel Lespinasse <walken@google.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH] mm: fix possible cause of a page_mapped BUG
Date: Tue, 12 Apr 2011 11:58:36 +0200 [thread overview]
Message-ID: <BANLkTik_9YW5+64FHrzNy7kPz1FUWrw-rw@mail.gmail.com> (raw)
In-Reply-To: <alpine.LSU.2.00.1104070718120.28555@sister.anvils>
On Thu, Apr 7, 2011 at 4:24 PM, Hugh Dickins <hughd@google.com> wrote:
> On Thu, 7 Apr 2011, Robert Swiecki wrote:
>> >
>> > Testing with Linus' patch. Will let you know in a few hours.
>>
>> Ok, nothing happened after ~20h. The bug, usually, was triggered within 5-10h.
>>
>> I can add some printk in this condition, and let it run for a few days
>> (I will not have access to my testing machine throughout that time),
>> if you think this will confirm your hypothesis.
>
> That's great, thanks Robert. If the machine has nothing better to do,
> then it would be nice to let it run a little longer (a few days if that's
> what suits you), but it does look good so far. Though I'm afraid you'll
> now discover something else entirely ;)
Ok, I added printk here:
if (new_len > old_len) {
unsigned long pgoff;
if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP))
goto Efault;
pgoff = (addr - vma->vm_start) >> PAGE_SHIFT;
pgoff += vma->vm_pgoff;
if (pgoff + (new_len >> PAGE_SHIFT) < pgoff) {
printk("VMA_TO_RESIZE: ADDR:%lx OLD_LEN:%lx
NEW_LEN:%lx PGOFF: %lx VMA->VM_START:%lx VMA->VM_FLAGS:%lx",
addr, old_len, new_len, pgoff,
vma->vm_start, vma->vm_flags);
goto Einval;
}
}
and after a few mins of fuzzing I get:
[ 584.224028] VMA_TO_RESIZE: ADDR:f751f000 OLD_LEN:6000 NEW_LEN:c000
PGOFF: fffffffffffffffa VMA->VM_START:f751f000 VMA->VM_FLAGS:2321fa
[ 639.777561] VMA_TO_RESIZE: ADDR:f751f000 OLD_LEN:6000 NEW_LEN:b000
PGOFF: fffffffffffffffa VMA->VM_START:f751f000 VMA->VM_FLAGS:2301f8
So, if this case is not caught later on in the code, I guess it solves
the problem. During the fuzzing I didn't experience any panic's, but
some other problems arose, i.e. cannot read /proc/<pid>/maps for some
processes (sys_read hangs, and such process cannot be killed or
stopped with any signal, still it's running (R state) and using CPU -
I'll submit another report for that).
--
Robert Święcki
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-04-12 9:58 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-24 5:39 [PATCH] mm: fix possible cause of a page_mapped BUG Hugh Dickins
2011-02-28 23:35 ` Robert Święcki
2011-03-17 15:40 ` Robert Święcki
2011-03-19 5:34 ` Hugh Dickins
2011-04-01 14:34 ` Robert Święcki
2011-04-01 15:44 ` Linus Torvalds
2011-04-01 16:21 ` Robert Święcki
2011-04-01 16:35 ` Linus Torvalds
2011-04-02 4:01 ` Hui Zhu
2011-04-04 13:02 ` Robert Święcki
2011-04-02 1:46 ` Hugh Dickins
2011-04-04 12:46 ` Robert Święcki
2011-04-04 18:30 ` Hugh Dickins
2011-04-05 12:21 ` Robert Święcki
2011-04-05 15:37 ` Linus Torvalds
2011-04-06 14:47 ` Hugh Dickins
2011-04-06 15:32 ` Linus Torvalds
2011-04-06 15:43 ` Hugh Dickins
2011-04-06 15:59 ` Linus Torvalds
2011-04-06 17:54 ` Robert Święcki
2011-04-07 12:41 ` Robert Święcki
2011-04-07 14:24 ` Hugh Dickins
2011-04-12 9:58 ` Robert Święcki [this message]
2011-04-12 14:21 ` Linus Torvalds
[not found] ` <BANLkTik6U21r91DYiUsz9A0P--=5QcsBrA@mail.gmail.com>
2011-04-12 16:17 ` Robert Święcki
2011-04-12 17:19 ` Linus Torvalds
2011-04-12 18:59 ` Linus Torvalds
2011-04-12 19:02 ` Robert Święcki
2011-04-12 19:38 ` Linus Torvalds
2011-04-18 21:15 ` Michel Lespinasse
2011-05-05 0:09 ` Michel Lespinasse
2011-05-05 0:38 ` Linus Torvalds
2011-05-05 1:18 ` Michel Lespinasse
2011-05-05 1:40 ` Linus Torvalds
2011-05-05 3:37 ` Linus Torvalds
2011-05-05 4:26 ` Michel Lespinasse
2011-04-07 14:17 ` Hugh Dickins
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=BANLkTik_9YW5+64FHrzNy7kPz1FUWrw-rw@mail.gmail.com \
--to=robert@swiecki.net \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=riel@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=walken@google.com \
/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;
as well as URLs for NNTP newsgroup(s).