---
name: "personality"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/personality"
---

# personality(2)

set the process execution domain

## NAME

personality - set the process execution domain

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <sys/personality.h>
```

**int personality(unsigned long** *persona***);**

## DESCRIPTION

Linux supports different execution domains, or personalities, for each process. Among other things, execution domains tell Linux how to map signal numbers into signal actions. The execution domain system allows Linux to provide limited support for binaries compiled under other UNIX-like operating systems.

If *persona* is not 0xffffffff, then **personality**() sets the caller's execution domain to the value specified by *persona*. Specifying *persona* as 0xffffffff provides a way of retrieving the current persona without changing it.

A list of the available execution domains can be found in *\<sys/personality.h\>*. The execution domain is a 32-bit value in which the top three bytes are set aside for flags that cause the kernel to modify the behavior of certain system calls so as to emulate historical or architectural quirks. The least significant byte is a value defining the personality the kernel should assume. The flag values are as follows:

- **ADDR\_COMPAT\_LAYOUT** (since Linux 2.6.9)

  With this flag set, provide legacy virtual address space layout.

- **ADDR\_NO\_RANDOMIZE** (since Linux 2.6.12)

  With this flag set, disable address-space-layout randomization.

- **ADDR\_LIMIT\_32BIT** (since Linux 2.2)

  Limit the address space to 32 bits.

- **ADDR\_LIMIT\_3GB** (since Linux 2.4.0)

  With this flag set, use 0xc0000000 as the offset at which to search a virtual memory chunk on [**mmap**(2)](/mmap/2.md); otherwise use 0xffffe000. Applies to 32-bit x86 processes only.

- **FDPIC\_FUNCPTRS** (since Linux 2.6.11)

  User-space function pointers to signal handlers point to descriptors. Applies only to ARM if BINFMT\_ELF\_FDPIC and SuperH.

- **MMAP\_PAGE\_ZERO** (since Linux 2.4.0)

  Map page 0 as read-only (to support binaries that depend on this SVr4 behavior).

- **READ\_IMPLIES\_EXEC** (since Linux 2.6.8)

  With this flag set, **PROT\_READ** implies **PROT\_EXEC** for [**mmap**(2)](/mmap/2.md).

- **SHORT\_INODE** (since Linux 2.4.0)

  No effect.

- **STICKY\_TIMEOUTS** (since Linux 1.2.0)

  With this flag set, [**select**(2)](/select/2.md), [**pselect**(2)](/pselect/2.md), and [**ppoll**(2)](/ppoll/2.md) do not modify the returned timeout argument when interrupted by a signal handler.

- **UNAME26** (since Linux 3.1)

  Have [**uname**(2)](/uname/2.md) report a 2.6.(40+x) version number rather than a MAJOR.x version number. Added as a stopgap measure to support broken applications that could not handle the kernel version-numbering switch from Linux 2.6.x to Linux 3.x.

- **WHOLE\_SECONDS** (since Linux 1.2.0)

  No effect.

The available execution domains are:

- **PER\_BSD** (since Linux 1.2.0)

  BSD. (No effects.)

- **PER\_HPUX** (since Linux 2.4)

  Support for 32-bit HP/UX. This support was never complete, and was dropped so that since Linux 4.0, this value has no effect.

- **PER\_IRIX32** (since Linux 2.2)

  IRIX 5 32-bit. Never fully functional; support dropped in Linux 2.6.27. Implies **STICKY\_TIMEOUTS**.

- **PER\_IRIX64** (since Linux 2.2)

  IRIX 6 64-bit. Implies **STICKY\_TIMEOUTS**; otherwise no effect.

- **PER\_IRIXN32** (since Linux 2.2)

  IRIX 6 new 32-bit. Implies **STICKY\_TIMEOUTS**; otherwise no effect.

- **PER\_ISCR4** (since Linux 1.2.0)

  Implies **STICKY\_TIMEOUTS**; otherwise no effect.

- **PER\_LINUX** (since Linux 1.2.0)

  Linux.

- **PER\_LINUX32** (since Linux 2.2)

  [**uname**(2)](/uname/2.md) returns the name of the 32-bit architecture in the *machine* field ("i686" instead of "x86\_64", &c.).

-

  Under ia64 (Itanium), processes with this personality don't have the O\_LARGEFILE [**open**(2)](/open/2.md) flag forced.

-

  Under 64-bit ARM, setting this personality is forbidden if [**execve**(2)](/execve/2.md)ing a 32-bit process would also be forbidden (cf. the allow\_mismatched\_32bit\_el0 kernel parameter and *Documentation/arm64/asymmetric-32bit.rst*).

- **PER\_LINUX32\_3GB** (since Linux 2.4)

  Same as **PER\_LINUX32**, but implies **ADDR\_LIMIT\_3GB**.

- **PER\_LINUX\_32BIT** (since Linux 2.0)

  Same as **PER\_LINUX**, but implies **ADDR\_LIMIT\_32BIT**.

- **PER\_LINUX\_FDPIC** (since Linux 2.6.11)

  Same as **PER\_LINUX**, but implies **FDPIC\_FUNCPTRS**.

- **PER\_OSF4** (since Linux 2.4)

  OSF/1 v4. No effect since Linux 6.1, which removed a.out binary support. Before, on alpha, would clear top 32 bits of iov\_len in the user's buffer for compatibility with old versions of OSF/1 where iov\_len was defined as. *int*.

- **PER\_OSR5** (since Linux 2.4)

  SCO OpenServer 5. Implies **STICKY\_TIMEOUTS** and **WHOLE\_SECONDS**; otherwise no effect.

- **PER\_RISCOS** (since Linux 2.3.7; macro since Linux 2.3.13)

  Acorn RISC OS/Arthur (MIPS). No effect. Up to Linux 4.0, would set the emulation altroot to */usr/gnemul/riscos* (cf. **PER\_SUNOS**, below). Before then, up to Linux 2.6.3, just Arthur emulation.

- **PER\_SCOSVR3** (since Linux 1.2.0)

  SCO UNIX System V Release 3. Same as **PER\_OSR5**, but also implies **SHORT\_INODE**.

- **PER\_SOLARIS** (since Linux 2.4)

  Solaris. Implies **STICKY\_TIMEOUTS**; otherwise no effect.

- **PER\_SUNOS** (since Linux 2.4.0)

  Sun OS. Same as **PER\_BSD**, but implies **STICKY\_TIMEOUTS**. Prior to Linux 2.6.26, diverted library and dynamic linker searches to */usr/gnemul*. Buggy, largely unmaintained, and almost entirely unused.

- **PER\_SVR3** (since Linux 1.2.0)

  AT&T UNIX System V Release 3. Implies **STICKY\_TIMEOUTS** and **SHORT\_INODE**; otherwise no effect.

- **PER\_SVR4** (since Linux 1.2.0)

  AT&T UNIX System V Release 4. Implies **STICKY\_TIMEOUTS** and **MMAP\_PAGE\_ZERO**; otherwise no effect.

- **PER\_UW7** (since Linux 2.4)

  UnixWare 7. Implies **STICKY\_TIMEOUTS** and **MMAP\_PAGE\_ZERO**; otherwise no effect.

- **PER\_WYSEV386** (since Linux 1.2.0)

  WYSE UNIX System V/386. Implies **STICKY\_TIMEOUTS** and **SHORT\_INODE**; otherwise no effect.

- **PER\_XENIX** (since Linux 1.2.0)

  XENIX. Implies **STICKY\_TIMEOUTS** and **SHORT\_INODE**; otherwise no effect.

## RETURN VALUE

On success, the previous *persona* is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

- **EINVAL**

  The kernel was unable to change the personality.

## STANDARDS

Linux.

## HISTORY

Linux 1.1.20, glibc 2.3.

## SEE ALSO

[**setarch**(8)](/setarch/8.md)
