Print this page
sync further changes from uts/aslr


  38     descsz: 0x28
  39     type:   [ NT_SECFLAGS ]
  40     name:
  41         CORE\0
  42     desc: (prsecflags_t)
  43         pr_version:    1
  44         pr_effective:  [ ASLR ]
  45         pr_inherit:    [ ASLR ]
  46         pr_lower:      0
  47         pr_upper:      [ ASLR FORBIDNULLMAP NOEXECSTACK ]
  48 EOF
  49 
  50 /usr/bin/elfdump -n core.${pid} | grep -B5 -A5 prsecflags_t > gcore-output.$$
  51 
  52 if ! diff -u gcore-expected.$$ gcore-output.$$; then
  53     exit 1;
  54 fi
  55 
  56 ## kernel-produced core
  57 kill -SEGV $pid

  58 
  59 cat > core-expected.$$ <<EOF
  60     namesz: 0x5
  61     descsz: 0x28
  62     type:   [ NT_SECFLAGS ]
  63     name:
  64         CORE\0
  65     desc: (prsecflags_t)
  66         pr_version:    1
  67         pr_effective:  [ ASLR ]
  68         pr_inherit:    [ ASLR ]
  69         pr_lower:      0
  70         pr_upper:      [ ASLR FORBIDNULLMAP NOEXECSTACK ]
  71 EOF
  72 
  73 /usr/bin/elfdump -n core | grep -B5 -A5 prsecflags_t > core-output.$$
  74 
  75 if ! diff -u core-expected.$$ core-output.$$; then
  76     exit 1;
  77 fi


  38     descsz: 0x28
  39     type:   [ NT_SECFLAGS ]
  40     name:
  41         CORE\0
  42     desc: (prsecflags_t)
  43         pr_version:    1
  44         pr_effective:  [ ASLR ]
  45         pr_inherit:    [ ASLR ]
  46         pr_lower:      0
  47         pr_upper:      [ ASLR FORBIDNULLMAP NOEXECSTACK ]
  48 EOF
  49 
  50 /usr/bin/elfdump -n core.${pid} | grep -B5 -A5 prsecflags_t > gcore-output.$$
  51 
  52 if ! diff -u gcore-expected.$$ gcore-output.$$; then
  53     exit 1;
  54 fi
  55 
  56 ## kernel-produced core
  57 kill -SEGV $pid
  58 wait $pid >/dev/null 2>&1
  59 
  60 cat > core-expected.$$ <<EOF
  61     namesz: 0x5
  62     descsz: 0x28
  63     type:   [ NT_SECFLAGS ]
  64     name:
  65         CORE\0
  66     desc: (prsecflags_t)
  67         pr_version:    1
  68         pr_effective:  [ ASLR ]
  69         pr_inherit:    [ ASLR ]
  70         pr_lower:      0
  71         pr_upper:      [ ASLR FORBIDNULLMAP NOEXECSTACK ]
  72 EOF
  73 
  74 /usr/bin/elfdump -n core | grep -B5 -A5 prsecflags_t > core-output.$$
  75 
  76 if ! diff -u core-expected.$$ core-output.$$; then
  77     exit 1;
  78 fi