From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH RFC] bpf, x64: allow not-converged images when BPF_JIT_ALWAYS_ON is set
Date: Fri, 13 Nov 2020 20:36:45 +0800 [thread overview]
Message-ID: <202011132033.2LBB8v83-lkp@intel.com> (raw)
In-Reply-To: <20201113083852.22294-1-glin@suse.com>
[-- Attachment #1: Type: text/plain, Size: 8277 bytes --]
Hi Gary,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master ipvs/master v5.10-rc3 next-20201112]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gary-Lin/bpf-x64-allow-not-converged-images-when-BPF_JIT_ALWAYS_ON-is-set/20201113-164003
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-a002-20201113 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e0c35655b6e8186baef8840b26ba4090503b554)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/e491680a9f8f3835010cbcaa58d38382ae94d1e5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gary-Lin/bpf-x64-allow-not-converged-images-when-BPF_JIT_ALWAYS_ON-is-set/20201113-164003
git checkout e491680a9f8f3835010cbcaa58d38382ae94d1e5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/x86/net/bpf_jit_comp.c:1959:5: warning: no previous prototype for function 'arch_prepare_bpf_dispatcher' [-Wmissing-prototypes]
int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, int num_funcs)
^
arch/x86/net/bpf_jit_comp.c:1959:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, int num_funcs)
^
static
>> arch/x86/net/bpf_jit_comp.c:2050:1: warning: unused label 'out_image' [-Wunused-label]
out_image:
^~~~~~~~~~
2 warnings generated.
vim +/out_image +2050 arch/x86/net/bpf_jit_comp.c
e491680a9f8f38 Gary Lin 2020-11-13 1976
d1c55ab5e41fcd Daniel Borkmann 2016-05-13 1977 struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1978 {
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1979 struct bpf_binary_header *header = NULL;
959a7579160349 Daniel Borkmann 2016-05-13 1980 struct bpf_prog *tmp, *orig_prog = prog;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 1981 struct x64_jit_data *jit_data;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1982 int proglen, oldproglen = 0;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1983 struct jit_context ctx = {};
959a7579160349 Daniel Borkmann 2016-05-13 1984 bool tmp_blinded = false;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 1985 bool extra_pass = false;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1986 u8 *image = NULL;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1987 int *addrs;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1988 int pass;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1989 int i;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 1990
60b58afc96c9df Alexei Starovoitov 2017-12-14 1991 if (!prog->jit_requested)
959a7579160349 Daniel Borkmann 2016-05-13 1992 return orig_prog;
959a7579160349 Daniel Borkmann 2016-05-13 1993
959a7579160349 Daniel Borkmann 2016-05-13 1994 tmp = bpf_jit_blind_constants(prog);
a2c7a98301d9f9 Ingo Molnar 2018-04-27 1995 /*
a2c7a98301d9f9 Ingo Molnar 2018-04-27 1996 * If blinding was requested and we failed during blinding,
959a7579160349 Daniel Borkmann 2016-05-13 1997 * we must fall back to the interpreter.
959a7579160349 Daniel Borkmann 2016-05-13 1998 */
959a7579160349 Daniel Borkmann 2016-05-13 1999 if (IS_ERR(tmp))
959a7579160349 Daniel Borkmann 2016-05-13 2000 return orig_prog;
959a7579160349 Daniel Borkmann 2016-05-13 2001 if (tmp != prog) {
959a7579160349 Daniel Borkmann 2016-05-13 2002 tmp_blinded = true;
959a7579160349 Daniel Borkmann 2016-05-13 2003 prog = tmp;
959a7579160349 Daniel Borkmann 2016-05-13 2004 }
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2005
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2006 jit_data = prog->aux->jit_data;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2007 if (!jit_data) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2008 jit_data = kzalloc(sizeof(*jit_data), GFP_KERNEL);
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2009 if (!jit_data) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2010 prog = orig_prog;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2011 goto out;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2012 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2013 prog->aux->jit_data = jit_data;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2014 }
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2015 addrs = jit_data->addrs;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2016 if (addrs) {
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2017 ctx = jit_data->ctx;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2018 oldproglen = jit_data->proglen;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2019 image = jit_data->image;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2020 header = jit_data->header;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2021 extra_pass = true;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2022 goto skip_init_addrs;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2023 }
7c2e988f400e83 Alexei Starovoitov 2019-07-30 2024 addrs = kmalloc_array(prog->len + 1, sizeof(*addrs), GFP_KERNEL);
959a7579160349 Daniel Borkmann 2016-05-13 2025 if (!addrs) {
959a7579160349 Daniel Borkmann 2016-05-13 2026 prog = orig_prog;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2027 goto out_addrs;
959a7579160349 Daniel Borkmann 2016-05-13 2028 }
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2029
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2030 /*
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2031 * Before first pass, make a rough estimation of addrs[]
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2032 * each BPF instruction is translated to less than 64 bytes
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2033 */
7c2e988f400e83 Alexei Starovoitov 2019-07-30 2034 for (proglen = 0, i = 0; i <= prog->len; i++) {
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2035 proglen += 64;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2036 addrs[i] = proglen;
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2037 }
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2038 ctx.cleanup_addr = proglen;
1c2a088a6626d4 Alexei Starovoitov 2017-12-14 2039 skip_init_addrs:
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2040
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2041 /*
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2042 * JITed image shrinks with every pass and the loop iterates
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2043 * until the image stops shrinking. Very large BPF programs
3f7352bf21f8fd Alexei Starovoitov 2015-05-22 2044 * may converge on the last pass. In such case do one more
a2c7a98301d9f9 Ingo Molnar 2018-04-27 2045 * pass to emit the final image.
3f7352bf21f8fd Alexei Starovoitov 2015-05-22 2046 */
e491680a9f8f38 Gary Lin 2020-11-13 2047 for (pass = 0; pass < MAX_JIT_PASSES || image; pass++) {
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2048 proglen = do_jit(prog, addrs, image, oldproglen, &ctx);
f3c2af7ba17a83 Alexei Starovoitov 2014-05-13 2049 if (proglen <= 0) {
3aab8884c9eb99 Daniel Borkmann 2018-05-02 @2050 out_image:
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31289 bytes --]
next prev parent reply other threads:[~2020-11-13 12:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 8:38 [PATCH RFC] bpf, x64: allow not-converged images when BPF_JIT_ALWAYS_ON is set Gary Lin
2020-11-13 12:36 ` kernel test robot [this message]
2020-11-14 1:48 ` Alexei Starovoitov
2020-11-16 6:31 ` Gary Lin
2020-11-24 3:22 ` [bpf, x64] e491680a9f: kernel-selftests.net.test_bpf.sh.fail kernel test robot
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=202011132033.2LBB8v83-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.