Debian Codegraph @

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

raw
1 .\" Copyright, Guillem Jover <[email protected]>
2 .\" Copyright 2006, 2008, 2012, 2013, 2015, Michael Kerrisk <[email protected]>
3 .\" Copyright 2024, Alejandro Colomar <[email protected]>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH PR_SET_UNALIGN 2const 2024-06-02 "Linux man-pages 6.9.1"
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 \fIarg2\fP.
24 .P
25 Pass
26 .B PR_UNALIGN_NOPRINT
27 to silently fix up unaligned user accesses,
28 or
29 .B PR_UNALIGN_SIGBUS
30 to generate
31 .B SIGBUS
32 on unaligned user access.
33 .P
34 Alpha also supports an additional flag with the value
35 of 4 and no corresponding named constant,
36 which instructs kernel to not fix up
37 unaligned accesses (it is analogous to providing the
38 .B UAC_NOFIX
39 flag in
40 .B SSI_NVPAIRS
41 operation of the
42 .BR setsysinfo ()
43 system call on Tru64).
44 .SH RETURN VALUE
45 On success,
46 0 is returned.
47 On error, \-1 is returned, and
48 .I errno
49 is set to indicate the error.
50 .SH ERRORS
51 .TP
52 .B EINVAL
53 .I flag
54 is not a valid value.
55 .SH STANDARDS
56 Linux.
57 .SH HISTORY
58 Only on:
59 .IP \[bu] 3
60 ia64, since Linux 2.3.48
61 .PD 0
62 .IP \[bu]
63 parisc, since Linux 2.6.15
64 .IP \[bu]
65 PowerPC, since Linux 2.6.18
66 .IP \[bu]
67 Alpha, since Linux 2.6.22
68 .IP \[bu]
69 .\" sh: 94ea5e449ae834af058ef005d16a8ad44fcf13d6
70 sh, since Linux 2.6.34
71 .IP \[bu]
72 .\" tile: 2f9ac29eec71a696cb0dcc5fb82c0f8d4dac28c9
73 tile, since Linux 3.12
74 .PD
75 .SH SEE ALSO
76 .BR prctl (2),
77 .BR PR_GET_UNALIGN (2const)