Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1623496
| From | Gary Lin <glin@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] x86: Config options to assign versions in the PE-COFF header |
| Date | 2017-04-14 06:00 +0200 |
| Message-ID | <tw0yR-4r2-1@gated-at.bofh.it> (permalink) |
| References | <tv1dE-5J4-9@gated-at.bofh.it> <tvVpv-Xu-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Apr 13, 2017 at 03:21:20PM -0700, hpa@zytor.com wrote: > On April 11, 2017 3:20:41 AM PDT, Gary Lin <glin@suse.com> wrote: > >This commit adds the new config options to allow the user to modify the > >following fields in the PE-COFF header. > > > >UINT16 MajorOperatingSystemVersion > >UINT16 MinorOperatingSystemVersion > >UINT16 MajorImageVersion > >UINT16 MinorImageVersion > > > >Those fields are mainly for the executables or libraries in Windows NT > >or higher to specify the minimum supported Windows version and the > >version of the image itself. > > > >Given the fact that those fields are ignored in UEFI, we can safely > >reuse > >those fields for other purposes, e.g. Security Version(*). > > > >(*) https://github.com/lcp/shim/wiki/Security-Version > > > >Cc: Thomas Gleixner <tglx@linutronix.de> > >Cc: Ingo Molnar <mingo@redhat.com> > >Cc: "H. Peter Anvin" <hpa@zytor.com> > >Cc: Masahiro Yamada <yamada.masahiro@socionext.com> > >Cc: Michal Marek <mmarek@suse.com> > >Cc: Matt Fleming <matt@codeblueprint.co.uk> > >Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > >Cc: Joey Lee <jlee@suse.com> > >Cc: Vojtech Pavlik <vojtech@suse.cz> > >Signed-off-by: Gary Lin <glin@suse.com> > >Tested-by: Joey Lee <jlee@suse.com> > >--- [snip] > > Reusing PECOFF fields seems doubleplusunsafe: we don't own those fields, the UEFI forum does. It would make a lot more sense to add these fields to the bzImage header directly or indirectly (via a pointer), the latter would be more economical since the bzImage header size is bounded. > > We could even define it as a pointer to a "security information header" with its own size field, so it can be grown in the future as needed. Reusing PE-COFF simplifies the implementation since shim can parse the header directly. I can raise the issue to the UEFI forum to clarify the usage of those fields. Meanwhile, I'll also look into the bzImage header in case the PE-COFF header is really a NO-GO. Thanks, Gary Lin
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH] x86: Config options to assign versions in the PE-COFF header Gary Lin <glin@suse.com> - 2017-04-11 12:30 +0200
Re: [RFC PATCH] x86: Config options to assign versions in the PE-COFF header Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-04-11 19:40 +0200
Re: [RFC PATCH] x86: Config options to assign versions in the PE-COFF header Gary Lin <glin@suse.com> - 2017-04-12 05:40 +0200
Re: [RFC PATCH] x86: Config options to assign versions in the PE-COFF header hpa@zytor.com - 2017-04-14 00:30 +0200
Re: [RFC PATCH] x86: Config options to assign versions in the PE-COFF header Gary Lin <glin@suse.com> - 2017-04-14 06:00 +0200
Re: [RFC PATCH] x86: Config options to assign versions in the PE-COFF header hpa@zytor.com - 2017-04-14 07:30 +0200
csiph-web