Debian Codegraph @

upstream/debian-unstable/man2/PR_SET_UNALIGN.2const

raw
1 .\" Copyright, Guillem Jover <[email protected]>
2 .\" Copyright 2006-2015, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH PR_SET_UNALIGN 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 PR_SET_UNALIGN
10 \-
11 set unaligned access control bits
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ,\~ \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
18 .B #include <sys/prctl.h>
19 .P
20 .BI "int prctl(PR_SET_UNALIGN, unsigned long " flag );
21 .fi
22 .SH DESCRIPTION
23 Set unaligned access control bits to
24 .IR arg2 .
25 .P
26 Pass
27 .B PR_UNALIGN_NOPRINT
28 to silently fix up unaligned user accesses,
29 or
30 .B PR_UNALIGN_SIGBUS
31 to generate
32 .B SIGBUS
33 on unaligned user access.
34 .P
35 Alpha also supports an additional flag with the value
36 of 4 and no corresponding named constant,
37 which instructs kernel to not fix up
38 unaligned accesses (it is analogous to providing the
39 .B UAC_NOFIX
40 flag in
41 .B SSI_NVPAIRS
42 operation of the
43 .BR setsysinfo ()
44 system call on Tru64).
45 .SH RETURN VALUE
46 On success,
47 0 is returned.
48 On error, \-1 is returned, and
49 .I errno
50 is set to indicate the error.
51 .SH ERRORS
52 .TP
53 .B EINVAL
54 .I flag
55 is not a valid value.
56 .SH STANDARDS
57 Linux.
58 .SH HISTORY
59 Only on:
60 .IP \[bu] 3
61 ia64, since Linux 2.3.48
62 .PD 0
63 .IP \[bu]
64 parisc, since Linux 2.6.15
65 .IP \[bu]
66 PowerPC, since Linux 2.6.18
67 .IP \[bu]
68 Alpha, since Linux 2.6.22
69 .IP \[bu]
70 .\" sh: 94ea5e449ae834af058ef005d16a8ad44fcf13d6
71 sh, since Linux 2.6.34
72 .IP \[bu]
73 .\" tile: 2f9ac29eec71a696cb0dcc5fb82c0f8d4dac28c9
74 tile, since Linux 3.12
75 .PD
76 .SH SEE ALSO
77 .BR prctl (2),
78 .BR PR_GET_UNALIGN (2const)