Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
user.c File Reference
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/key.h>
#include <linux/interrupt.h>
#include <linux/export.h>
#include <linux/user_namespace.h>

Go to the source code of this file.

Macros

#define UIDHASH_BITS   (CONFIG_BASE_SMALL ? 3 : 7)
 
#define UIDHASH_SZ   (1 << UIDHASH_BITS)
 
#define UIDHASH_MASK   (UIDHASH_SZ - 1)
 
#define __uidhashfn(uid)   (((uid >> UIDHASH_BITS) + uid) & UIDHASH_MASK)
 
#define uidhashentry(uid)   (uidhash_table + __uidhashfn((__kuid_val(uid))))
 

Functions

 EXPORT_SYMBOL_GPL (init_user_ns)
 
struct user_structfind_user (kuid_t uid)
 
void free_uid (struct user_struct *up)
 
struct user_structalloc_uid (kuid_t uid)
 
 module_init (uid_cache_init)
 

Variables

struct user_namespace init_user_ns
 
struct hlist_head uidhash_table [UIDHASH_SZ]
 
struct user_struct root_user
 

Macro Definition Documentation

#define __uidhashfn (   uid)    (((uid >> UIDHASH_BITS) + uid) & UIDHASH_MASK)

Definition at line 65 of file user.c.

#define UIDHASH_BITS   (CONFIG_BASE_SMALL ? 3 : 7)

Definition at line 62 of file user.c.

#define UIDHASH_MASK   (UIDHASH_SZ - 1)

Definition at line 64 of file user.c.

#define UIDHASH_SZ   (1 << UIDHASH_BITS)

Definition at line 63 of file user.c.

#define uidhashentry (   uid)    (uidhash_table + __uidhashfn((__kuid_val(uid))))

Definition at line 66 of file user.c.

Function Documentation

struct user_struct* alloc_uid ( kuid_t  uid)
read

Definition at line 165 of file user.c.

EXPORT_SYMBOL_GPL ( init_user_ns  )
struct user_struct* find_user ( kuid_t  uid)
read

Definition at line 140 of file user.c.

void free_uid ( struct user_struct up)

Definition at line 151 of file user.c.

module_init ( uid_cache_init  )

Variable Documentation

struct user_namespace init_user_ns

Definition at line 24 of file user.c.

struct user_struct root_user
Initial value:
= {
.__count = ATOMIC_INIT(1),
.processes = ATOMIC_INIT(1),
.files = ATOMIC_INIT(0),
.sigpending = ATOMIC_INIT(0),
.locked_shm = 0,
}

Definition at line 83 of file user.c.

struct hlist_head uidhash_table[UIDHASH_SZ]

Definition at line 69 of file user.c.