Bug 215494 - vchiq uses non-reproducible __DATE__ and __TIME__
Summary: vchiq uses non-reproducible __DATE__ and __TIME__
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Only Me
Assignee: Oleksandr Tymoshenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-22 18:13 UTC by Ed Maste
Modified: 2017-05-08 19:24 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2016-12-22 18:13:46 UTC
VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_time,    __TIME__ );
VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_date,    __DATE__ );
...
const char *vchiq_get_build_date( void )
{
   return vchiq_build_date;
}

const char *vchiq_get_build_time( void )
{
   return vchiq_build_time;
}

The __DATE__ and __TIME__ macros prevent this source file from building reproducibly. I wasn't able to find where vchiq_get_build_date or _time are used - can we remove them?
Comment 1 Ed Maste freebsd_committer 2016-12-22 18:14:47 UTC
Sorry, missed the filename in the original report - this is in sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c
Comment 2 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2016-12-25 20:46:48 UTC
I think it's better to return some hardcoded data. In case next sync up with upstream will refer to these functions. I'll take care of this.
Comment 3 commit-hook freebsd_committer 2016-12-26 02:51:36 UTC
A commit references this bug:

Author: gonzo
Date: Mon Dec 26 02:51:03 UTC 2016
New revision: 310560
URL: https://svnweb.freebsd.org/changeset/base/310560

Log:
  [vchi] replace non-reproducible __DATE__/__TIME__ with hardcoded string

  Although vchiq_build_date and vchiq_build_time are not used in current
  vchi driver at the moment, make sure these value will not leak into
  build later on if at some point they will be refered in some new
  imported code

  PR:		215494
  Reported by:	emaste
  MFC after:	1 week

Changes:
  head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c
Comment 4 commit-hook freebsd_committer 2017-05-08 19:24:10 UTC
A commit references this bug:

Author: gonzo
Date: Mon May  8 19:22:59 UTC 2017
New revision: 317970
URL: https://svnweb.freebsd.org/changeset/base/317970

Log:
  MFC r310560:

  [vchi] replace non-reproducible __DATE__/__TIME__ with hardcoded string

  Although vchiq_build_date and vchiq_build_time are not used in current
  vchi driver at the moment, make sure these value will not leak into
  build later on if at some point they will be refered in some new
  imported code

  PR:		215494
  Reported by:	emaste

Changes:
_U  stable/11/
  stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c