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: <ae881ab5-a6f9-20fa-0f2b-e1363af77857@suse.com>
Date:   Fri, 2 Jun 2023 08:06:47 +0200
From:   Juergen Gross <jgross@...e.com>
To:     Dave Hansen <dave.hansen@...el.com>,
        Ross Lagerwall <ross.lagerwall@...rix.com>,
        linux-kernel@...r.kernel.org, xen-devel@...ts.xenproject.org
Cc:     Jan Beulich <jbeulich@...e.com>,
        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>,
        Peter Jones <pjones@...hat.com>,
        Konrad Rzeszutek Wilk <konrad@...nel.org>
Subject: Re: [PATCH v2] iscsi_ibft: Fix finding the iBFT under Xen Dom 0

On 01.06.23 18:57, Dave Hansen wrote:
> On 5/30/23 08:01, Ross Lagerwall wrote:
>> Since firmware doesn't indicate the iBFT in the E820, add a reserved
>> region so that it gets identity mapped when running as Dom 0 so that it
>> is possible to search for it. Move the call to reserve_ibft_region()
>> later so that it is called after the Xen identity mapping adjustments
>> are applied.
>>
>> Finally, instead of using isa_bus_to_virt() which doesn't do the right
>> thing under Xen, use early_memremap() like the dmi_scan code does.
> 
> This is connecting Xen, iSCSI and x86.  Some background here would be
> *really* nice for dummies like me that deal heavily in only one of those
> three.
> 
> One or two sentences like this:
> 
> 	Firmware can provide an iSCSI-specific table called the iBFT
> 	which helps the OS boot from iSCSI devices.
> 
> can go a long way for dummies like me.  As could some background about
> why this:
> 
> 	... add a reserved region so that it gets identity mapped when
> 	running as Dom 0 so that it is possible to search for it.
> 
> These are all English words, but off the top of my head, I have no idea
> why reserved regions get identity mapped when running as Dom 0 or why
> that makes it possible to search.
> 
> The addresses and size here:
> 
>> +#ifdef CONFIG_ISCSI_IBFT_FIND
>> +		/* Reserve 0.5 MiB to 1 MiB region so iBFT can be found */
>> +		xen_e820_table.entries[xen_e820_table.nr_entries].addr = 0x80000;
>> +		xen_e820_table.entries[xen_e820_table.nr_entries].size = 0x80000;
>> +		xen_e820_table.entries[xen_e820_table.nr_entries].type = E820_TYPE_RESERVED;
>> +		xen_e820_table.nr_entries++;
>> +#endif
> 
> also appear to be conjured out of thin air.

I'd suggest to move the definitions of IBFT_START and IBFT_END from
drivers/firmware/iscsi_ibft_find.c to include/linux/iscsi_ibft.h and use
them here.


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3099 bytes)

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ