Print this page
7029 want per-process exploit mitigation features (secflags)
7030 want basic address space layout randomization (aslr)
7031 noexec_user_stack should be a secflag
7032 want a means to forbid mappings around NULL.

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/elfdump/common/struct_layout.c
          +++ new/usr/src/cmd/sgs/elfdump/common/struct_layout.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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  /*
  23   23   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27   26  
  28   27  #include <stdlib.h>
  29   28  #include <stdio.h>
  30   29  #include <string.h>
  31   30  #include <msg.h>
  32   31  #include <_elfdump.h>
  33   32  #include <struct_layout.h>
  34   33  #include <conv.h>
  35   34  
  36   35  
↓ open down ↓ 76 lines elided ↑ open up ↑
 113  112          }
 114  113  
 115  114          /* This should not be reached */
 116  115          assert(0);
 117  116          return (0);
 118  117  }
 119  118  
 120  119  
 121  120  /*
 122  121   * Extract the given integer field, and return its value, cast
 123      - * to Word. Note that this operation must not be used on values
      122 + * to Lword. Note that this operation must not be used on values
 124  123   * that can be negative, as information can be lost.
 125  124   */
 126  125  Lword
 127  126  sl_extract_as_lword(const char *data, int do_swap, const sl_field_t *fdesc)
 128  127  {
 129  128          sl_data_t       v;
 130  129  
 131  130          /* Extract the value from the raw data */
 132  131          sl_extract_num_field(data, do_swap, fdesc, &v);
 133  132  
↓ open down ↓ 194 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX