public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Long, Qin" <qin.long@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ye, Ting" <ting.ye@intel.com>, "Wu, Hao A" <hao.a.wu@intel.com>,
	"Tian, Feng" <feng.tian@intel.com>,
	"Dong, Eric" <eric.dong@intel.com>
Subject: Re: [Patch 3/4] CryptoPkg/BaseCryptLib: Adding NULL checking in timer() wrapper.
Date: Sat, 1 Apr 2017 02:14:31 +0000	[thread overview]
Message-ID: <BF2CCE9263284D428840004653A28B6E53F7F456@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <9812f014-580f-daad-fe58-4df3cbf76bf0@redhat.com>

Got it. Will correct the commit message.
Thanks.

> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Saturday, April 01, 2017 2:46 AM
> To: Long, Qin; edk2-devel@lists.01.org
> Cc: Ye, Ting; Wu, Hao A; Tian, Feng; Dong, Eric
> Subject: Re: [Patch 3/4] CryptoPkg/BaseCryptLib: Adding NULL checking in
> timer() wrapper.
> 
> On 03/31/17 19:05, Qin Long wrote:
> > There are some explicit timer(NULL) calls in openssl-1.1.0xx source,
> > but the dummy timer() wrapper in ConstantTimeClock.c (used by PEI and
> > SMM module) has no any checks on NULL parameter. This will cause the
> > memory access issue.
> > This patch adds the NULL parameter checking in timer() wrapper.
> >
> > Cc: Ting Ye <ting.ye@intel.com>
> > Cc: Eric Dong <eric.dong@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Qin Long <qin.long@intel.com>
> > ---
> >  CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git
> > a/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
> > b/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
> > index 7f20164999..0cd90434ca 100644
> > --- a/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
> > +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
> > @@ -31,8 +31,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF
> ANY KIND, EITHER EXPRESS OR IMPLIED.
> >
> >  time_t time (time_t *timer)
> >  {
> > -  *timer = 0;
> > -  return *timer;
> > +  if (timer != NULL) {
> > +    *timer = 0;
> > +  }
> > +  return 0;
> >  }
> >
> >  struct tm * gmtime (const time_t *timer)
> >
> 
> This looks okay, except the function is called time(), not timer().
> Please update the commit message (both subject line and body -- several
> instances).
> 
> Thanks,
> Laszlo


  reply	other threads:[~2017-04-01  2:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 17:05 [Patch 0/4] *** Resolving CryptoPkg build issues *** Qin Long
2017-03-31 17:05 ` [Patch 1/4] CryptoPkg/OpensslLib: Suppress extra build warnings in openssl source Qin Long
2017-03-31 18:23   ` Laszlo Ersek
2017-04-01  1:10     ` Long, Qin
2017-03-31 17:05 ` [Patch 2/4] CryptoPkg: Fix possible unresolved external symbol issue Qin Long
2017-03-31 18:44   ` Laszlo Ersek
2017-04-01  2:31     ` Long, Qin
2017-03-31 17:05 ` [Patch 3/4] CryptoPkg/BaseCryptLib: Adding NULL checking in timer() wrapper Qin Long
2017-03-31 18:45   ` Laszlo Ersek
2017-04-01  2:14     ` Long, Qin [this message]
2017-03-31 17:05 ` [Patch 4/4] CryptoPkg: One workaround to resolve potential build issue Qin Long
2017-03-31 18:50   ` Laszlo Ersek
2017-04-01  2:27     ` Long, Qin

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=BF2CCE9263284D428840004653A28B6E53F7F456@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