[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6b7db918-8d0b-b280-91e4-c15e22451cfc@web.de>
Date: Wed, 3 Jul 2019 11:33:22 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: David Laight <David.Laight@...LAB.COM>,
linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org
Cc: Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
James Morris <jmorris@...ei.org>,
Mimi Zohar <zohar@...ux.ibm.com>,
"Serge E. Hallyn" <serge@...lyn.com>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: ima: Replace two seq_printf() calls by seq_puts() in
ima_show_template_data_ascii()
> So this is probably just a minor performance improvement in a code
> path where it really doesn't matter.
I imagine that another small software adjustment can help a bit
to get nicer run time characteristics also at this place.
>> +++ b/security/integrity/ima/ima_template_lib.c
>> @@ -74,7 +74,7 @@ static void ima_show_template_data_ascii(struct seq_file *m,
>> case DATA_FMT_DIGEST_WITH_ALGO:
>> buf_ptr = strnchr(field_data->data, buflen, ':');
>> if (buf_ptr != field_data->data)
>> - seq_printf(m, "%s", field_data->data);
>> + seq_puts(m, field_data->data);
>>
>> /* skip ':' and '\0' */
>> buf_ptr += 2;
>
> That code looks highly suspect!
Would you like to change this implementation detail any more?
Regards,
Markus
Powered by blists - more mailing lists