linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: eparis@redhat.com, viro@zeniv.linux.org.uk
Cc: linux-audit@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v5 0/9] audit: overhaul audit_names handling to allow for retrying on path-based syscalls
Date: Thu, 26 Jul 2012 07:21:04 -0400	[thread overview]
Message-ID: <1343301673-10642-1-git-send-email-jlayton@redhat.com> (raw)

This patchset is a minor respin of the series that I posted June 26th.
The main reason is to deal with some fairly minor merge conflicts that
have cropped up due to recent changes. This patch also relies on the
patch that I sent separately yesterday entitled "vfs: don't let do_last
pass negative dentry to audit_inode".

This series is available via the "audit" branch of my git tree as well:

    git://git.samba.org/jlayton/linux.git audit

The original cover letter text follows:

I recently posted a set of patches to have the kernel retry the lookup
and call when path-based syscalls would ordinarily return ESTALE. Al
took a look and pointed out that this would break the fragile logic that
handles the audit_names for syscall auditing.

This patchset comprises a number of incremental changes that should make
it ok to retry on a path-based syscall. The main caveat is that the retry
mustn't redo the getname() on the strings involved.

Unfortunately, we don't have anything that really describes what the
correct behavior is for this stuff, so I'm shooting here for "no
discernable difference" on a retry.

This seems to do the right thing in the cases that I've tested; mostly
the normal case where things succeed or fail for some reason and where
the syscall is retried after an ESTALE error.

Review is of course appreciated. There are some fixes in here too for
some subtle bugs in the existing code. Some of these patches may also
help performance in some cases, but I haven't measured it for that.

I'd like to see this patchset go into 3.6 if at all possible.

Eric Paris (1):
  audit: make audit_compare_dname_path use parent_len helper

Jeff Layton (8):
  audit: remove unnecessary NULL ptr checks from do_path_lookup
  audit: pass in dentry to audit_copy_inode wherever possible
  audit: reverse arguments to audit_inode_child
  audit: add a new "type" field to audit_names struct
  audit: set the name_len in audit_inode for parent lookups
  audit: remove dirlen argument to audit_compare_dname_path
  audit: optimize audit_compare_dname_path
  audit: overhaul __audit_inode_child to accomodate retrying

 fs/btrfs/ioctl.c         |   2 +-
 fs/namei.c               |  22 ++++-----
 fs/open.c                |   4 +-
 fs/xattr.c               |   8 ++--
 include/linux/audit.h    |  36 ++++++++++-----
 include/linux/fsnotify.h |   8 ++--
 ipc/mqueue.c             |   8 ++--
 kernel/audit.h           |   7 ++-
 kernel/audit_watch.c     |   3 +-
 kernel/auditfilter.c     |  65 +++++++++++++++++----------
 kernel/auditsc.c         | 115 ++++++++++++++++++++++++++++-------------------
 11 files changed, 166 insertions(+), 112 deletions(-)

-- 
1.7.11.2


             reply	other threads:[~2012-07-26 11:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 11:21 Jeff Layton [this message]
2012-07-26 11:21 ` [PATCH v5 1/9] audit: remove unnecessary NULL ptr checks from do_path_lookup Jeff Layton
2012-07-26 11:21 ` [PATCH v5 2/9] audit: pass in dentry to audit_copy_inode wherever possible Jeff Layton
2012-07-26 11:21 ` [PATCH v5 3/9] audit: reverse arguments to audit_inode_child Jeff Layton
2012-07-26 11:21 ` [PATCH v5 4/9] audit: add a new "type" field to audit_names struct Jeff Layton
2012-07-26 11:21 ` [PATCH v5 5/9] audit: set the name_len in audit_inode for parent lookups Jeff Layton
2012-07-26 11:21 ` [PATCH v5 6/9] audit: remove dirlen argument to audit_compare_dname_path Jeff Layton
2012-07-26 11:21 ` [PATCH v5 7/9] audit: make audit_compare_dname_path use parent_len helper Jeff Layton
2012-07-26 11:21 ` [PATCH v5 8/9] audit: optimize audit_compare_dname_path Jeff Layton
2012-07-26 11:21 ` [PATCH v5 9/9] audit: overhaul __audit_inode_child to accomodate retrying Jeff Layton

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=1343301673-10642-1-git-send-email-jlayton@redhat.com \
    --to=jlayton@redhat.com \
    --cc=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.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;
as well as URLs for NNTP newsgroup(s).