Re: [PATCH v2 1/3] integrity: Replace all uses of integrity_audit_msg() with integrity_audit_message()

From: Frederick Lawler

Date: Tue Sep 15 2026 - 17:10:22 EST


Hi Mimi,

On Tue, Sep 15, 2026 at 04:00:34PM -0400, Mimi Zohar wrote:
> On Mon, 2026-07-27 at 17:21 -0500, Frederick Lawler wrote:
> > integrity_audit_msg() wraps integrity_audit_message() such that
> > error codes are hidden by passing an additional parameter to
> > integrity_audit_message(). Since this is a wrapper, we can replace
> > this function with integrity_audit_message() introduced in commit
> > 2f845882ecd2 ("integrity: Add errno field in audit message")
> >
> > No functional change intended.
>
> There's an unintentional change in ima_write_policy(), which replaces the
> existing '1' with result.

Oof. Good catch. That was intended for the later patch.

>
> >
> > Signed-off-by: Frederick Lawler <fred@xxxxxxxxxxxxxx>
>
> Is renaming integrity_audit_msg() to integrity_audit_message() actually the
> right approach here? integrity_audit_message() currently has only 2 callers vs.
> ~20+ for integrity_audit_msg(), and the rename forces re-wrapping of every
> multi-line call site since integrity_audit_message is 4 chars longer, bloating
> the first patch.
>
> Why not simply add errno to the integrity_audit_msg() definition and callers.
>

I can switch that around. I assumed we'd want to keep _message() since
that was wrapped by _msg(). And not dealing with the line-wrapping is
better.

Best,
Fred