* [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking
@ 2022-03-07 13:30 KP Singh
2022-03-07 13:30 ` [PATCH bpf-next 2/2] bpf/docs: Update list of architectures supported KP Singh
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: KP Singh @ 2022-03-07 13:30 UTC (permalink / raw)
To: bpf; +Cc: Geyslan G. Bem, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko
Dynamic linking when compiling on the host can cause issues when the
libc version does not match the one in the VM image. Update the
docs to explain how to do this.
Before:
./vmtest.sh -- ./test_progs -t test_ima
./test_progs: /usr/lib/libc.so.6: version `GLIBC_2.33' not found (required by ./test_progs)
After:
LDLIBS=-static ./vmtest.sh -- ./test_progs -t test_ima
test_ima:OK
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
Reported-by: "Geyslan G. Bem" <geyslan@gmail.com>
Signed-off-by: KP Singh <kpsingh@kernel.org>
---
tools/testing/selftests/bpf/README.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/bpf/README.rst b/tools/testing/selftests/bpf/README.rst
index d099d91adc3b..f7fa74448492 100644
--- a/tools/testing/selftests/bpf/README.rst
+++ b/tools/testing/selftests/bpf/README.rst
@@ -32,6 +32,14 @@ For more information on about using the script, run:
$ tools/testing/selftests/bpf/vmtest.sh -h
+Incase of linker errors when running selftests, try using static linking:
+
+.. code-block:: console
+
+ $ LDLIBS=-static vmtest.sh
+
+.. note:: Some distros may not support static linking.
+
.. note:: The script uses pahole and clang based on host environment setting.
If you want to change pahole and llvm, you can change `PATH` environment
variable in the beginning of script.
--
2.35.1.616.g0bdcbb4464-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH bpf-next 2/2] bpf/docs: Update list of architectures supported.
2022-03-07 13:30 [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking KP Singh
@ 2022-03-07 13:30 ` KP Singh
2022-03-08 6:28 ` [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking Andrii Nakryiko
2022-03-08 6:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: KP Singh @ 2022-03-07 13:30 UTC (permalink / raw)
To: bpf; +Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
vmtest.sh also supports s390x now.
Signed-off-by: KP Singh <kpsingh@kernel.org>
---
tools/testing/selftests/bpf/README.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/README.rst b/tools/testing/selftests/bpf/README.rst
index f7fa74448492..54410ef3fc1c 100644
--- a/tools/testing/selftests/bpf/README.rst
+++ b/tools/testing/selftests/bpf/README.rst
@@ -44,7 +44,7 @@ Incase of linker errors when running selftests, try using static linking:
If you want to change pahole and llvm, you can change `PATH` environment
variable in the beginning of script.
-.. note:: The script currently only supports x86_64.
+.. note:: The script currently only supports x86_64 and s390x architectures.
Additional information about selftest failures are
documented here.
--
2.35.1.616.g0bdcbb4464-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking
2022-03-07 13:30 [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking KP Singh
2022-03-07 13:30 ` [PATCH bpf-next 2/2] bpf/docs: Update list of architectures supported KP Singh
@ 2022-03-08 6:28 ` Andrii Nakryiko
2022-03-08 6:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Andrii Nakryiko @ 2022-03-08 6:28 UTC (permalink / raw)
To: KP Singh
Cc: bpf, Geyslan G. Bem, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko
On Mon, Mar 7, 2022 at 5:30 AM KP Singh <kpsingh@kernel.org> wrote:
>
> Dynamic linking when compiling on the host can cause issues when the
> libc version does not match the one in the VM image. Update the
> docs to explain how to do this.
>
> Before:
> ./vmtest.sh -- ./test_progs -t test_ima
> ./test_progs: /usr/lib/libc.so.6: version `GLIBC_2.33' not found (required by ./test_progs)
>
> After:
>
> LDLIBS=-static ./vmtest.sh -- ./test_progs -t test_ima
> test_ima:OK
> Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
>
> Reported-by: "Geyslan G. Bem" <geyslan@gmail.com>
> Signed-off-by: KP Singh <kpsingh@kernel.org>
> ---
> tools/testing/selftests/bpf/README.rst | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/README.rst b/tools/testing/selftests/bpf/README.rst
> index d099d91adc3b..f7fa74448492 100644
> --- a/tools/testing/selftests/bpf/README.rst
> +++ b/tools/testing/selftests/bpf/README.rst
> @@ -32,6 +32,14 @@ For more information on about using the script, run:
>
> $ tools/testing/selftests/bpf/vmtest.sh -h
>
> +Incase of linker errors when running selftests, try using static linking:
fixed typo here and pushed to bpf-next.
It would still be good to fix the use of LDFLAGS, of course ;)
> +
> +.. code-block:: console
> +
> + $ LDLIBS=-static vmtest.sh
> +
> +.. note:: Some distros may not support static linking.
> +
> .. note:: The script uses pahole and clang based on host environment setting.
> If you want to change pahole and llvm, you can change `PATH` environment
> variable in the beginning of script.
> --
> 2.35.1.616.g0bdcbb4464-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking
2022-03-07 13:30 [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking KP Singh
2022-03-07 13:30 ` [PATCH bpf-next 2/2] bpf/docs: Update list of architectures supported KP Singh
2022-03-08 6:28 ` [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking Andrii Nakryiko
@ 2022-03-08 6:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-08 6:30 UTC (permalink / raw)
To: KP Singh; +Cc: bpf, geyslan, ast, daniel, andrii
Hello:
This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Mon, 7 Mar 2022 13:30:47 +0000 you wrote:
> Dynamic linking when compiling on the host can cause issues when the
> libc version does not match the one in the VM image. Update the
> docs to explain how to do this.
>
> Before:
> ./vmtest.sh -- ./test_progs -t test_ima
> ./test_progs: /usr/lib/libc.so.6: version `GLIBC_2.33' not found (required by ./test_progs)
>
> [...]
Here is the summary with links:
- [bpf-next,1/2] bpf/docs: Update vmtest docs for static linking
https://git.kernel.org/bpf/bpf-next/c/5ad0a415da6b
- [bpf-next,2/2] bpf/docs: Update list of architectures supported.
https://git.kernel.org/bpf/bpf-next/c/e878ae2d1df5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-08 6:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 13:30 [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking KP Singh
2022-03-07 13:30 ` [PATCH bpf-next 2/2] bpf/docs: Update list of architectures supported KP Singh
2022-03-08 6:28 ` [PATCH bpf-next 1/2] bpf/docs: Update vmtest docs for static linking Andrii Nakryiko
2022-03-08 6:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).