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] [thread-next>] [day] [month] [year] [list]
Message-ID: <dae3a35e-2ce9-42a2-956b-039505c98082@linux.alibaba.com>
Date: Mon, 14 Oct 2024 14:31:03 +0800
From: "tianjia.zhang" <tianjia.zhang@...ux.alibaba.com>
To: Marc Zyngier <maz@...nel.org>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>,
 Oliver Upton <oliver.upton@...ux.dev>, Joey Gouly <joey.gouly@....com>,
 Suzuki K Poulose <suzuki.poulose@....com>, Zenghui Yu
 <yuzenghui@...wei.com>, Catalin Marinas <catalin.marinas@....com>,
 Will Deacon <will@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
 Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
 Pierre-Clément Tosi <ptosi@...gle.com>,
 linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
 linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] KVM: arm64: nVHE: gen-hyprel: Silent build warnings

Hi Marc,

On 10/10/24 9:03 PM, Marc Zyngier wrote:
> On Thu, 10 Oct 2024 09:12:29 +0100,
> "tianjia.zhang" <tianjia.zhang@...ux.alibaba.com> wrote:
>>
>>
>>
>> On 10/9/24 7:07 PM, Marc Zyngier wrote:
>>> On Wed, 09 Oct 2024 09:57:51 +0100,
>>> Tianjia Zhang <tianjia.zhang@...ux.alibaba.com> wrote:
>>>>
>>>> This patch silent the some mismatch format build warnings
>>>> with clang, like:
>>>>
>>>>     arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:233:2: warning: format specifies
>>>>     type 'unsigned long' but the argument has type 'Elf64_Off'
>>>>     (aka 'unsigned long long') [-Wformat]
>>>>       233 |         assert_ne(off, 0UL, "%lu");
>>>>           |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>           |                              %llu
>>>>     arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:193:34: note: expanded from macro 'assert_ne'
>>>>       193 | #define assert_ne(lhs, rhs, fmt)        assert_op(lhs, rhs, fmt, !=)
>>>>           |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>     arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:188:19: note: expanded from macro 'assert_op'
>>>>       187 |                                 " failed (lhs=" fmt ", rhs=" fmt        \
>>>>           |                                                 ~~~
>>>>       188 |                                 ", line=%d)", _lhs, _rhs, __LINE__);    \
>>>>           |                                               ^~~~
>>>>     arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:167:17: note: expanded from macro 'fatal_error'
>>>>       166 |                 fprintf(stderr, "error: %s: " fmt "\n",                 \
>>>>           |                                               ~~~
>>>>       167 |                         elf.path, ## __VA_ARGS__);                      \
>>>>           |                                      ^~~~~~~~~~~
>>>>
>>>> Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
>>>
>>> I don't see these warnings. What version of LLVM are you using?
>>>
>>
>> I compiled the kernel on Apple Silicon M3 Pro in macOS 15.0.1, Maybe this is
>> a special scenario that is rarely used.
>>
>> Details of clang:
>>
>>      # clang --version
>>      Homebrew clang version 19.1.1
>>      Target: arm64-apple-darwin24.0.0
>>      Thread model: posix
>>      InstalledDir: /opt/homebrew/Cellar/llvm/19.1.1/bin
> 
> What I have is similar enough:
> 
> ClangBuiltLinux clang version 19.1.1 (https://github.com/llvm/llvm-project.git d401987fe349a87c53fe25829215b080b70c0c1a)
> Target: aarch64-unknown-linux-gnu
> Thread model: posix
> InstalledDir: /home/maz/hot-poop/llvm/llvm-19.1.1-aarch64/bin
> 
> and yet this doesn't fire. Can you try with a compiler actually
> targeting with Linux instead of MacOS?
> 

I downloaded the precompiled version, but it didn't compile
properly, interrupted by other errors, which seemed to be
different from the brew version:

     HOSTCC  scripts/mod/modpost.o
   scripts/mod/modpost.c:16:10: fatal error: 'fnmatch.h' file not found
      16 | #include <fnmatch.h>
         |          ^~~~~~~~~~~
   1 error generated.

Details of clang:

clang version 19.1.1 (/Users/runner/work/llvm-project/llvm-project/clang 
d401987fe349a87c53fe25829215b080b70c0c1a)
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Users/tianjia/sbin/LLVM-19.1.1-macOS-ARM64/bin

There is no verification yet whether this patch issue will be fire.
The clang installed with brew can be compiled normally.

Thanks,
Tianjia


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ