public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>,
	audit@vger.kernel.org, linux-kernel@vger.kernel.org,
	Eric Paris <eparis@redhat.com>
Subject: Re: [PATCH v1 1/1] audit: Mark audit_log_vformat() with __printf() attribute
Date: Thu, 13 Mar 2025 10:50:49 +0200	[thread overview]
Message-ID: <Z9KcaWFLe3n4xCmA@smile.fi.intel.com> (raw)
In-Reply-To: <CAHC9VhRHZL+QTsfK2Sg5+rw7RSxUoaF=YTwGW9Oia5xnvqAL1w@mail.gmail.com>

On Wed, Mar 12, 2025 at 04:16:36PM -0400, Paul Moore wrote:
> On Wed, Mar 12, 2025 at 4:02 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > audit_log_vformat() is using printf() type of format, and compiler
> > is not happy about this:
> >
> > kernel/audit.c:1978:9: error: function ‘audit_log_vformat’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
> > kernel/audit.c:1987:17: error: function ‘audit_log_vformat’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
> >
> > Fix the compilation errors by adding __printf() attribute.

> It would be good to list the compiler version/flags that triggers this
> error in the patch description

CONFIG_WERROR=y (this is default), gcc (Debian 14.2.0-17) 14.2.0, `make W=1`.

> as I've compiled the audit code quite a bit and haven't seen these errors :)

Good for you, I have 100% reproducibility of this :-)

I'll do a v2 today.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2025-03-13  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12 20:02 [PATCH v1 1/1] audit: Mark audit_log_vformat() with __printf() attribute Andy Shevchenko
2025-03-12 20:16 ` Paul Moore
2025-03-13  8:50   ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z9KcaWFLe3n4xCmA@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=audit@vger.kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox