Page MenuHomeFreeBSD

Inconsistencies in DOF sections headers and sections
Needs ReviewPublic

Authored by graeme.jenkinson_cl.cam.ac.uk on Wed, Oct 2, 1:22 PM.

Details

Summary

The DOF file output by dtrace -A contains only the loadable sections. However, as it was created by a call to dtrace_dof_create without flags, the original DOF was created with the loadable sections. The result is that the DOF includes the section headers for the unloadable sections (COMMENTS and UTSNAME) without these sections actually being present. This is inconsistent.

A simple change to anon_prog() in dtrace.c (cddl/contrib/opensolaris/cmd/dtrace) ensures that the missing sections are present in the outputted DOF. Alternatively, the call to dtrace_dof_create() could pass the DTRACE_D_STRIP flag stripping out the loadable sections. As the unloadable sections contain info useful for debugging purposes they haven't been stripped.

Test Plan

Tested change by created DOF - dtrace -A - and confirming that the missing sections are included in the resulting DOF and that the contain the correct information. Also confirmed that the other DOF sections remain valid.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

Herald added 1 blocking reviewer(s): gnn. · View Herald TranscriptWed, Oct 2, 1:22 PM
Herald added a subscriber: imp. · View Herald Transcript
markj accepted this revision.Wed, Oct 2, 5:02 PM

This makes sense to me, thanks. I'll commit it in a day or two if no one else jumps in.

This makes sense to me, thanks. I'll commit it in a day or two if no one else jumps in.

Cool. It's only a minor thing but we are increasingly relying on correct knowledge of the internals of DIF and DOF to do our work on distribution.

markj added a comment.Thu, Oct 3, 2:50 PM

This makes sense to me, thanks. I'll commit it in a day or two if no one else jumps in.

Cool. It's only a minor thing but we are increasingly relying on correct knowledge of the internals of DIF and DOF to do our work on distribution.

Is there a "Sponsored by:" tag you'd like added to the commit message?

This makes sense to me, thanks. I'll commit it in a day or two if no one else jumps in.

Cool. It's only a minor thing but we are increasingly relying on correct knowledge of the internals of DIF and DOF to do our work on distribution.

Is there a "Sponsored by:" tag you'd like added to the commit message?

I'll just double check with Robert, I've just got a letter about contract extension. I think this is funded differently. Robert says DARPA/AFRL ATM, so some/all of the following blurb?

This software was developed by BAE Systems, the University of Cambridge Computer Laboratory, and Memorial University under DARPA/AFRL contract FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing (TC) research program.

Let me know if I should be putting this somewhere I couldn't see a way I can add this.