From: duziming <duziming2@huawei.com>
To: <bhelgaas@google.com>
Cc: chrisw@redhat.com, duziming2@huawei.com,
jbarnes@virtuousgeek.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, liuyongqiang13@huawei.com,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>
Subject: Re: [PING] PCI/sysfs: Prohibit unaligned access to I/O port
Date: Thu, 30 Jul 2026 19:36:04 +0800 [thread overview]
Message-ID: <7e2c3fd2-6b1f-4ccc-8657-ef94bbc0f86e@huawei.com> (raw)
In-Reply-To: <20260503200256.GA1393215@rocinante>
> Unaligned access is harmful for non-x86 archs such as arm64. When we
> use pwrite or pread to access the I/O port resources with unaligned
> offset, system will crash as follows:
>
> Unable to handle kernel paging request at virtual address fffffbfffe8010c1
> Internal error: Oops: 0000000096000061 [#1] SMP
> Call trace:
> _outw include/asm-generic/io.h:594 [inline]
> logic_outw+0x54/0x218 lib/logic_pio.c:305
> pci_resource_io drivers/pci/pci-sysfs.c:1157 [inline]
> pci_write_resource_io drivers/pci/pci-sysfs.c:1191 [inline]
> pci_write_resource_io+0x208/0x260 drivers/pci/pci-sysfs.c:1181
> sysfs_kf_bin_write+0x188/0x210 fs/sysfs/file.c:158
> kernfs_fop_write_iter+0x2e8/0x4b0 fs/kernfs/file.c:338
> vfs_write+0x7bc/0xac8 fs/read_write.c:586
> ksys_write+0x12c/0x270 fs/read_write.c:639
> __arm64_sys_write+0x78/0xb8 fs/read_write.c:648
>
> Although x86 might handle unaligned I/O accesses by splitting cycles,
> this approach is still limited because PCI device registers typically
> expect natural alignment. A global prohibition of unaligned accesses
> ensures consistent behavior across all architectures and prevents
> unexpected hardware side effects.
Hi Bjorn,
Just a gentle ping on this patch. We have received Reviewed-by tags
from Ilpo Järvinen and Krzysztof.
Could you please let us know if this is queued for the upcoming merge
window, or if you need any further action from our side?
Thank you!
ziming
prev parent reply other threads:[~2026-07-30 11:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 9:55 [PATCH] PCI/sysfs: Prohibit unaligned access to I/O port Ziming Du
2026-04-08 10:02 ` Ilpo Järvinen
2026-04-09 8:09 ` Ilpo Järvinen
2026-05-03 20:31 ` Krzysztof Wilczyński
2026-07-30 11:36 ` duziming [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=7e2c3fd2-6b1f-4ccc-8657-ef94bbc0f86e@huawei.com \
--to=duziming2@huawei.com \
--cc=bhelgaas@google.com \
--cc=chrisw@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jbarnes@virtuousgeek.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liuyongqiang13@huawei.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