Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752009AbdDNFWq convert rfc822-to-8bit (ORCPT ); Fri, 14 Apr 2017 01:22:46 -0400 Received: from terminus.zytor.com ([65.50.211.136]:49163 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbdDNFWo (ORCPT ); Fri, 14 Apr 2017 01:22:44 -0400 Date: Thu, 13 Apr 2017 22:17:40 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20170414035119.v2kjxcsuauj3bdj2@GaryWorkstation> References: <20170411102041.19771-1-glin@suse.com> <8E544119-66B8-4482-BBE9-68B6C7A3AAE9@zytor.com> <20170414035119.v2kjxcsuauj3bdj2@GaryWorkstation> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [RFC PATCH] x86: Config options to assign versions in the PE-COFF header To: Gary Lin CC: Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Masahiro Yamada , Michal Marek , Matt Fleming , Ard Biesheuvel , Joey Lee , Vojtech Pavlik From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2286 Lines: 60 On April 13, 2017 8:51:19 PM PDT, Gary Lin wrote: >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 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 >> >Cc: Ingo Molnar >> >Cc: "H. Peter Anvin" >> >Cc: Masahiro Yamada >> >Cc: Michal Marek >> >Cc: Matt Fleming >> >Cc: Ard Biesheuvel >> >Cc: Joey Lee >> >Cc: Vojtech Pavlik >> >Signed-off-by: Gary Lin >> >Tested-by: Joey Lee >> >--- >[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 If we are going to use the PE-COFF hear then you need to write a proposal and get the UEFI forum to sign off on it. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.