On Thu, 2016-01-21 at 01:05 +0100, Luis R. Rodriguez wrote: > On Mon, Jan 18, 2016 at 10:11:24AM -0500, Mimi Zohar wrote: > > --- a/fs/exec.c > > +++ b/fs/exec.c > > @@ -903,6 +903,27 @@ out: > > return ret; > > } > > > > +int kernel_read_file_from_path(char *path, void **buf, loff_t *size, > > + loff_t max_size, int policy_id) > > +{ > > + struct file *file; > > + int ret; > > + > > + if (!path || !*path) > > + return -EINVAL; > > + > > + file = filp_open(path, O_RDONLY, 0); > > + if (IS_ERR(file)) { > > + ret = PTR_ERR(file); > > + pr_err("Unable to open file: %s (%d)", path, ret); > > + return ret; > > + } > > + > > + ret = kernel_read_file(file, buf, size, max_size, policy_id); > > + fput(file); > > + return ret; > > +} > > + > > EXPORT_SYMBOL_GPL() needed. Yes. Thank you for reviewing all the patches! Mimi