lkml.org 
[lkml]   [2015]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V10] fixup: audit: implement audit by executable
Date
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



\
 
 \ /
  Last update: 2015-08-10 18:41    [W:0.069 / U:1.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site