Re: [PATCH] PCI: sysfs: Reject unaligned resource I/O port accesses
From: Deepanshu Kartikey
Date: Mon Sep 28 2026 - 08:42:40 EST
On Thu, Sep 24, 2026 at 3:21 AM David Laight
<david.laight.linux@xxxxxxxxx> wrote:
>
> On Wed, 23 Sep 2026 15:55:18 -0500
> Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
> >
> > What do you think of the sashiko comments:
> > https://lore.kernel.org/all/20260809051652.36BA31F000E9@xxxxxxxxxxxxxxx?
> >
>
> You could just add 'if (port & 1) return -EINVAL;' to the 'case 2:' branch,
> and a similar '& 3' to the 'case 4:' one.
>
> Did it miss that loff_t is (probably) 64bit on 32bit?
> Or do large offsets get detected earlier?
>
> David
Thanks David for the suggestion. I have send patch v2
Thanks
Deepanshu