lkml.org 
[lkml]   [2003]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Process Attribute API for Security Modules 2.5.69
Stephen Smalley <sds@epoch.ncsc.mil> wrote:
>
> This patch against 2.5.69 implements a process attribute API for
> security modules via a set of nodes in a /proc/pid/attr directory.

Just a few triviata:

> +static int proc_attr_readdir(struct file * filp,

Can all this be inside CONFIG_SOMETHING? It's quite a lot of code.

> + switch (i) {
> + case 0:

We often line the `case' up with the `switch' to save a tabstop.

> + if (i>=sizeof(attr_stuff)/sizeof(attr_stuff[0])) {

The ARRAY_SIZE macro does this.

> +static ssize_t proc_pid_attr_read(struct file * file, char * buf,
> + size_t count, loff_t *ppos)
> +{
> ...
> + copy_to_user(buf, (char *) page + *ppos, count);

Need to check the return value here, return a short read if something was
copied, else -EFAULT. Or just EFAULT.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.072 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site