Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sys/personality.h constants for Linux #1849

Merged
merged 1 commit into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,10 @@ pub const NDA_MASTER: ::c_ushort = 9;
pub const NDA_LINK_NETNSID: ::c_ushort = 10;
pub const NDA_SRC_VNI: ::c_ushort = 11;

// linux/personality.h
pub const UNAME26: ::c_int = 0x0020000;
pub const FDPIC_FUNCPTRS: ::c_int = 0x0080000;

// linux/if_addr.h
pub const IFA_FLAGS: ::c_ushort = 8;

Expand Down
11 changes: 11 additions & 0 deletions src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,17 @@ pub const WEXITED: ::c_int = 0x00000004;
pub const WCONTINUED: ::c_int = 0x00000008;
pub const WNOWAIT: ::c_int = 0x01000000;

// Options for personality(2).
pub const ADDR_NO_RANDOMIZE: ::c_int = 0x0040000;
pub const MMAP_PAGE_ZERO: ::c_int = 0x0100000;
pub const ADDR_COMPAT_LAYOUT: ::c_int = 0x0200000;
pub const READ_IMPLIES_EXEC: ::c_int = 0x0400000;
pub const ADDR_LIMIT_32BIT: ::c_int = 0x0800000;
pub const SHORT_INODE: ::c_int = 0x1000000;
pub const WHOLE_SECONDS: ::c_int = 0x2000000;
pub const STICKY_TIMEOUTS: ::c_int = 0x4000000;
pub const ADDR_LIMIT_3GB: ::c_int = 0x8000000;

// Options set using PTRACE_SETOPTIONS.
pub const PTRACE_O_TRACESYSGOOD: ::c_int = 0x00000001;
pub const PTRACE_O_TRACEFORK: ::c_int = 0x00000002;
Expand Down