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+G9fYsQBg2SwfAyzyJmkz2kOQa7Ef+NZVnpEwqc4y911DBzVw@mail.gmail.com>
Date:   Mon, 21 Aug 2023 19:03:03 +0530
From:   Naresh Kamboju <naresh.kamboju@...aro.org>
To:     clang-built-linux <llvm@...ts.linux.dev>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        lkft-triage@...ts.linaro.org
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Shuah Khan <shuah@...nel.org>,
        Anders Roxell <anders.roxell@...aro.org>,
        Arnd Bergmann <arnd@...db.de>
Subject: clang-17: selftests: vdso_standalone_test_x86.c:(.text+0x1e6):
 undefined reference to `memcpy'

Recently we have updated toolchain clang-17 version.

While building selftests vdso following warnings / errors noticed on the
Linux next with clang-17. but pass with gcc-13.

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

make[4]: Entering directory 'tools/testing/selftests/vDSO'
clang --target=x86_64-linux-gnu -fintegrated-as
-Werror=unknown-warning-option -Werror=ignored-optimization-argument
-Werror=option-ignored -Werror=unused-command-line-argument
--target=x86_64-linux-gnu -fintegrated-as -std=gnu99 -nostdlib
-fno-asynchronous-unwind-tables -fno-stack-protector \
vdso_standalone_test_x86.c parse_vdso.c \
-o /vDSO/vdso_standalone_test_x86
vdso_standalone_test_x86.c:73:16: warning: unknown attribute
'externally_visible' ignored [-Wunknown-attributes]
   73 | __attribute__((externally_visible)) void c_main(void **stack)
      |                ^~~~~~~~~~~~~~~~~~
1 warning generated.
parse_vdso.c:65:9: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
   65 |                 if (g = h & 0xf0000000)
      |                     ~~^~~~~~~~~~~~~~~~
parse_vdso.c:65:9: note: place parentheses around the assignment to
silence this warning
   65 |                 if (g = h & 0xf0000000)
      |                       ^
      |                     (                 )
parse_vdso.c:65:9: note: use '==' to turn this assignment into an
equality comparison
   65 |                 if (g = h & 0xf0000000)
      |                       ^
      |                       ==
parse_vdso.c:206:22: warning: passing 'const char *' to parameter of
type 'const unsigned char *' converts between pointers to integer
types where one is of the unique plain 'char' type and the other is
not [-Wpointer-sign]
  206 |         ver_hash = elf_hash(version);
      |                             ^~~~~~~
parse_vdso.c:59:52: note: passing argument to parameter 'name' here
   59 | static unsigned long elf_hash(const unsigned char *name)
      |                                                    ^
parse_vdso.c:207:46: warning: passing 'const char *' to parameter of
type 'const unsigned char *' converts between pointers to integer
types where one is of the unique plain 'char' type and the other is
not [-Wpointer-sign]
  207 |         ELF(Word) chain = vdso_info.bucket[elf_hash(name) %
vdso_info.nbucket];
      |                                                     ^~~~
parse_vdso.c:59:52: note: passing argument to parameter 'name' here
   59 | static unsigned long elf_hash(const unsigned char *name)
      |                                                    ^
3 warnings generated.
/usr/bin/x86_64-linux-gnu-ld: /tmp/vdso_standalone_test_x86-31b09f.o:
in function `c_main':
vdso_standalone_test_x86.c:(.text+0x1e6): undefined reference to `memcpy'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: Leaving directory 'tools/testing/selftests/vDSO'

Links:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2UHhSg0TPLhjp9Uq9EFceoQd0VL/
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230821/testrun/19213783/suite/kselftest-vDSO/test/shardfile-vDSO/details/

Steps to reproduce:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2UHhSg0TPLhjp9Uq9EFceoQd0VL/tuxmake_reproducer.sh

tuxmake --runtime podman --target-arch x86_64 --toolchain clang-17
--kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2UHhSg0TPLhjp9Uq9EFceoQd0VL/config
LLVM=1 LLVM_IAS=1 debugkernel cpupower headers kernel kselftest
modules


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ