public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, dovmurik@linux.ibm.com
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Jordan Justen <jordan.l.justen@intel.com>,
	James Bottomley <jejb@linux.ibm.com>,
	Tobin Feldman-Fitzthum <tobin@linux.ibm.com>
Subject: Re: [edk2-devel] [PATCH v2 1/3] Revert "OvmfPkg/QemuKernelLoaderFsDxe: don't expose kernel command line"
Date: Thu, 24 Jun 2021 15:46:30 +0200	[thread overview]
Message-ID: <833fb66f-fa38-c8d0-ffef-d4115cf6a2b5@redhat.com> (raw)
In-Reply-To: <20210617121700.2883073-2-dovmurik@linux.ibm.com>

On 06/17/21 14:16, Dov Murik wrote:
> This reverts commit efc52d67e1573ce174d301b52fa1577d552c8441.
> 
> Manually fixed conflicts in:
>   OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
> 
> Note that besides re-exposing the kernel command line as a file in the
> synthetic filesystem, we also revert back to AllocatePool instead of
> AllocatePages.
> 
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Tobin Feldman-Fitzthum <tobin@linux.ibm.com>
> Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
> ---
>  OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

(1) The bugzilla ticket should be referenced in the commit message,
above your signoff:

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3457

With that update:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks,
Laszlo

> 
> diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
> index b09ff6a3590d..c7ddd86f5c75 100644
> --- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
> +++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
> @@ -33,6 +33,7 @@
>  typedef enum {
>    KernelBlobTypeKernel,
>    KernelBlobTypeInitrd,
> +  KernelBlobTypeCommandLine,
>    KernelBlobTypeMax
>  } KERNEL_BLOB_TYPE;
>  
> @@ -59,6 +60,11 @@ STATIC KERNEL_BLOB mKernelBlob[KernelBlobTypeMax] = {
>      {
>        { QemuFwCfgItemInitrdSize,      QemuFwCfgItemInitrdData,      },
>      }
> +  }, {
> +    L"cmdline",
> +    {
> +      { QemuFwCfgItemCommandLineSize, QemuFwCfgItemCommandLineData, },
> +    }
>    }
>  };
>  
> @@ -948,7 +954,7 @@ FetchBlob (
>    //
>    // Read blob.
>    //
> -  Blob->Data = AllocatePages (EFI_SIZE_TO_PAGES ((UINTN)Blob->Size));
> +  Blob->Data = AllocatePool (Blob->Size);
>    if (Blob->Data == NULL) {
>      DEBUG ((DEBUG_ERROR, "%a: failed to allocate %Ld bytes for \"%s\"\n",
>        __FUNCTION__, (INT64)Blob->Size, Blob->Name));
> @@ -1083,8 +1089,7 @@ FreeBlobs:
>    while (BlobType > 0) {
>      CurrentBlob = &mKernelBlob[--BlobType];
>      if (CurrentBlob->Data != NULL) {
> -      FreePages (CurrentBlob->Data,
> -        EFI_SIZE_TO_PAGES ((UINTN)CurrentBlob->Size));
> +      FreePool (CurrentBlob->Data);
>        CurrentBlob->Size = 0;
>        CurrentBlob->Data = NULL;
>      }
> 


  reply	other threads:[~2021-06-24 13:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 12:16 [RESEND] [PATCH v2 0/3] OvmfPkg: Use QemuKernelLoaderFs to read cmdline/initrd Dov Murik
2021-06-17 12:16 ` [PATCH v2 1/3] Revert "OvmfPkg/QemuKernelLoaderFsDxe: don't expose kernel command line" Dov Murik
2021-06-24 13:46   ` Laszlo Ersek [this message]
2021-06-27  8:58     ` [edk2-devel] " Dov Murik
2021-06-17 12:16 ` [PATCH v2 2/3] OvmfPkg/GenericQemuLoadImageLib: Read cmdline from QemuKernelLoaderFs Dov Murik
2021-06-24 17:49   ` [edk2-devel] " Laszlo Ersek
2021-06-27  9:05     ` Dov Murik
2021-06-17 12:17 ` [PATCH v2 3/3] OvmfPkg/X86QemuLoadImageLib: State fw_cfg dependency in file header Dov Murik
2021-06-24 17:53   ` [edk2-devel] " Laszlo Ersek
2021-06-27  8:59     ` Dov Murik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=833fb66f-fa38-c8d0-ffef-d4115cf6a2b5@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox