From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CFAF1A6814 for ; Sun, 9 Aug 2026 04:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786250644; cv=none; b=fwC2LB4aMQKv6gQC6H4y4k+igbuJlxsKSz7OqNliFQyej8IdArsTtQBoV1dNg4E4ngTNzpcwkAOdExjAYGT1i9ETLLYy0VInC/9xGkHnkT1/MDTQ7Nkb8EFnGnR9dcnAvLGGVPZ0XGTE0kQD+4k5yQr58HN5XWj7wF612cSkihw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786250644; c=relaxed/simple; bh=obKTOyzW12GlmzkKEZCEJi5vwBJH10T5O51fipTZglo=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=lGPuFrmLShQRRn6jVGaI+F/89nSWu/ropOXTmtl6cBxAdD0dQ8mT0Q183ACV2Fq5mZAGgeEpFcdnEQixVq8CarDm5p5oBKwuS2fxoXFYBOtmNd3JhFzBxj+/358XcFzwITedTqxZZuRWANrS6bmcnHzH210QiWhiKXq2hznZJtU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.167.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-4a36606e230so1264339b6e.2 for ; Sat, 08 Aug 2026 21:44:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786250642; x=1786855442; h=content-type:to:from:subject:message-id:in-reply-to:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=tQ6UIHCI5UGvDbKR0DuzOUpqJ7Ja8M74yKWr8XvOtOo=; b=hHtJPrccBGZL0v1VvEABEKOmpfM3sepzkiBIw2guM3esDTilIPAQ65IsueSwrBnvr2 avY3dDI1Ld7ZFteN3s8859oU86YOjzw2H20aP9tAEsxe3oMUcy4x20LCAk1Hm9SQdMCJ FS2rRp3+EL6jDwj7leYTi0SvIr8HEFCcUB2lb90BkWdkChaZnTE3L8AkHdSy+TaDHzWj vBKJXqAX6ynntktmqQFLyBQ8DZlRg4YGOVQDp6A69XqWk785f4NjG2nXHauVlrDY8gzf UfLy2xL0sJvT6vn7fkO/NVbtrYQXghNxiC8JO5vi1j8rdXBl4OZsPtn2ACAqWEh2nAGh QWoA== X-Gm-Message-State: AOJu0YxI0j1YStriEPoJmiH5TguUWNKbylS5C1r/KZ1wl0PS7ta6/oOn 49+0VtCy2V+/9eVw2h8exIc+5wCe0S/p8huQgw8iOEJH5ErjmoMgdzefkz1lFgPyTfhclCpxXhl ewrpv1FVgdSycXVkrjUqTRetnpYVPA7begb/1GsWN6jqIFea/iIFtM5Mq+NA= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6808:14cc:b0:492:5b42:ab02 with SMTP id 5614622812f47-4b1a08de5a3mr7511248b6e.0.1786250642415; Sat, 08 Aug 2026 21:44:02 -0700 (PDT) Date: Sat, 08 Aug 2026 21:44:02 -0700 In-Reply-To: <6a778f12.b50370da.49fe0.002d.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a780592.b50370da.49fe0.0037.GAE@google.com> Subject: Forwarded: Re: [syzbot] [pci?] BUG: unable to handle kernel paging request in pci_resource_io From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" 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)