Lines Matching refs:plm
366 struct policy_load_memory *plm = NULL; in sel_open_policy() local
383 plm = kzalloc(sizeof(*plm), GFP_KERNEL); in sel_open_policy()
384 if (!plm) in sel_open_policy()
387 rc = security_read_policy(&plm->data, &plm->len); in sel_open_policy()
391 if ((size_t)i_size_read(inode) != plm->len) { in sel_open_policy()
393 i_size_write(inode, plm->len); in sel_open_policy()
399 filp->private_data = plm; in sel_open_policy()
407 if (plm) in sel_open_policy()
408 vfree(plm->data); in sel_open_policy()
409 kfree(plm); in sel_open_policy()
416 struct policy_load_memory *plm = filp->private_data; in sel_release_policy() local
418 BUG_ON(!plm); in sel_release_policy()
422 vfree(plm->data); in sel_release_policy()
423 kfree(plm); in sel_release_policy()
431 struct policy_load_memory *plm = filp->private_data; in sel_read_policy() local
439 return simple_read_from_buffer(buf, count, ppos, plm->data, plm->len); in sel_read_policy()
444 struct policy_load_memory *plm = vmf->vma->vm_file->private_data; in sel_mmap_policy_fault() local
452 if (offset >= roundup(plm->len, PAGE_SIZE)) in sel_mmap_policy_fault()
455 page = vmalloc_to_page(plm->data + offset); in sel_mmap_policy_fault()