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: <20220516025904.kzwab5babr24ftzw@M910t>
Date:   Mon, 16 May 2022 10:59:04 +0800
From:   Changbin Du <changbin.du@...wei.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
CC:     Changbin Du <changbin.du@...wei.com>,
        Craig Topper <craig.topper@...ive.com>,
        Alex Bradbury <asb@...radbury.org>,
        Albert Ou <aou@...s.berkeley.edu>,
        Palmer Dabbelt <palmer@...belt.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Steven Rostedt <rostedt@...dmis.org>, <hw.huiwang@...wei.com>,
        <linux-kernel@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
        <llvm@...ts.linux.dev>
Subject: Re: riscv: llvm-compiler: calling convention violation: temporary
 register $t2 is used to pass the ninth function parameter

On Fri, May 13, 2022 at 12:39:55PM -0700, Nick Desaulniers wrote:
> On Thu, May 12, 2022 at 8:46 PM Changbin Du <changbin.du@...wei.com> wrote:
> >
> > On Thu, May 12, 2022 at 07:49:41AM -0700, Craig Topper wrote:
> > > Changbin, can you provide a pre-processed source and a command line? I can
> > > reduce it on the llvm side.
> > >
> >
> > hmm, clang can not build the preprocessed source by itself!
> 
> Sorry, I should have provided more info.
> 
> In order to get the preprocessed source, you generally can do:
> 
> $ ARCH=riscv make LLVM=1 -j$(nproc) defconfig lib/string.i
> 
> replace the final command line parameter with the path to the source
> file you care about.
> 
> Then, to get the command line invocation, you can do:
> 
> $ ARCH=riscv make LLVM=1 -j$(nproc) lib/string.o V=1
> 
> Then you can provide the output of those two commands.
> -- 
> Thanks,
> ~Nick Desaulniers

No problem, I know this tricks. Please check attached file, and build it with:
$ /opt/llvm-13.0.0/bin/clang -nostdinc -Qunused-arguments -Wall -Wundef  -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu11 --target=riscv64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mabi=lp64 -mno-relax -march=rv64imac -mno-save-restore -mcmodel=medany -fno-omit-frame-pointer -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-gnu -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-clash-protection -fpatchable-function-entry=8 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-pointer-to-enum-cast -Wno-tautological-constant-out-of-range-compare -g   -c -o route.o route.i

-- 
Cheers,
Changbin Du

View attachment "route.i" of type "text/plain" (4385734 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ