From: John Fastabend <john.fastabend@gmail.com>
To: Tony Ambardar <tony.ambardar@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>
Cc: Tony Ambardar <Tony.Ambardar@gmail.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-arch@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: RE: [PATCH bpf v1 2/3] bpf: prevent .BTF section elimination
Date: Mon, 21 Sep 2020 08:45:32 -0700 [thread overview]
Message-ID: <5f68ca9c9302a_17370208f9@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <a635b5d3e2da044e7b51ec1315e8910fbce0083f.1600417359.git.Tony.Ambardar@gmail.com>
Tony Ambardar wrote:
> Systems with memory or disk constraints often reduce the kernel footprint
> by configuring LD_DEAD_CODE_DATA_ELIMINATION. However, this can result in
> removal of any BTF information.
>
> Use the KEEP() macro to preserve the BTF data as done with other important
> sections, while still allowing for smaller kernels.
>
> Fixes: 90ceddcb4950 ("bpf: Support llvm-objcopy for vmlinux BTF")
>
> Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
> ---
> include/asm-generic/vmlinux.lds.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 5430febd34be..7636bc71c71f 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -661,7 +661,7 @@
> #define BTF \
> .BTF : AT(ADDR(.BTF) - LOAD_OFFSET) { \
> __start_BTF = .; \
> - *(.BTF) \
> + KEEP(*(.BTF)) \
> __stop_BTF = .; \
> } \
> . = ALIGN(4); \
> --
> 2.25.1
>
Acked-by: John Fastabend <john.fastabend@gmail.com>
next prev parent reply other threads:[~2020-09-21 15:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 5:01 [PATCH bpf v1 0/3] fix BTF usage on embedded systems Tony Ambardar
2020-09-20 5:01 ` [PATCH bpf v1 1/3] bpf: fix sysfs export of empty BTF section Tony Ambardar
2020-09-21 15:44 ` John Fastabend
2020-09-21 19:21 ` Andrii Nakryiko
2020-09-20 5:01 ` [PATCH bpf v1 2/3] bpf: prevent .BTF section elimination Tony Ambardar
2020-09-21 15:45 ` John Fastabend [this message]
2020-09-20 5:01 ` [PATCH bpf v1 3/3] libbpf: fix native endian assumption when parsing BTF Tony Ambardar
2020-09-21 15:46 ` John Fastabend
2020-09-21 19:24 ` [PATCH bpf v1 0/3] fix BTF usage on embedded systems Andrii Nakryiko
2020-09-21 20:52 ` Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f68ca9c9302a_17370208f9@john-XPS-13-9370.notmuch \
--to=john.fastabend@gmail.com \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=linux-arch@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tony.ambardar@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox