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/sparc/dtrace/fbt.c
          +++ new/usr/src/uts/sparc/dtrace/fbt.c
↓ open down ↓ 1649 lines elided ↑ open up ↑
1650 1650                                  break;
1651 1651                          }
1652 1652                  } while ((mp = mp->mod_next) != &modules);
1653 1653  
1654 1654                  if (mod == NULL)
1655 1655                          goto err;
1656 1656  
1657 1657                  if ((pfp = ctf_modopen(mod->mod_mp, &error)) == NULL)
1658 1658                          goto err;
1659 1659  
     1660 +                /*
     1661 +                 * If the parent module does not have the label we expect,
     1662 +                 * ignore it and fail to avoid presenting non-sensical data.
     1663 +                 */
     1664 +                if (ctf_label_info(pfp, ctf_parent_label(fp),
     1665 +                    NULL) == CTF_ERR) {
     1666 +                        ctf_close(pfp);
     1667 +                        goto err;
     1668 +                }
     1669 +
1660 1670                  if (ctf_import(fp, pfp) != 0) {
1661 1671                          ctf_close(pfp);
1662 1672                          goto err;
1663 1673                  }
1664 1674  
1665 1675                  ctf_close(pfp);
1666 1676          }
1667 1677  
1668 1678          if (ctf_func_info(fp, fbt->fbtp_symndx, &f) == CTF_ERR)
1669 1679                  goto err;
↓ open down ↓ 187 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX