lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <291c5d58-9681-49bc-b5c4-3ee4555d68bd@cmss.chinamobile.com>
Date: Thu, 21 Nov 2024 17:14:53 +0800
From: guanjing <guanjing@...s.chinamobile.com>
To: Muhammad Usama Anjum <Usama.Anjum@...labora.com>,
 akpm@...ux-foundation.org, shuah@...nel.org
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] selftests: mm: Fix conversion specifiers
 intransact_test()

I found it when reading the code. So far, I haven't found any tools that 
can be used for scanning yet. :)

Thank you for your review.


On 2024/11/19 15:33, Muhammad Usama Anjum wrote:
> Thanks for the patch.
>
>
> On 11/17/24 12:12 PM, guanjing wrote:
>> Lots of incorrect conversion specifiers. Fix them.
> Not sure why I'd not got warnings. Just curious, how were you able
> to notice these warnings?
>
>> Fixes: 46fd75d4a3c9 ("selftests: mm: add pagemap ioctl tests")
>> Signed-off-by: guanjing <guanjing@...s.chinamobile.com>
> Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
>
>> ---
>>   tools/testing/selftests/mm/pagemap_ioctl.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c
>> index bcc73b4e805c..fdafce0654e9 100644
>> --- a/tools/testing/selftests/mm/pagemap_ioctl.c
>> +++ b/tools/testing/selftests/mm/pagemap_ioctl.c
>> @@ -1405,9 +1405,9 @@ static void transact_test(int page_size)
>>   	memset(mem, 0, 0x1000 * nthreads * pages_per_thread);
>>   
>>   	count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size);
>> -	ksft_test_result(count > 0, "%s count %d\n", __func__, count);
>> +	ksft_test_result(count > 0, "%s count %u\n", __func__, count);
>>   	count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size);
>> -	ksft_test_result(count == 0, "%s count %d\n", __func__, count);
>> +	ksft_test_result(count == 0, "%s count %u\n", __func__, count);
>>   
>>   	finish = 0;
>>   	for (i = 0; i < nthreads; ++i)
>> @@ -1429,7 +1429,7 @@ static void transact_test(int page_size)
>>   			ksft_exit_fail_msg("pthread_barrier_wait\n");
>>   
>>   		if (count > nthreads * access_per_thread)
>> -			ksft_exit_fail_msg("Too big count %d expected %d, iter %d\n",
>> +			ksft_exit_fail_msg("Too big count %u expected %u, iter %u\n",
>>   					   count, nthreads * access_per_thread, i);
>>   
>>   		c = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size);
>> @@ -1454,7 +1454,7 @@ static void transact_test(int page_size)
>>   			 * access and application gets page fault again for the same write.
>>   			 */
>>   			if (count < nthreads * access_per_thread) {
>> -				ksft_test_result_fail("Lost update, iter %d, %d vs %d.\n", i, count,
>> +				ksft_test_result_fail("Lost update, iter %u, %u vs %u.\n", i, count,
>>   						      nthreads * access_per_thread);
>>   				return;
>>   			}
>> @@ -1467,7 +1467,7 @@ static void transact_test(int page_size)
>>   	finish = 1;
>>   	pthread_barrier_wait(&end_barrier);
>>   
>> -	ksft_test_result_pass("%s Extra pages %u (%.1lf%%), extra thread faults %d.\n", __func__,
>> +	ksft_test_result_pass("%s Extra pages %u (%.1lf%%), extra thread faults %u.\n", __func__,
>>   			      extra_pages,
>>   			      100.0 * extra_pages / (iter_count * nthreads * access_per_thread),
>>   			      extra_thread_faults);



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ