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]
Date: Thu, 18 Apr 2024 15:07:23 +0530
From: Naresh Kamboju <naresh.kamboju@...aro.org>
To: "open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>, 
	open list <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>, 
	lkft-triage@...ts.linaro.org
Cc: Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>, 
	Anders Roxell <anders.roxell@...aro.org>, Arnd Bergmann <arnd@...db.de>, 
	Dan Carpenter <dan.carpenter@...aro.org>
Subject: selftests: mm: seal_elf.c:140:45: warning: format '%s' expects
 argument of type 'char *', but argument 5 has type 'char (*)[5]' [-Wformat=]

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

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

Build log:
---------
PATH:
selftests/mm/seal_elf

seal_elf.c: In function 'test_seal_elf':
seal_elf.c:140:45: warning: format '%s' expects argument of type 'char
*', but argument 5 has type 'char (*)[5]' [-Wformat=]
  140 |                 if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*u
%255[^\n]",
      |                                           ~~^
      |                                             |
      |                                             char *
  141 |                         &addr_start, &addr_end, &prot,
&filename) == 4) {
      |                                                 ~~~~~
      |                                                 |
      |                                                 char (*)[5]
seal_elf.c:140:69: warning: format '%[^
   ' expects argument of type 'char *', but argument 6 has type 'char
(*)[256]' [-Wformat=]
  140 |                 if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*u
%255[^\n]",
      |                                                               ~~~~~~^~
      |                                                                     |
      |
     char *
  141 |                         &addr_start, &addr_end, &prot,
&filename) == 4) {
      |                                                        ~~~~~~~~~
      |                                                        |
      |                                                        char (*)[256]
seal_elf.c:110:13: warning: unused variable 'size' [-Wunused-variable]
  110 |         int size = 0;
      |             ^~~~
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld:
/tmp/cczODkiZ.o: in function `test_seal_elf':
seal_elf.c:(.text+0x738): undefined reference to `sys_mprotect'
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld:
seal_elf.c:(.text+0x794): undefined reference to `sys_mprotect'
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld:
seal_elf.c:(.text+0x944): undefined reference to `sys_mprotect'
collect2: error: ld returned 1 exit status

Steps to reproduce:
---
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/2fDW3wG8BqWxf0afUI5f4wkArPi/

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ