From: "Timothy R. Chavez" <tinytim@us.ibm.com>
To: "George C. Wilson" <ltcgcw@us.ibm.com>
Cc: linux-audit@redhat.com
Subject: Re: [PATCH] Audit of POSIX Message Queue Syscalls
Date: Wed, 17 May 2006 09:34:44 -0500 [thread overview]
Message-ID: <1147876484.11589.46.camel@localhost.localdomain> (raw)
In-Reply-To: <20060517014055.GA16852@us.ibm.com>
Hey George,
Just some quick things. I didn't want to reproduce any of the things
Steve pointed out already... These are just general comments...
-tim
On Tue, 2006-05-16 at 20:40 -0500, George C. Wilson wrote:
<snip>
> @@ -660,6 +663,9 @@ asmlinkage long sys_mq_open(const char _
> if (IS_ERR(name = getname(u_name)))
> return PTR_ERR(name);
>
> + if ((error = audit_mq_open(oflag, mode, u_attr)) != 0)
> + return error;
> +
> fd = get_unused_fd();
> if (fd < 0)
> goto out_putname;
> @@ -814,6 +820,9 @@ asmlinkage long sys_mq_timedsend(mqd_t m
> long timeout;
> int ret;
>
> + if ((ret = audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout)) != 0)
> + return ret;
> +
Take the assignment out of the dang conditional :) Besides, you're over
80 characters here aren't ya? Also, you should probably just follow the
same convention in the function..
ret = audit_mg_timedsend(..);
if (!ret)
goto out;
[..]
> if (unlikely(msg_prio >= (unsigned long) MQ_PRIO_MAX))
> return -EINVAL;
>
> @@ -896,6 +905,9 @@ asmlinkage ssize_t sys_mq_timedreceive(m
> struct mqueue_inode_info *info;
> struct ext_wait_queue wait;
>
> + if ((ret = audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout)) != 0)
> + return ret;
> +
> timeout = prepare_timeout(u_abs_timeout);
>
> ret = -EBADF;
> @@ -975,6 +987,9 @@ asmlinkage long sys_mq_notify(mqd_t mqde
> struct mqueue_inode_info *info;
> struct sk_buff *nc;
>
> + if ((ret = audit_mq_notify(mqdes, u_notification)) != 0)
> + return ret;
> +
> nc = NULL;
> sock = NULL;
> if (u_notification != NULL) {
> @@ -1087,7 +1102,7 @@ asmlinkage long sys_mq_getsetattr(mqd_t
> const struct mq_attr __user *u_mqstat,
> struct mq_attr __user *u_omqstat)
> {
> - int ret;
> + int ret, audret;
> struct mq_attr mqstat, omqstat;
> struct file *filp;
> struct inode *inode;
> @@ -1130,9 +1145,13 @@ asmlinkage long sys_mq_getsetattr(mqd_t
> sizeof(struct mq_attr)))
> ret = -EFAULT;
>
> +
Eh, get rid of these...
[..]
> out_fput:
> fput(filp);
> out:
> + audret = audit_mq_getsetattr(mqdes, &mqstat, &omqstat);
> + if (ret == 0)
> + ret = audret;
At a cursory glance, this looks a little fishy to me...
> return ret;
> }
>
<snip>
next prev parent reply other threads:[~2006-05-17 14:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-17 1:40 [PATCH] Audit of POSIX Message Queue Syscalls George C. Wilson
2006-05-17 13:34 ` Steve Grubb
2006-05-17 16:39 ` Amy Griffis
2006-05-17 18:11 ` Steve Grubb
2006-05-17 22:38 ` George C. Wilson
2006-05-17 14:34 ` Timothy R. Chavez [this message]
2006-05-17 18:27 ` Steve Grubb
2006-05-24 21:09 ` [PATCH] Audit of POSIX Message Queue Syscalls v.2 George C. Wilson
2006-05-24 21:23 ` Linda Knippers
2006-05-24 21:32 ` Amy Griffis
2006-05-24 21:53 ` Steve Grubb
2006-05-25 1:33 ` George C. Wilson
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=1147876484.11589.46.camel@localhost.localdomain \
--to=tinytim@us.ibm.com \
--cc=linux-audit@redhat.com \
--cc=ltcgcw@us.ibm.com \
/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