Files
linux/kernel/exec_domain.c
T

47 lines
1.1 KiB
C
Raw Normal View History

// SPDX-License-Identifier: GPL-2.0
2005-04-16 15:20:36 -07:00
/*
* Handling of different ABIs (personalities).
*
* We group personalities into execution domains which have their
* own handlers for kernel entry points, signal mapping, etc...
*
* 2001-05-06 Complete rewrite, Christoph Hellwig (hch@infradead.org)
*/
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/module.h>
#include <linux/personality.h>
#include <linux/proc_fs.h>
2005-04-16 15:20:36 -07:00
#include <linux/sched.h>
#include <linux/seq_file.h>
2005-04-16 15:20:36 -07:00
#include <linux/syscalls.h>
#include <linux/sysctl.h>
#include <linux/types.h>
#ifdef CONFIG_PROC_FS
static int execdomains_proc_show(struct seq_file *m, void *v)
2005-04-16 15:20:36 -07:00
{
2015-03-30 08:14:16 +02:00
seq_puts(m, "0-0\tLinux \t[kernel]\n");
return 0;
2005-04-16 15:20:36 -07:00
}
static int __init proc_execdomains_init(void)
{
2018-05-15 15:57:23 +02:00
proc_create_single("execdomains", 0, NULL, execdomains_proc_show);
return 0;
}
module_init(proc_execdomains_init);
#endif
SYSCALL_DEFINE1(personality, unsigned int, personality)
2005-04-16 15:20:36 -07:00
{
unsigned int old = current->personality;
2005-04-16 15:20:36 -07:00
if (personality != 0xffffffff)
2005-04-16 15:20:36 -07:00
set_personality(personality);
return old;
2005-04-16 15:20:36 -07:00
}