linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: viro@parcelfarce.linux.theplanet.co.uk, torvalds@transmeta.com,
	linux-kernel@vger.kernel.org, jaharkes@cs.cmu.edu,
	linux-security-module@wirex.com
Subject: Re: [PATCH] Process Attribute API for Security Modules 2.5.69
Date: Tue, 6 May 2003 14:01:04 -0700	[thread overview]
Message-ID: <20030506140104.78dda82f.akpm@digeo.com> (raw)
In-Reply-To: <1052237601.1377.991.camel@moss-huskers.epoch.ncsc.mil>

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.



  reply	other threads:[~2003-05-06 20:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-06 16:13 [PATCH] Process Attribute API for Security Modules 2.5.69 Stephen Smalley
2003-05-06 21:01 ` Andrew Morton [this message]
2003-05-07 10:50 ` viro
2003-05-07 15:02   ` Stephen Smalley
2003-05-08 12:12     ` Andreas Gruenbacher
2003-05-08 13:19     ` viro
2003-05-16 20:08     ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030506140104.78dda82f.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@wirex.com \
    --cc=sds@epoch.ncsc.mil \
    --cc=torvalds@transmeta.com \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).