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  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]
Date:	Tue,  4 Mar 2014 15:50:14 +0000
From:	Liviu Dudau <>
To:	linux-pci <>,
	Bjorn Helgaas <>,
	Catalin Marinas <>,
	Will Deacon <>,
	linaro-kernel <>
Cc:	Benjamin Herrenschmidt <>,
	LKML <>,
	"" <>,
	LAKML <>,
	Tanmay Inamdar <>,
	Arnd Bergmann <>
Subject: [PATCH v5 1/3] Fix ioport_map() for !CONFIG_GENERIC_IOMAP cases.

The inline version of ioport_map() that gets used when !CONFIG_GENERIC_IOMAP
is wrong. It returns a mapped (i.e. virtual) address that can start from
zero and completely ignores the PCI_IOBASE and IO_SPACE_LIMIT that most
architectures that use !CONFIG_GENERIC_MAP define.

Signed-off-by: Liviu Dudau <>
Acked-by: Arnd Bergmann <>

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index d5afe96..df72051 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -331,7 +331,7 @@ static inline void iounmap(void __iomem *addr)
 static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
-	return (void __iomem *) port;
+	return (void __iomem *)(PCI_IOBASE + (port & IO_SPACE_LIMIT));
 static inline void ioport_unmap(void __iomem *p)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists