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: <Zs7AVTEiW2R_vB-f@infradead.org>
Date: Tue, 27 Aug 2024 23:14:45 -0700
From: Christoph Hellwig <hch@...radead.org>
To: "Maciej W. Rozycki" <macro@...am.me.uk>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
	Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Rick Edgecombe <rick.p.edgecombe@...el.com>,
	Isaku Yamahata <isaku.yamahata@...el.com>,
	Kevin Loughlin <kevinloughlin@...gle.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/EISA: Use memremap() to probe for the EISA BIOS
 signature

On Sat, Aug 24, 2024 at 11:17:10PM +0100, Maciej W. Rozycki wrote:
> -	void __iomem *p;
> +	void *p;
>  
>  	if ((xen_pv_domain() && !xen_initial_domain()) || cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
>  		return 0;
>  
> -	p = ioremap(0x0FFFD9, 4);
> +	p = memremap(0x0FFFD9, 4, MEMREMAP_WB);
>  	if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
>  		EISA_bus = 1;

readl requires and __iomem pointer.  If this is just a memory region you
can and should directly dereference the address instead.

Note that sparse will complain about the above as well.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ