Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753878AbbHJQWT (ORCPT ); Mon, 10 Aug 2015 12:22:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58499 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750958AbbHJQWQ (ORCPT ); Mon, 10 Aug 2015 12:22:16 -0400 From: Paul Moore To: Richard Guy Briggs 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 Message-ID: <1471794.hTPSfQy61b@sifl> Organization: Red Hat User-Agent: KMail/4.14.10 (Linux/4.1.2-gentoo; KDE/4.14.10; x86_64; ; ) In-Reply-To: <8e78d1dca7d8ecd20d3cbdb9a008950417570866.1439036800.git.rgb@redhat.com> References: <8e78d1dca7d8ecd20d3cbdb9a008950417570866.1439036800.git.rgb@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1376 Lines: 45 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/