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>] [day] [month] [year] [list]
Message-ID: <CA+G9fYsMhzDCyqCPoZ68oMUV5tMbMmi5qF7_C+55Ec9h6YfXgw@mail.gmail.com>
Date: Thu, 18 Apr 2024 18:01:52 +0530
From: Naresh Kamboju <naresh.kamboju@...aro.org>
To: "open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>, 
	Linux ARM <linux-arm-kernel@...ts.infradead.org>, 
	open list <linux-kernel@...r.kernel.org>, lkft-triage@...ts.linaro.org, 
	Linux Regressions <regressions@...ts.linux.dev>
Cc: Mark Brown <broonie@...nel.org>, Catalin Marinas <catalin.marinas@....com>, 
	Arnd Bergmann <arnd@...db.de>, Anders Roxell <anders.roxell@...aro.org>, 
	Dan Carpenter <dan.carpenter@...aro.org>
Subject: selftests: arm64: sve-ptrace.c:85:40: warning: data argument not used
 by format string [-Wformat-extra-args]

The Linux next building selftests with clang-17 and gcc-13 found these
build warnings.

Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>

Build log:
---------
PATH:
selftests/arm64/fp
The reported build warnings noticed on following test files.
  * sve-ptrace.c
  * za-ptrace.c
  * zt-ptrace.c

clang-17 warnings:
-----
sve-ptrace.c:85:40: warning: data argument not used by format string
[-Wformat-extra-args]
   85 |                 ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
      |                                    ~~~~~~~~~~~~~~~~  ^
sve-ptrace.c:88:40: warning: data argument not used by format string
[-Wformat-extra-args]
   88 |                 ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
      |                                    ~~~~~~~~~~~~~~~~  ^
sve-ptrace.c:344:11: warning: format specifies type 'int' but the
argument has type 'size_t' (aka 'unsigned long') [-Wformat]
  343 |                 ksft_test_result_fail("Error allocating %d
byte buffer for %s VL %u\n",
      |                                                         ~~
      |                                                         %zu
  344 |                                       data_size, type->name, vl);
      |                                       ^~~~~~~~~
and more

Gcc-13 warnings:
------
sve-ptrace.c: In function 'do_child':
sve-ptrace.c:85:36: warning: too many arguments for format [-Wformat-extra-args]
   85 |                 ksft_exit_fail_msg("PTRACE_TRACEME", strerror(errno));
      |                                    ^~~~~~~~~~~~~~~~
sve-ptrace.c:88:36: warning: too many arguments for format [-Wformat-extra-args]
   88 |                 ksft_exit_fail_msg("raise(SIGSTOP)", strerror(errno));
      |                                    ^~~~~~~~~~~~~~~~
sve-ptrace.c: In function 'ptrace_set_sve_get_sve_data':
sve-ptrace.c:343:58: warning: format '%d' expects argument of type
'int', but argument 2 has type 'size_t' {aka 'long unsigned int'}
[-Wformat=]
  343 |                 ksft_test_result_fail("Error allocating %d
byte buffer for %s VL %u\n",
      |                                                         ~^
      |                                                          |
      |                                                          int
      |                                                         %ld
  344 |                                       data_size, type->name, vl);
      |                                       ~~~~~~~~~
      |                                       |
      |                                       size_t {aka long unsigned int}
and more

Steps to reproduce:
---
tuxmake --runtime podman --target-arch arm64 --toolchain clang-nightly \
  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3nAXzFH2GOEle3S3MVC53A9/config
\
  LLVM=1 LLVM_IAS=1 debugkernel dtbs dtbs-legacy headers kernel
kselftest modules


tuxmake --runtime podman --target-arch arm64 --toolchain gcc-13 \
  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3wG8BqWxf0afUI5f4wkArPi/config
\
  debugkernel dtbs dtbs-legacy headers kernel kselftest modules

Links:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3nAXzFH2GOEle3S3MVC53A9/
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3wG8BqWxf0afUI5f4wkArPi/

--
Linaro LKFT
https://lkft.linaro.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ