From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: linux-alpha@vger.kernel.org
Cc: Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: kernel oops when reading /proc/bus/pci/00/01.00 with odd size and odd alignment
Date: Wed, 22 Dec 2021 14:36:12 +0000 [thread overview]
Message-ID: <f26b1e6f-f3fc-191b-e613-c0b5748e26ef@gmail.com> (raw)
Hi,
While testing the Alpha kernel with stress-ng procfs test I found that
misaligned odd reads cause an oops. I was able to figure out a simple
reproducer as follows:
dd seek=1 if=/proc/bus/pci/00/01.0 of=/dev/zero bs=5
[ 2013.722601] Unable to handle kernel paging request at virtual address
0000000000000004
[ 2013.722601] dd(1195): Oops -1
[ 2013.722601] pc = [<0000000000000004>] ra = [<fffffc00014fd634>] ps
= 0000 Tainted: G D E
[ 2013.722601] pc is at 0x4
[ 2013.722601] ra is at proc_bus_pci_read+0x244/0x3d0
[ 2013.722601] v0 = 0000000000000000 t0 = 0000000009080000 t1 =
0000000000000000
[ 2013.722601] t2 = 0000000009080000 t3 = 0000000000000000 t4 =
fffffc0006c43f08
[ 2013.722601] t5 = 0000000000000011 t6 = 0000000000000012 t7 =
fffffc0006c40000
[ 2013.722601] s0 = fffffc0000967000 s1 = 0000000000000005 s2 =
000000012002a005
[ 2013.722601] s3 = 000000012002a001 s4 = 0000000000000010 s5 =
0000000000000000
[ 2013.722601] s6 = ffffffffdffd600f
[ 2013.722601] a0 = 0000000000000000 a1 = fffffd01fe000810 a2 =
0000000000000010
[ 2013.722601] a3 = 0000000000000004 a4 = fffffc0006c43dd8 a5 =
fffffc0003c05dd8
[ 2013.722601] t8 = 0000000000000001 t9 = 0000000000000001 t10=
000000012002e058
[ 2013.722601] t11= 000000012002e058 pv = fffffc0001023650 at =
0000000010a8b186
[ 2013.726508] gp = fffffc00025197f8 sp = 00000000d1f90b3a
[ 2013.726508] Trace:
[ 2013.726508] [<fffffc00012d39e8>] proc_reg_read+0xc8/0x140
[ 2013.727484] [<fffffc000120ed58>] vfs_read+0xd8/0x220
[ 2013.727484] [<fffffc000120ed14>] vfs_read+0x94/0x220
[ 2013.727484] [<fffffc00010110ec>] entMM+0x9c/0xc0
[ 2013.727484] [<fffffc000120f274>] ksys_read+0x84/0x130
[ 2013.728461] [<fffffc000101149c>] entSys+0xac/0xc0
[ 2013.728461] Code:
[ 2013.728461] 00000000
[ 2013.728461] 00063301
[ 2013.728461] 000012c8
[ 2013.729437] 00001111
[ 2013.729437] 0003fac6
Colin
reply other threads:[~2021-12-22 14:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=f26b1e6f-f3fc-191b-e613-c0b5748e26ef@gmail.com \
--to=colin.i.king@gmail.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=rth@twiddle.net \
/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®