Re: [RFC PATCH 4/5] audit: add a missing function definition when !CONFIG_AUDIT

Ricardo Robaina <[email protected]> Mon, 27 Jul 2026 15:02:07 -0300
Newsgroups org.kernel.vger.audit
Message-ID <CAABTaaCuNORqv49_ZDcbq8x3LAjb7beuQHEmUjVzGU8AL+y0mw@mail.gmail.com>
On Fri, Jul 24, 2026 at 4:57=E2=80=AFPM Paul Moore <[email protected]> wr=
ote:
>
> The audit_string_contains_control() function does not have a dummy
> function definition in the !CONFIG_AUDIT case.
>
> Signed-off-by: Paul Moore <[email protected]>
> ---
>  include/linux/audit.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index d327113c913d..ac8f5f77d442 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -237,6 +237,10 @@ void audit_log_format(struct audit_buffer *ab, const=
 char *fmt, ...)
>  { }
>  static inline void audit_log_end(struct audit_buffer *ab)
>  { }
> +static inline bool audit_string_contains_control(const char *string, int=
 len);
> +{
> +       return false;
> +}

Hi Paul,

I noticed a stray semicolon here. Otherwise, it looks good.

Reviewed-by: Ricardo Robaina <[email protected]>

>  static inline void audit_log_n_hex(struct audit_buffer *ab,
>                                    const unsigned char *buf, int len)
>  { }
> --
> 2.55.0
>
>

-Ricardo