Print this page
OS-4119 lxbrand panic when running native perl inside lx zone
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/exec/aout/aout.c
          +++ new/usr/src/uts/common/exec/aout/aout.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   * Copyright (c) 2011 Bayard G. Bell. All rights reserved.
       25 + * Copyright 2015, Joyent, Inc.
  25   26   */
  26   27  
  27   28  #include <sys/types.h>
  28   29  #include <sys/param.h>
  29   30  #include <sys/systm.h>
  30   31  #include <sys/fpu/fpusystm.h>
  31   32  #include <sys/sysmacros.h>
  32   33  #include <sys/signal.h>
  33   34  #include <sys/cred.h>
  34   35  #include <sys/user.h>
↓ open down ↓ 12 lines elided ↑ open up ↑
  47   48  #include <sys/vmparam.h>
  48   49  #include <sys/archsystm.h>
  49   50  #include <sys/fs/swapnode.h>
  50   51  #include <sys/modctl.h>
  51   52  #include <vm/anon.h>
  52   53  #include <vm/as.h>
  53   54  #include <vm/seg.h>
  54   55  
  55   56  static int aoutexec(vnode_t *vp, execa_t *uap, uarg_t *args,
  56   57      intpdata_t *idatap, int level, long *execsz, int setid,
  57      -    caddr_t exec_file, cred_t *cred, int brand_action);
       58 +    caddr_t exec_file, cred_t *cred, int *brand_action);
  58   59  static int get_aout_head(struct vnode **vpp, struct exdata *edp, long *execsz,
  59   60      int *isdyn);
  60   61  static int aoutcore(vnode_t *vp, proc_t *pp, cred_t *credp,
  61   62      rlim64_t rlimit, int sig, core_content_t content);
  62   63  extern int elf32exec(vnode_t *, execa_t *, uarg_t *, intpdata_t *, int,
  63   64      long *, int, caddr_t, cred_t *, int);
  64   65  extern int elf32core(vnode_t *, proc_t *, cred_t *, rlim64_t, int,
  65   66      core_content_t);
  66   67  
  67   68  static struct execsw nesw = {
↓ open down ↓ 55 lines elided ↑ open up ↑
 123  124  _info(struct modinfo *modinfop)
 124  125  {
 125  126          return (mod_info(&modlinkage, modinfop));
 126  127  }
 127  128  
 128  129  
 129  130  /*ARGSUSED*/
 130  131  static int
 131  132  aoutexec(vnode_t *vp, struct execa *uap, struct uarg *args,
 132  133      struct intpdata *idatap, int level, long *execsz, int setid,
 133      -    caddr_t exec_file, cred_t *cred, int brand_action)
      134 +    caddr_t exec_file, cred_t *cred, int *brand_action)
 134  135  {
 135  136          auxv32_t auxflags_auxv32;
 136  137          int error;
 137  138          struct exdata edp, edpout;
 138  139          struct execenv exenv;
 139  140          proc_t *pp = ttoproc(curthread);
 140  141          struct vnode *nvp;
 141  142          int pagetext, pagedata;
 142  143          int dataprot = PROT_ALL;
 143  144          int textprot = PROT_ALL & ~PROT_WRITE;
↓ open down ↓ 204 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX