-
Notifications
You must be signed in to change notification settings - Fork 1
Dev/alex/cfi tests #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
With a bunch of dirty workarounds Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
| RUN cd xfstests-dev && make CC=riscv64-linux-gnu-gcc LD=riscv64-linux-gnu-ld PKG_LIB_DIR=/build/xfstests install | ||
| RUN cd xfstests-dev && make CC=riscv64-linux-gnu-gcc LD=riscv64-linux-gnu-ld PKG_LIB_DIR=/build/xfstests install | ||
| RUN cd /build && tar --transform "s/build/\/opt/" -cJvf xfstests.tar.xz /build/xfstests | ||
| # FIXME python3:riscv64 overwrites host python3... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need the python3 risc-v binary on the host?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a dependency of xfsprogs, needed to compile xfstests
| # cfi | ||
| # We need a cfi enabled toolchain, so let's build it | ||
| # Build fails for now, so instead use an already built toolchain un /build | ||
| # from here https://gitlab.ba.rivosinc.com/api/v4/projects/704/packages/generic/cfi_toolchain/sept2024/cfi_sept2024.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this.
| RUN mkdir -p /build/cfi | ||
| COPY tests/cfi/main.c /build/cfi | ||
| WORKDIR /build/cfi | ||
| RUN riscv64-linux-gnu-gcc main.c -o not_cfi_compiled_should_fail -static |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang nightly has support:
$ clang-21 -target riscv64 --print-supported-extensions|grep -i cfi
Ubuntu clang version 21.0.0 (++20250418083736+1db03cab70fd-1~exp1~20250418083753.380)
Target: riscv64
Thread model: posix
InstalledDir: /usr/lib/llvm-21/bin
zicfilp 1.0 'Zicfilp' (Landing pad)
zicfiss 1.0 'Zicfiss' (Shadow stack)
Maybe start with that instead?
No description provided.