Print this page


Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/exec/elf/elf.c
          +++ new/usr/src/uts/common/exec/elf/elf.c
↓ open down ↓ 521 lines elided ↑ open up ↑
 522  522           * ISA-specific types (included in __KERN_NAUXV_IMPL).
 523  523           */
 524  524          if (hasauxv) {
 525  525                  /*
 526  526                   * If a AUX vector is being built - the base AUX
 527  527                   * entries are:
 528  528                   *
 529  529                   *      AT_BASE
 530  530                   *      AT_FLAGS
 531  531                   *      AT_PAGESZ
 532      -                 *      AT_RANDOM       (added in stk_copyout)
      532 +                 *      AT_RANDOM
 533  533                   *      AT_SUN_AUXFLAGS
 534  534                   *      AT_SUN_HWCAP
 535  535                   *      AT_SUN_HWCAP2
 536      -                 *      AT_SUN_PLATFORM (added in stk_copyout)
 537      -                 *      AT_SUN_EXECNAME (added in stk_copyout)
      536 +                 *      AT_SUN_PLATFORM (added in stk_copyout)
      537 +                 *      AT_SUN_EXECNAME (added in stk_copyout)
 538  538                   *      AT_NULL
 539  539                   *
 540  540                   * total == 10
 541  541                   */
 542  542                  if (hasdy && hasu) {
 543  543                          /*
 544  544                           * Has PT_INTERP & PT_PHDR - the auxvectors that
 545  545                           * will be built are:
 546  546                           *
 547  547                           *      AT_PHDR
↓ open down ↓ 88 lines elided ↑ open up ↑
 636  636                                  if (args->to_model == DATAMODEL_LP64)
 637  637                                          args->addr32 = 1;
 638  638                                  break;
 639  639                          }
 640  640                  }
 641  641          }
 642  642  
 643  643          aux = bigwad->elfargs;
 644  644          /*
 645  645           * Move args to the user's stack.
 646      -         * This can fill in the AT_SUN_PLATFORM, AT_SUN_EXECNAME and AT_RANDOM
 647      -         * aux entries.
      646 +         * This can fill in the AT_SUN_PLATFORM and AT_SUN_EXECNAME aux entries.
 648  647           */
 649  648          if ((error = exec_args(uap, args, idatap, (void **)&aux)) != 0) {
 650  649                  if (error == -1) {
 651  650                          error = ENOEXEC;
 652  651                          goto bad;
 653  652                  }
 654  653                  goto out;
 655  654          }
 656  655          /* we're single threaded after this point */
 657  656  
↓ open down ↓ 220 lines elided ↑ open up ↑
 878  877                  }
 879  878  
 880  879                  VN_RELE(nvp);
 881  880                  ADDAUX(aux, AT_SUN_LDDATA, voffset + lddata)
 882  881          }
 883  882  
 884  883          if (hasauxv) {
 885  884                  int auxf = AF_SUN_HWCAPVERIFY;
 886  885  
 887  886                  /*
 888      -                 * Note: AT_SUN_PLATFORM, AT_SUN_EXECNAME and AT_RANDOM were
 889      -                 * filled in via exec_args()
      887 +                 * Note: AT_SUN_PLATFORM and AT_RANDOM were filled in via
      888 +                 * exec_args()
 890  889                   */
 891  890                  ADDAUX(aux, AT_BASE, voffset)
 892  891                  ADDAUX(aux, AT_FLAGS, at_flags)
 893  892                  ADDAUX(aux, AT_PAGESZ, PAGESIZE)
 894  893                  /*
 895  894                   * Linker flags. (security)
 896  895                   * p_flag not yet set at this time.
 897  896                   * We rely on gexec() to provide us with the information.
 898  897                   * If the application is set-uid but this is not reflected
 899  898                   * in a mismatch between real/effective uids/gids, then
↓ open down ↓ 1655 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX