chatr - Program to change program stack and data segments
to executable state
SYNOPSIS
chatr [-h] [[-E | -e] prog]
DESCRIPTION
chatr is a utility to mark the ELF header of an IA64 Linux
program so that when the program is run, instructions pre
sent in the program's data or stack segments can be exe
cuted. Currently, the default for the SGI Altix 3000 ker
nel is to allow this behavior. However, under certain
workloads (particularly those workloads that do a lot of
fork() calls), system performance can be improved by mak
ing program stacks and data non-executeable by default.
This is done in the SGI Altix 3000 kernels using the fol
lowing sysctl command:
sysctl vm.executable_stacks=0
This command disables execute permission for program stack
and data segments, while
sysctl vm.executable_stacks=1
enables execute permission for program stack and data seg
ments. (This is the default at the present time. See
"COMPATIBILITY" below.)
The default mode of this sysctl value can also be set by
editing the /etc/sysctl.conf file. See the sysctl man
page for further details.
However, when vm.executable_stacks is zero, certain pro
grams will now fail with a SEGV even though they worked
correctly before. These are tupically programs that store
instructions in the stack or data segment then branch to
those instructions. Examples of this kind of program are
older versions of the X server that load graphics drivers
into the data segment or Java JIT compilers.
The chatr comamnd can be used to make these programs work
correctly regardless of the value of vm.executable_stacks.
FURTHER DETAILS
The following command prints the usage info:
chatr -h
The following command marks the program file so its exe
cutable image will have executable data and stack seg
ments:
The following command marks the program file so its exe
cutable image will not have executable data and stack seg
ments:
chatr -e prog
COMPATIBILITY
The default mode of the SGI Altix 3000 kernel to allow
executable stacks and data was chosen to make the SGI ker
nel compatible with the current behavior of Red Hat 7.2
for IPF. As of December 2002, this is regarded as a tem
porary situation and when the default kernel for Red Hat
for IPF is based on 2.4.17 or later we expect the default
behavior for the Red Hat system to change to disallow exe
cutable stacks and data. At that time, it is possible
that the default behavior for the SGI kernel will be
changed to match that of the Red Hat system.
PROGRAM AUTHOR
David Mossberger-Tang (mossberger@hpl.hp.com) at Hewlett-
Packard.
Man(1) output converted with
man2html