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: <1610729929-188490-4-git-send-email-john.garry@huawei.com>
Date:   Sat, 16 Jan 2021 00:58:48 +0800
From:   John Garry <john.garry@...wei.com>
To:     <catalin.marinas@....com>, <will@...nel.org>, <arnd@...db.de>,
        <akpm@...ux-foundation.org>, <xuwei5@...ilicon.com>,
        <lorenzo.pieralisi@....com>, <helgaas@...nel.org>,
        <jiaxun.yang@...goat.com>, <song.bao.hua@...ilicon.com>
CC:     <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-arch@...r.kernel.org>,
        <linux-mips@...r.kernel.org>, <linux-pci@...r.kernel.org>,
        <linuxarm@...neuler.org>, John Garry <john.garry@...wei.com>
Subject: [PATCH RFC 3/4] kernel/resource: Make ioport_resource.start configurable

Make IO space base address to be configurable through IO_SPACE_BASE.

This will allow architectures which do not natively support IO ports -
like arm64 - to harden against legacy ISA-based drivers which use
hardcoded addresses to access IO ports.

Any attempts for these drivers to request a resource region will now fail
for architectures with set IO_SPACE_BASE above legacy ISA IO port region
(0xffff).

Signed-off-by: John Garry <john.garry@...wei.com>
---
 kernel/resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/resource.c b/kernel/resource.c
index 3ae2f56cc79d..d191c4d796c7 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -29,7 +29,7 @@
 
 struct resource ioport_resource = {
 	.name	= "PCI IO",
-	.start	= 0,
+	.start	= IO_SPACE_BASE,
 	.end	= IO_SPACE_LIMIT,
 	.flags	= IORESOURCE_IO,
 };
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ