Re: [PATCH V3] iscsi_ibft: fix crash due to KASLR physical memory remapping

From: Konrad Rzeszutek Wilk
Date: Tue Aug 10 2021 - 14:17:58 EST


On Tue, Aug 10, 2021 at 06:00:24PM +0100, Christoph Hellwig wrote:
> > Fix this bug by saving the address of the physical location
> > of the ibft; later the driver will use isa_bus_to_virt() to get
> > the correct virtual address.
>
> That sound rather broken. Why not save the physical address in
> find_ibft_region and then later ioremap that when a virtual address is
> needed like all other code accessing magic I/O memory?

That is kind of what he does. The physical address is saved as a global
static variable and also the physical address is memreserved. Then
later on the physical address is used to create the virtual address.

Or are you thinking of making the find_ibft_region reserve the physical
address, and _cache_ the physical address so there is no global
variable ?