Bug 195555

Summary: [patch] [dtrace] fix alignment issue when iterating DOFs
Product: Base System Reporter: fedor
Component: kernAssignee: Mark Johnston <markj>
Status: Closed FIXED    
Severity: Affects Some People CC: emaste, markj
Priority: ---    
Version: 10.1-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch none

Description fedor 2014-12-01 12:54:29 UTC
Created attachment 150067 [details]
Patch

Unfortunately, previous fix for DTrace drti was incomplete.

Following problems was found during investigation:

1. FreeBSD's 10.1 dtrace tool produce SHT_PROGBITS .__SUNW_dof section, instead of SHT_SUNW_dof 
2. DOFs are placed at aligned locations within the ELF section, this wasn't accounted in the iterating loop .

I suggest this patch to be included in next 10.x iteration.
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-12-26 18:54:26 UTC
A commit references this bug:

Author: markj
Date: Fri Dec 26 18:53:30 UTC 2014
New revision: 276250
URL: https://svnweb.freebsd.org/changeset/base/276250

Log:
  DOF tables are aligned according to the DOF section's alignment constraint,
  so take this into account when iterating over DOF tables.

  PR:		195555
  Submitted by:	Fedor Indutny <fedor@indutny.com> (original version)
  MFC after:	1 week

Changes:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
Comment 2 fedor 2014-12-27 09:12:03 UTC
Thank you!
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-01-06 02:14:00 UTC
A commit references this bug:

Author: markj
Date: Tue Jan  6 02:13:49 UTC 2015
New revision: 276731
URL: https://svnweb.freebsd.org/changeset/base/276731

Log:
  MFC r276250:
  DOF tables are aligned according to the DOF section's alignment constraint,
  so take this into account when iterating over DOF tables.

  PR:	195555

Changes:
_U  stable/9/cddl/contrib/opensolaris/
_U  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-01-06 02:14:01 UTC
A commit references this bug:

Author: markj
Date: Tue Jan  6 02:13:50 UTC 2015
New revision: 276732
URL: https://svnweb.freebsd.org/changeset/base/276732

Log:
  MFC r276250:
  DOF tables are aligned according to the DOF section's alignment constraint,
  so take this into account when iterating over DOF tables.

  PR:	195555

Changes:
_U  stable/10/
  stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c