Skip to contentSkip to conversation

include/linux/audit.h: Move dummy audit_file() from !AUDIT area to !AUDITSYSCALL area

PATCH In review Chen Gang 3 participants 5 messages Nov 4, 2014 – Nov 6, 2014 Audit

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 include/linux/audit.h: Move dummy audit_file() from !AUDIT area to !AUDITSYSCALL area

audit_file() is related with AUDITSYSCALL, not related with AUDIT, so need move dummy one from !AUDIT area to !AUDITSYSCALL area. Or it will cause issue if CONFIG_AUDIT with !CONFIG_AUDITSYSCALL.

The related error (with allmodconfig under tile):

CC fs/open.o
fs/open.c: In function 'SYSC_fchmod':
fs/open.c:530:3: error: implicit declaration of function 'audit_file' [-Werror=implicit-function-declaration]

     audit_file(f.file);
     ^
---
 include/linux/audit.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
include/linux/audit.h +2 -3
index 295ae1c..7b1d0d1 100644
@@ -363,6 +363,8 @@ static inline void audit_inode(struct filename *name,
 				const struct dentry *dentry,
 				unsigned int parent)
 { }
+static inline void audit_file(struct file *file)
+{ }
 static inline void audit_inode_parent_hidden(struct filename *name,
 				const struct dentry *dentry)
 { }
@@ -538,9 +540,6 @@ static inline void audit_log_task_info(struct audit_buffer *ab,
 				       struct task_struct *tsk)
 { }
 #define audit_enabled 0
-static inline void audit_file(struct file *file)
-{
-}
 #endif /* CONFIG_AUDIT */
 static inline void audit_log_string(struct audit_buffer *ab, const char *buf)
 {
Signature · 1 line
1.9.3
maintainer
#1 lore raw
Quoted 9 lines · Chen Gang

audit_file() is related with AUDITSYSCALL, not related with AUDIT, so need move dummy one from !AUDIT area to !AUDITSYSCALL area. Or it will cause issue if CONFIG_AUDIT with !CONFIG_AUDITSYSCALL.

The related error (with allmodconfig under tile):

CC fs/open.o
fs/open.c: In function 'SYSC_fchmod':
fs/open.c:530:3: error: implicit declaration of function 'audit_file'

Quoted 7 lines
[-Werror=implicit-function-declaration] audit_file(f.file);
     ^
---
 include/linux/audit.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

What version of the kernel source are you looking at? I don't see the audit_file() function anywhere ...

Quoted 23 lines
include/linux/audit.h +2 -3
index 295ae1c..7b1d0d1 100644
@@ -363,6 +363,8 @@ static inline void audit_inode(struct filename *name,
 				const struct dentry *dentry,
 				unsigned int parent)
 { }
+static inline void audit_file(struct file *file)
+{ }
 static inline void audit_inode_parent_hidden(struct filename *name,
 				const struct dentry *dentry)
 { }
@@ -538,9 +540,6 @@ static inline void audit_log_task_info(struct
 audit_buffer *ab, struct task_struct *tsk)
 { }
 #define audit_enabled 0
-static inline void audit_file(struct file *file)
-{
-}
 #endif /* CONFIG_AUDIT */
 static inline void audit_log_string(struct audit_buffer *ab, const char
 *buf) {
Signature · 2 lines
paul moore
www.paul-moore.com
author
#2 lore raw
Quoted 13 lines · Paul Moore
Quoted 12 lines · Chen Gang

audit_file() is related with AUDITSYSCALL, not related with AUDIT, so need move dummy one from !AUDIT area to !AUDITSYSCALL area. Or it will cause issue if CONFIG_AUDIT with !CONFIG_AUDITSYSCALL.

The related error (with allmodconfig under tile):

CC fs/open.o
fs/open.c: In function 'SYSC_fchmod':
fs/open.c:530:3: error: implicit declaration of function 'audit_file'

[-Werror=implicit-function-declaration] audit_file(f.file);
     ^
Quoted 8 lines
Quoted 4 lines
---
 include/linux/audit.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

What version of the kernel source are you looking at? I don't see the audit_file() function anywhere ...

It is for next tree. Sorry for not marking it in subject, originally.

Thanks.

Quoted 24 lines
Quoted 23 lines
include/linux/audit.h +2 -3
index 295ae1c..7b1d0d1 100644
@@ -363,6 +363,8 @@ static inline void audit_inode(struct filename *name,
 				const struct dentry *dentry,
 				unsigned int parent)
 { }
+static inline void audit_file(struct file *file)
+{ }
 static inline void audit_inode_parent_hidden(struct filename *name,
 				const struct dentry *dentry)
 { }
@@ -538,9 +540,6 @@ static inline void audit_log_task_info(struct
 audit_buffer *ab, struct task_struct *tsk)
 { }
 #define audit_enabled 0
-static inline void audit_file(struct file *file)
-{
-}
 #endif /* CONFIG_AUDIT */
 static inline void audit_log_string(struct audit_buffer *ab, const char
 *buf) {
Signature · 3 lines
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
#4 lore raw
In reply to Paul Moore
Quoted 7 lines · Paul Moore
Quoted 5 lines · Chen Gang

audit_file() is related with AUDITSYSCALL, not related with AUDIT, so need move dummy one from !AUDIT area to !AUDITSYSCALL area. Or it will cause issue if CONFIG_AUDIT with !CONFIG_AUDITSYSCALL.

The related error (with allmodconfig under tile):

Quoted 8 lines
Quoted 5 lines

CC fs/open.o
fs/open.c: In function 'SYSC_fchmod':
fs/open.c:530:3: error: implicit declaration of function 'audit_file'

[-Werror=implicit-function-declaration] audit_file(f.file);
     ^

What version of the kernel source are you looking at? I don't see the audit_file() function anywhere ...

This issue has been breaking ARMv8 defconfig builds in -next for a few days now.

maintainer Acked-by
#3 lore raw
In reply to Chen Gang
Quoted 19 lines · Chen Gang
Quoted 18 lines · Paul Moore
Quoted 17 lines · Chen Gang

audit_file() is related with AUDITSYSCALL, not related with AUDIT, so need move dummy one from !AUDIT area to !AUDITSYSCALL area. Or it will cause issue if CONFIG_AUDIT with !CONFIG_AUDITSYSCALL.

The related error (with allmodconfig under tile):
CC fs/open.o

fs/open.c: In function 'SYSC_fchmod':
fs/open.c:530:3: error: implicit declaration of function 'audit_file'

[-Werror=implicit-function-declaration] audit_file(f.file);

     ^

---

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
 include/linux/audit.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

What version of the kernel source are you looking at? I don't see the audit_file() function anywhere ...

It is for next tree. Sorry for not marking it in subject, originally.

Sorry, I didn't see Al's patch posted to the audit list and it wasn't in the audit next branch so I was a bit confused.

Regardless, it looks fine to me. While normally I'd pull this into the audit next branch, in this case it is best if Al pulls this into his tree so it goes in with the original audit_file() patch.

If you have to respin this patch I might suggest moving the prototype to after the other audit_inode*() prototypes, e.g. just before audit_core_dumps(), but that is a pretty nit-picky thing.

Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
include/linux/audit.h +2 -0
index 295ae1c..7b1d0d1 100644
@@ -363,6 +363,8 @@ static inline void audit_inode(struct filename *name,
 
 				const struct dentry *dentry,
 				unsigned int parent)
 
 { }
 
+static inline void audit_file(struct file *file)
+{ }

static inline void audit_inode_parent_hidden(struct filename *name,

include/linux/audit.h +0 -3
 				const struct dentry *dentry)
 
 { }
@@ -538,9 +540,6 @@ static inline void audit_log_task_info(struct
 audit_buffer *ab, struct task_struct *tsk)
 
 { }
 #define audit_enabled 0
 
-static inline void audit_file(struct file *file)
-{
-}
 

#endif /* CONFIG_AUDIT */
static inline void audit_log_string(struct audit_buffer *ab, const char

*buf) {

Signature · 2 lines
paul moore
www.paul-moore.com