blob: fc16fbc659c7a47aeb0192afd647e7f3d3fe8140 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _LINUX_PERSONALITY_H
3#define _LINUX_PERSONALITY_H
4
David Howells607ca462012-10-13 10:46:48 +01005#include <uapi/linux/personality.h>
6
Linus Torvalds1da177e2005-04-16 15:20:36 -07007/*
8 * Return the base personality without flags.
9 */
10#define personality(pers) (pers & PER_MASK)
11
Linus Torvalds1da177e2005-04-16 15:20:36 -070012/*
13 * Change personality of the currently running process.
14 */
Richard Weinberger9058f3b2015-04-11 21:45:22 +020015#define set_personality(pers) (current->personality = (pers))
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#endif /* _LINUX_PERSONALITY_H */