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

Thanks for catching this issue. Patch has been sent out. 

> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Thursday, October 12, 2017 5:30 AM
> To: Wang, Jian J <jian.j.wang@intel.com>; edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Wolman, Ayellet
> <ayellet.wolman@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Dong, Eric
> <eric.dong@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: Re: [edk2] [PATCH v4 5/6] IntelFrameworkModulePkg/Csm: Add code
> to bypass NULL pointer detection
> 
> 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-12  1:02 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
2017-10-12  1:06     ` Wang, Jian J [this message]
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=D827630B58408649ACB04F44C510003624CA147A@SHSMSX103.ccr.corp.intel.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