2014-11-04 15:03:46

by Chen Gang

[permalink] [raw]
Subject: [PATCH] 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);
^

Signed-off-by: Chen Gang <[email protected]>
---
include/linux/audit.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index 295ae1c..7b1d0d1 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -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)
{
--
1.9.3


2014-11-05 20:43:09

by Paul Moore

[permalink] [raw]
Subject: Re: [PATCH] include/linux/audit.h: Move dummy audit_file() from !AUDIT area to !AUDITSYSCALL area

On Tuesday, November 04, 2014 11:09:52 PM Chen Gang wrote:
> 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);
> ^
>
> Signed-off-by: Chen Gang <[email protected]>
> ---
> 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 ...

> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index 295ae1c..7b1d0d1 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -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) {

--
paul moore
http://www.paul-moore.com

2014-11-06 03:12:59

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] include/linux/audit.h: Move dummy audit_file() from !AUDIT area to !AUDITSYSCALL area

On 11/6/14 4:43, Paul Moore wrote:
> On Tuesday, November 04, 2014 11:09:52 PM Chen Gang wrote:
>> 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);
>> ^
>>
>> Signed-off-by: Chen Gang <[email protected]>
>> ---
>> 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.

>> diff --git a/include/linux/audit.h b/include/linux/audit.h
>> index 295ae1c..7b1d0d1 100644
>> --- a/include/linux/audit.h
>> +++ b/include/linux/audit.h
>> @@ -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) {
>

--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

2014-11-06 12:12:11

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] include/linux/audit.h: Move dummy audit_file() from !AUDIT area to !AUDITSYSCALL area

On Wed, Nov 05, 2014 at 12:43:01PM -0800, Paul Moore wrote:
> On Tuesday, November 04, 2014 11:09:52 PM Chen Gang wrote:
> > 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);
> > ^

> 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.


Attachments:
(No filename) (800.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2014-11-06 16:50:24

by Paul Moore

[permalink] [raw]
Subject: Re: [PATCH] include/linux/audit.h: Move dummy audit_file() from !AUDIT area to !AUDITSYSCALL area

On Thursday, November 06, 2014 11:19:06 AM Chen Gang wrote:
> On 11/6/14 4:43, Paul Moore wrote:
> > On Tuesday, November 04, 2014 11:09:52 PM Chen Gang wrote:
> >> 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);
> >>
> >> ^
> >>
> >> Signed-off-by: Chen Gang <[email protected]>
> >> ---
> >>
> >> 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.

Acked-by: Paul Moore <[email protected]>

> >> diff --git a/include/linux/audit.h b/include/linux/audit.h
> >> index 295ae1c..7b1d0d1 100644
> >> --- a/include/linux/audit.h
> >> +++ b/include/linux/audit.h
> >> @@ -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) {

--
paul moore
http://www.paul-moore.com

2014-11-06 23:40:00

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] include/linux/audit.h: Move dummy audit_file() from !AUDIT area to !AUDITSYSCALL area

I intended to put it here for topology symmetric position with the
real world declaration. Please check.

Thanks.

Send from Lenovo A788t.

Paul Moore <[email protected]> wrote:

>On Thursday, November 06, 2014 11:19:06 AM Chen Gang wrote:
>> On 11/6/14 4:43, Paul Moore wrote:
>> > On Tuesday, November 04, 2014 11:09:52 PM Chen Gang wrote:
>> >> 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);
>> >>
>> >> ^
>> >>
>> >> Signed-off-by: Chen Gang <[email protected]>
>> >> ---
>> >>
>> >> 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.
>
>Acked-by: Paul Moore <[email protected]>
>
>> >> diff --git a/include/linux/audit.h b/include/linux/audit.h
>> >> index 295ae1c..7b1d0d1 100644
>> >> --- a/include/linux/audit.h
>> >> +++ b/include/linux/audit.h
>> >> @@ -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) {
>
>--
>paul moore
>http://www.paul-moore.com
>
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?