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

# PR\_SET\_TAGGED\_ADDR\_CTRL(2const)

control support for passing tagged user-space addresses to the kernel

## NAME

PR\_SET\_TAGGED\_ADDR\_CTRL - control support for passing tagged user-space addresses to the kernel

## LIBRARY

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

## SYNOPSIS

```
#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>
```

**int prctl(PR\_SET\_TAGGED\_ADDR\_CTRL, long** *mode***, 0L, 0L, 0L);**

## DESCRIPTION

Controls support for passing tagged user-space addresses to the kernel (i.e., addresses where bits 56—63 are not all zero).

The level of support is selected by *support*, which can be one of the following:

- **0L**

  Addresses that are passed for the purpose of being dereferenced by the kernel must be untagged.

- **PR\_TAGGED\_ADDR\_ENABLE**

  Addresses that are passed for the purpose of being dereferenced by the kernel may be tagged, with the exceptions summarized below.

On success, the mode specified in *mode* is set for the calling thread.

If *prctl(PR\_SET\_TAGGED\_ADDR\_CTRL, 0L, 0L, 0L, 0L)* fails with **EINVAL**, then all addresses passed to the kernel must be untagged.

Irrespective of which mode is set, addresses passed to certain interfaces must always be untagged:

- •

  [**brk**(2)](/brk/2.md), [**mmap**(2)](/mmap/2.md), [**shmat**(2)](/shmat/2.md), [**shmdt**(2)](/shmdt/2.md), and the *new\_address* argument of [**mremap**(2)](/mremap/2.md).

-

  (Prior to Linux 5.6 these accepted tagged addresses, but the behavior may not be what you expect. Don't rely on it.)

- •

  ‘polymorphic’ interfaces that accept pointers to arbitrary types cast to a *void \** or other generic type, specifically **prctl**(), [**ioctl**(2)](/ioctl/2.md), and in general [**setsockopt**(2)](/setsockopt/2.md) (only certain specific [**setsockopt**(2)](/setsockopt/2.md) options allow tagged addresses).

This list of exclusions may shrink when moving from one kernel version to a later kernel version. While the kernel may make some guarantees for backwards compatibility reasons, for the purposes of new software the effect of passing tagged addresses to these interfaces is unspecified.

The mode set by this call is inherited across [**fork**(2)](/fork/2.md) and [**clone**(2)](/clone/2.md). The mode is reset by [**execve**(2)](/execve/2.md) to 0 (i.e., tagged addresses not permitted in the user/kernel ABI).

## RETURN VALUE

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

## ERRORS

- **EINVAL**

  *mode* is invalid or unsupported.

- **EINVAL**

  This feature is disabled via */proc/sys/abi/tagged\_addr\_disabled*.

## FILES

- */proc/sys/abi/tagged\_addr\_disabled*

  ## STANDARDS

Linux. arm64 only.

## HISTORY

Linux 5.4 (arm64).

## CAVEATS

This call is primarily intended for use by the run-time environment. A successful **PR\_SET\_TAGGED\_ADDR\_CTRL** call elsewhere may crash the calling process. The conditions for using it safely are complex and system-dependent. Don't use it unless you know what you are doing.

## SEE ALSO

[**prctl**(2)](/prctl/2.md), [**PR\_SET\_TAGGED\_ADDR\_CTRL**(2const)](/PR_SET_TAGGED_ADDR_CTRL/2const.md)

For more information, see the kernel source file *Documentation/arm64/tagged-address-abi.rst*.
