public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <pmoore@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org,
	sgrubb@redhat.com, eparis@redhat.com, peter@hda3.com
Subject: Re: [PATCH V10] fixup: audit: implement audit by executable
Date: Mon, 10 Aug 2015 12:22:15 -0400	[thread overview]
Message-ID: <1471794.hTPSfQy61b@sifl> (raw)
In-Reply-To: <8e78d1dca7d8ecd20d3cbdb9a008950417570866.1439036800.git.rgb@redhat.com>

On Saturday, August 08, 2015 10:20:25 AM Richard Guy Briggs wrote:
> diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
> index 1255dbf..656c7e9 100644
> --- a/kernel/audit_watch.c
> +++ b/kernel/audit_watch.c
> @@ -540,8 +540,14 @@ int audit_dupe_exe(struct audit_krule *new, struct
> audit_krule *old)
> 
>  int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark
> *mark) {
> -	unsigned long ino = tsk->mm->exe_file->f_inode->i_ino;
> -	dev_t dev = tsk->mm->exe_file->f_inode->i_sb->s_dev;
> -
> +	struct file *exe_file;
> +	unsigned long ino;
> +	dev_t dev;
> +
> +	rcu_read_lock();
> +	exe_file = rcu_dereference(tsk->mm->exe_file);

This line is triggering a sparse error on my system:

 # make C=1 M=kernel
 ...
   CHECK   kernel/audit_watch.c
 kernel/audit_watch.c:548:20: error: incompatible types in comparison  
 expression (different address spaces)

For the record I'm using gcc v4.9.3 and sparse v0.5.0.

> +	ino = exe_file->f_inode->i_ino;
> +	dev = exe_file->f_inode->i_sb->s_dev;
> +	rcu_read_unlock();
>  	return audit_mark_compare(mark, ino, dev);
>  }

-- 
paul moore
security @ redhat


  reply	other threads:[~2015-08-10 16:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08 14:20 [PATCH V10] fixup: audit: implement audit by executable Richard Guy Briggs
2015-08-10 16:22 ` Paul Moore [this message]
2015-08-10 17:29   ` Richard Guy Briggs
2015-08-10 18:43     ` Paul Moore
2015-08-11  4:15       ` Richard Guy Briggs
2015-08-12  9:48         ` Richard Guy Briggs
2015-08-12 14:21           ` Paul Moore
2015-08-12 15:19             ` Richard Guy Briggs
2015-08-13  2:30               ` Paul Moore

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=1471794.hTPSfQy61b@sifl \
    --to=pmoore@redhat.com \
    --cc=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@hda3.com \
    --cc=rgb@redhat.com \
    --cc=sgrubb@redhat.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