From: Xin Liu <liuxin350@huawei.com>
To: <ast@kernel.org>, <daniel@iogearbox.net>, <andrii@kernel.org>,
<martin.lau@linux.dev>, <song@kernel.org>, <yhs@fb.com>,
<john.fastabend@gmail.com>, <kpsingh@kernel.org>,
<sdf@google.com>, <haoluo@google.com>, <jolsa@kernel.org>
Cc: <bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<yanan@huawei.com>, <wuchangye@huawei.com>,
<xiesongyang@huawei.com>, <zhudi2@huawei.com>,
<kongweibin2@huawei.com>, <liuxin350@huawei.com>
Subject: [PATCH 2/2] bpftool: add fPIE option for bpftool
Date: Sat, 24 Sep 2022 18:12:09 +0800 [thread overview]
Message-ID: <20220924101209.50653-3-liuxin350@huawei.com> (raw)
In-Reply-To: <20220924101209.50653-1-liuxin350@huawei.com>
Use the fPIE option to compile bpftool to improve bpftool security.
Signed-off-by: Xin Liu <liuxin350@huawei.com>
---
tools/bpf/bpftool/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 4a95c017ad4c..d1cd21214388 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -72,6 +72,7 @@ bash_compdir ?= /usr/share/bash-completion/completions
CFLAGS += -O2
CFLAGS += -W -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
+CFLAGS += -pie -fPIE
CFLAGS += $(filter-out -Wswitch-enum -Wnested-externs,$(EXTRA_WARNINGS))
CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \
-I$(or $(OUTPUT),.) \
--
2.33.0
prev parent reply other threads:[~2022-09-24 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-24 10:12 [PATCH 0/2] ebpf: improves bpftool security Xin Liu
2022-09-24 10:12 ` [PATCH 1/2] libbpf: add fPIC option for static library Xin Liu
2022-09-27 10:21 ` Quentin Monnet
2022-09-28 8:32 ` Xin Liu
2022-09-28 22:59 ` Andrii Nakryiko
2022-09-30 2:16 ` John Fastabend
2022-09-24 10:12 ` Xin Liu [this message]
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=20220924101209.50653-3-liuxin350@huawei.com \
--to=liuxin350@huawei.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kongweibin2@huawei.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=wuchangye@huawei.com \
--cc=xiesongyang@huawei.com \
--cc=yanan@huawei.com \
--cc=yhs@fb.com \
--cc=zhudi2@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.