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
| ||
|
Message-ID: <93cafa4e-9053-119e-b4e2-1a1500539409@redhat.com> Date: Tue, 12 Dec 2017 10:54:22 +0100 From: Paolo Bonzini <pbonzini@...hat.com> To: Jan Beulich <JBeulich@...e.com>, Maran Wilson <maran.wilson@...cle.com> Cc: andrew.cooper3@...rix.com, roger.pau@...rix.com, hch@...radead.org, x86@...nel.org, tglx@...utronix.de, xen-devel@...ts.xenproject.org, boris.ostrovsky@...cle.com, mingo@...hat.com, rkrcmar@...hat.com, Juergen Gross <jgross@...e.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org, hpa@...or.com Subject: Re: [RFC PATCH v2 1/2] xen/pvh: Add memory map pointer to hvm_start_info struct On 12/12/2017 09:06, Jan Beulich wrote: >>>> On 11.12.17 at 22:59, <pbonzini@...hat.com> wrote: >> On 08/12/2017 09:49, Jan Beulich wrote: >>>> + * The layout of each entry in the memory map table is as follows and no >>>> + * padding is used between entries in the array: >>>> + * >>>> + * 0 +----------------+ >>>> + * | addr | Base address >>>> + * 8 +----------------+ >>>> + * | size | Size of mapping >>>> + * 16 +----------------+ >>>> + * | type | E820_TYPE_xxx >>>> + * 20 +----------------| >>> I'm not convinced of re-using E820 types here. I can see that this >>> might ease the consumption in Linux, but I don't think there should >>> be any connection to x86 aspects here - the data being supplied is >>> x86-agnostic, and Linux'es placement of the header is also making >>> no connection to x86 (oddly enough, the current placement in the >>> Xen tree does, for a reason which escapes me). >> >> FWIW, e820 types are now part of the ACPI standard. So using them is >> not necessarily related to x86, and reasonably x86-agnostic. > > Sort of - the description of it starts with "This interface is used in > real mode only on IA-PC-based systems ..." Note I said the e820 *types*. While the interface is there for PC compatibility, the ACPI address range types (AddressRangeMemory, AddressRangeReserved, AddressRangeACPI, etc.) are exactly the e820 types. > But it being there is useful in another way: It shows that there's > an optional field making the full structure 64-bit aligned again. (It > at the same time shows - I admit I had forgotten about this aspect - > that the structure size isn't fixed in the first place, so consumers > have to convert [truncate/extend] the output to their internal > representation anyway, and hence there's even less of a reason > to tie the proposed structure's layout to the E820 one.) My point was that the e820 types are okay to use in an architecture-agnostic way in my opinion. The layout only matters so much, as there aren't many ways to encode a memory map (note I do agree about that alignment dword). Paolo
Powered by blists - more mailing lists