linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linuxppc-dev@lists.ozlabs.org
Subject: [Bug 204479] KASAN hit at modprobe zram
Date: Fri, 09 Aug 2019 14:08:01 +0000	[thread overview]
Message-ID: <bug-204479-206035-2jz5ZXiuBc@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-204479-206035@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=204479

--- Comment #11 from Christophe Leroy (christophe.leroy@c-s.fr) ---
Thanks. Then it is not about SMP allthough there's anyway a theoritical problem
with SMP that's I'll address in another patch.

I think I finally spotted the issue. Let's take the first occurence of the
first log:

Aug 08 23:39:58 T600 kernel: ###### module_alloc(4718) = f1065000
[fe20ca00-fe20d2e3]
[...]
Aug 08 23:39:59 T600 kernel: BUG: Unable to handle kernel data access at
0xfe20d040

In kasan_init_region(), the loop starts with k_cur = 0xfe20ca00 to set the pte
for the first shadow page at 0xfe20c000. Then k_cur is increased by PAGE_SIZE
so now k_cur = 0xfe20da00.

As this is over 0xfe20d2e3, it doesn't set the pte for the second page at
0xfe20d000.

It should be fixed by changing the init value of k_cur in the for() loop of
kasan_init_region() by:

for (k_cur = k_start & PAGE_MASK; ....)

Can you test it ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2019-08-09 14:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-204479-206035@https.bugzilla.kernel.org/>
2019-08-05  0:34 ` [Bug 204479] KASAN hit at modprobe zram bugzilla-daemon
2019-08-05  7:07 ` bugzilla-daemon
2019-08-05 14:00 ` bugzilla-daemon
2019-08-08 13:57 ` bugzilla-daemon
2019-08-08 21:55 ` bugzilla-daemon
2019-08-08 21:57 ` bugzilla-daemon
2019-08-08 21:58 ` bugzilla-daemon
2019-08-09  5:34 ` bugzilla-daemon
2019-08-09  5:38 ` bugzilla-daemon
2019-08-09 10:44 ` bugzilla-daemon
2019-08-09 14:08 ` bugzilla-daemon [this message]
2019-08-09 15:10 ` bugzilla-daemon
2019-08-09 17:50 ` bugzilla-daemon
2019-08-09 17:52 ` bugzilla-daemon
2019-08-09 20:31 ` bugzilla-daemon
2019-08-10 14:42 ` bugzilla-daemon
2019-08-12 16:01 ` bugzilla-daemon
2019-08-12 16:06 ` bugzilla-daemon
2019-08-13 11:12 ` bugzilla-daemon
2019-08-13 11:21 ` bugzilla-daemon
2019-08-13 11:49 ` bugzilla-daemon
2019-10-06 20:52 ` bugzilla-daemon

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=bug-204479-206035-2jz5ZXiuBc@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).