Lines Matching refs:gs_cb
17 kfree(tsk->thread.gs_cb); in guarded_storage_release()
23 struct gs_cb *gs_cb; in gs_enable() local
25 if (!current->thread.gs_cb) { in gs_enable()
26 gs_cb = kzalloc(sizeof(*gs_cb), GFP_KERNEL); in gs_enable()
27 if (!gs_cb) in gs_enable()
29 gs_cb->gsd = 25; in gs_enable()
32 load_gs_cb(gs_cb); in gs_enable()
33 current->thread.gs_cb = gs_cb; in gs_enable()
41 if (current->thread.gs_cb) { in gs_disable()
43 kfree(current->thread.gs_cb); in gs_disable()
44 current->thread.gs_cb = NULL; in gs_disable()
51 static int gs_set_bc_cb(struct gs_cb __user *u_gs_cb) in gs_set_bc_cb()
53 struct gs_cb *gs_cb; in gs_set_bc_cb() local
55 gs_cb = current->thread.gs_bc_cb; in gs_set_bc_cb()
56 if (!gs_cb) { in gs_set_bc_cb()
57 gs_cb = kzalloc(sizeof(*gs_cb), GFP_KERNEL); in gs_set_bc_cb()
58 if (!gs_cb) in gs_set_bc_cb()
60 current->thread.gs_bc_cb = gs_cb; in gs_set_bc_cb()
62 if (copy_from_user(gs_cb, u_gs_cb, sizeof(*gs_cb))) in gs_set_bc_cb()
69 struct gs_cb *gs_cb; in gs_clear_bc_cb() local
71 gs_cb = current->thread.gs_bc_cb; in gs_clear_bc_cb()
73 kfree(gs_cb); in gs_clear_bc_cb()
79 struct gs_cb *gs_cb; in gs_load_bc_cb() local
83 gs_cb = current->thread.gs_bc_cb; in gs_load_bc_cb()
84 if (gs_cb) { in gs_load_bc_cb()
85 kfree(current->thread.gs_cb); in gs_load_bc_cb()
88 load_gs_cb(gs_cb); in gs_load_bc_cb()
89 current->thread.gs_cb = gs_cb; in gs_load_bc_cb()
110 struct gs_cb __user *, gs_cb) in SYSCALL_DEFINE2() argument
120 return gs_set_bc_cb(gs_cb); in SYSCALL_DEFINE2()