From: "Jan Beulich" Subject: Re: [PATCH for-4.5] EFI: Always use EFI command line Date: Fri, 24 Oct 2014 11:48:01 +0100 Message-ID: <544A4A810200007800041DE9@mail.emea.novell.com> References: <1414109782-22961-1-git-send-email-roy.franz@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1414109782-22961-1-git-send-email-roy.franz@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roy Franz Cc: tim@xen.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com, fu.wei@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 24.10.14 at 02:16, wrote: > There is no change in behavior for x86 since it unconditionally uses the > config file. I'm afraid there is: > @@ -904,8 +904,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) > efi_bs->FreePool(name.w); > } > > - name.s = get_value(&cfg, section.s, "options"); > - efi_arch_handle_cmdline(argc ? *argv : NULL, options, name.s); > + cfg_options.s = get_value(&cfg, section.s, "options"); > > if ( !base_video ) > { Between this and the below code fragments there is efi_bs->FreePages(cfg.addr, PFN_UP(cfg.size)); > @@ -930,8 +929,8 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) > cfg.addr = 0; > > dir_handle->Close(dir_handle); > - > } > + efi_arch_handle_cmdline(argc ? *argv : NULL, options, cfg_options.s); i.e. you're accessing freed data here. Jan