Print this page
1730 DTrace should ignore type information from modules with cth_parlabel mismatches
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/dtrace/fbt.c
          +++ new/usr/src/uts/intel/dtrace/fbt.c
↓ open down ↓ 621 lines elided ↑ open up ↑
 622  622                          }
 623  623                  } while ((mp = mp->mod_next) != &modules);
 624  624  
 625  625                  if (mod == NULL)
 626  626                          goto err;
 627  627  
 628  628                  if ((pfp = ctf_modopen(mod->mod_mp, &error)) == NULL) {
 629  629                          goto err;
 630  630                  }
 631  631  
      632 +                /*
      633 +                 * If the parent module does not have the label we expect,
      634 +                 * ignore it and fail to avoid presenting non-sensical data.
      635 +                 */
      636 +                if (ctf_label_info(pfp, ctf_parent_label(fp),
      637 +                    NULL) == CTF_ERR) {
      638 +                        ctf_close(pfp);
      639 +                        goto err;
      640 +                }
      641 +
 632  642                  if (ctf_import(fp, pfp) != 0) {
 633  643                          ctf_close(pfp);
 634  644                          goto err;
 635  645                  }
 636  646  
 637  647                  ctf_close(pfp);
 638  648          }
 639  649  
 640  650          if (ctf_func_info(fp, fbt->fbtp_symndx, &f) == CTF_ERR)
 641  651                  goto err;
↓ open down ↓ 208 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX