All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+7134530b25073b4ef373@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: Re: [syzbot] [pci?] BUG: unable to handle kernel paging request in pci_resource_io
Date: Sat, 08 Aug 2026 21:44:02 -0700	[thread overview]
Message-ID: <6a780592.b50370da.49fe0.0037.GAE@google.com> (raw)
In-Reply-To: <6a778f12.b50370da.49fe0.002d.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: Re: [syzbot] [pci?] BUG: unable to handle kernel paging request in pci_resource_io
Author: rihyeon8648@gmail.com

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git ba5cc80fd32665ed609037ff30ede8d194f24aab

diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 5ec0b24..2aba909 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -1175,6 +1175,16 @@ static ssize_t pci_resource_io(struct file *filp, struct kobject *kobj,
 	if (port + count - 1 > pci_resource_end(pdev, bar))
 		return -EINVAL;

+	/*
+	 * Architectures that have no separate I/O address space emulate port
+	 * I/O with an MMIO window at PCI_IOBASE, so @port becomes an address
+	 * in a Device memory mapping.  Unaligned accesses to Device memory
+	 * fault there, and @port is fully controlled by the file offset, so
+	 * require the access to be naturally aligned.
+	 */
+	if (!IS_ALIGNED(port, count))
+		return -EINVAL;
+
 	switch (count) {
 	case 1:
 		if (write)

      parent reply	other threads:[~2026-08-09  4:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08 20:18 [syzbot] [pci?] BUG: unable to handle kernel paging request in pci_resource_io syzbot
2026-08-09  1:28 ` Rihyeon Kim
2026-08-09  4:44 ` syzbot [this message]

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=6a780592.b50370da.49fe0.0037.GAE@google.com \
    --to=syzbot+7134530b25073b4ef373@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.