public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Jian J Wang <jian.j.wang@intel.com>, edk2-devel@lists.01.org
Cc: Michael Kinney <michael.d.kinney@intel.com>,
	Ayellet Wolman <ayellet.wolman@intel.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Eric Dong <eric.dong@intel.com>, Star Zeng <star.zeng@intel.com>
Subject: Re: [PATCH v4 5/6] IntelFrameworkModulePkg/Csm: Add code to bypass NULL pointer detection
Date: Wed, 11 Oct 2017 23:29:58 +0200	[thread overview]
Message-ID: <bbcbda6c-bfbf-32f6-2ece-37866dd4efcb@redhat.com> (raw)
In-Reply-To: <20171009141722.992-6-jian.j.wang@intel.com>

This patch breaks the GCC5 build:

On 10/09/17 16:17, Jian J Wang wrote:

> diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
> index 3d9a8b9649..f42c13cd89 100644
> --- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
> +++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
> @@ -57,7 +57,11 @@ LegacyBiosInt86 (
>    IN  EFI_IA32_REGISTER_SET         *Regs
>    )
>  {
> -  UINT32  *VectorBase;
> +  UINT16                Segment;
> +  UINT16                Offset;
> +  LEGACY_BIOS_INSTANCE  *Private;
> +
> +  Private = LEGACY_BIOS_INSTANCE_FROM_THIS (This);
>  
>    Regs->X.Flags.Reserved1 = 1;
>    Regs->X.Flags.Reserved2 = 0;
> @@ -72,12 +76,15 @@ LegacyBiosInt86 (
>    // The base address of legacy interrupt vector table is 0.
>    // We use this base address to get the legacy interrupt handler.
>    //
> -  VectorBase              = 0;
> +  DisableNullDetection ();
> +  Segment               = (UINT16)(((UINT32 *)0)[BiosInt] >> 16);
> +  Offset                = (UINT16)((UINT32 *)0)[BiosInt];
> +  EnableNullDetection ();
>    
>    return InternalLegacyBiosFarCall (
>             This,
> -           (UINT16) ((VectorBase)[BiosInt] >> 16),
> -           (UINT16) (VectorBase)[BiosInt],
> +           Segment,
> +           Offset,
>             Regs,
>             &Regs->X.Flags,
>             sizeof (Regs->X.Flags)

IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c: In function 'LegacyBiosInt86':
IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c:62:26: error: variable 'Private' set but not used [-Werror=unused-but-set-variable]
   LEGACY_BIOS_INSTANCE  *Private;
                          ^~~~~~~
cc1: all warnings being treated as errors

Can you please send a patch?

Thanks!
Laszlo


  reply	other threads:[~2017-10-11 21:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 14:17 [PATCH v4 0/6] Add NULL pointer detection feature Jian J Wang
2017-10-09 14:17 ` [PATCH v4 1/6] MdeModulePkg/MdeModulePkg.dec, .uni: Add NULL pointer detection PCD Jian J Wang
2017-10-09 14:17 ` [PATCH v4 2/6] MdeModulePkg/DxeIpl: Implement NULL pointer detection Jian J Wang
2017-10-09 14:17 ` [PATCH v4 3/6] MdeModulePkg/Core/Dxe: Add EndOfDxe workaround for " Jian J Wang
2017-10-09 14:17 ` [PATCH v4 4/6] UefiCpuPkg/PiSmmCpuDxeSmm: Implement NULL pointer detection for SMM code Jian J Wang
2017-10-09 14:17 ` [PATCH v4 5/6] IntelFrameworkModulePkg/Csm: Add code to bypass NULL pointer detection Jian J Wang
2017-10-11 21:29   ` Laszlo Ersek [this message]
2017-10-12  1:06     ` Wang, Jian J
2017-10-09 14:17 ` [PATCH v4 6/6] OvmfPkg/QemuVideoDxe: Bypass NULL pointer detection during VBE SHIM installing Jian J Wang
2017-10-09 15:54   ` Laszlo Ersek
2017-10-09 15:55     ` Laszlo Ersek
2017-10-10  1:50       ` Wang, Jian J
2017-10-10  8:13         ` Laszlo Ersek
2017-10-10  8:41           ` Wang, Jian J
2017-10-11  0:52 ` [PATCH v4 0/6] Add NULL pointer detection feature Wang, Jian J

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=bbcbda6c-bfbf-32f6-2ece-37866dd4efcb@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