lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a27Qx=A9zNheYNF2oZaRUQm-4h_8nPUF2xTdL+kqFrV5g@mail.gmail.com>
Date:   Thu, 13 Sep 2018 16:00:54 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     andrew.murray@....com
Cc:     Will Deacon <will.deacon@....com>,
        "zhichang.yuan" <yuanzhichang@...ilicon.com>,
        dann.frazier@...onical.com,
        Gabriele Paoloni <gabriele.paoloni@...wei.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        linux-pci <linux-pci@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        jean-philippe.brucker@....com
Subject: Re: [PATCH] asm-generic: io: Fix ioport_map() for !CONFIG_GENERIC_IOMAP
 && CONFIG_INDIRECT_PIO

On Thu, Sep 13, 2018 at 2:48 PM Andrew Murray <andrew.murray@....com> wrote:
>
> The !CONFIG_GENERIC_IOMAP version of ioport_map uses MMIO_UPPER_LIMIT to
> prevent users from making I/O accesses outside the expected I/O range -
> however it erroneously treats MMIO_UPPER_LIMIT as a mask which is
> contradictory to its other users.
>
> The introduction of CONFIG_INDIRECT_PIO, which subtracts an arbitrary
> amount from IO_SPACE_LIMIT to form MMIO_UPPER_LIMIT, results in ioport_map
> mangling the given port rather than capping it.
>
> We address this by aligning more closely with the CONFIG_GENERIC_IOMAP
> implementation of ioport_map by using the comparison operator and
> returning NULL where the port exceeds MMIO_UPPER_LIMIT. Though note that
> we preserve the existing behavior of masking with IO_SPACE_LIMIT such that
> we don't break existing buggy drivers that somehow rely on this masking.
>
> Fixes: 5745392e0c2b ("PCI: Apply the new generic I/O management on PCI IO hosts")
> Reported-by: Will Deacon <will.deacon@....com>
> Signed-off-by: Andrew Murray <andrew.murray@....com>

Looks good to me,
Reviewed-by: Arnd Bergmann <arnd@...db.de>

Can you take this through the arm64 tree?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ