public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/15] sanitize AUDIT_MQ_SENDRECV
Date: Tue, 16 Dec 2008 23:56:56 -0800	[thread overview]
Message-ID: <20081216235656.d7985f1d.akpm@linux-foundation.org> (raw)
In-Reply-To: <E1LCohe-0000C7-TH@ZenIV.linux.org.uk>

On Wed, 17 Dec 2008 05:12:10 +0000 Al Viro <viro@ftp.linux.org.uk> wrote:

> 
> * logging the original value of *msg_prio in mq_timedreceive(2)
>   is insane - the argument is write-only (i.e. syscall always
>   ignores the original value and only overwrites it).
> * merge __audit_mq_timed{send,receive}
> * don't do copy_from_user() twice
> * don't mess with allocations in auditsc part
> * ... and don't bother checking !audit_enabled and !context in there -
>   we'd already checked for audit_dummy_context().
> 
> ...
>
> +		if (copy_from_user(&ts, u_abs_timeout, 
> +					sizeof(struct timespec)))

Well that's odd.  afacit timespec has different sizes on 32-bit and
64-bit userspace.

But the old audit code did this copy too, and it presumably worked.

  parent reply	other threads:[~2008-12-17  7:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17  5:12 [PATCH 7/15] sanitize AUDIT_MQ_SENDRECV Al Viro
2008-12-17  7:40 ` James Morris
2008-12-17  9:40   ` Al Viro
2008-12-17  7:56 ` Andrew Morton [this message]
2008-12-17  8:03   ` Al Viro

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=20081216235656.d7985f1d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.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