lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Nov 2019 15:27:12 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Björn Töpel <bjorn.topel@...il.com>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org, ast@...nel.org,
        daniel@...earbox.net,
        Björn Töpel <bjorn.topel@...el.com>,
        bpf@...r.kernel.org, magnus.karlsson@...il.com,
        magnus.karlsson@...el.com, jonathan.lemon@...il.com,
        ecree@...arflare.com, thoiland@...hat.com,
        andrii.nakryiko@...il.com
Subject: Re: [PATCH bpf-next 1/3] bpf: introduce BPF dispatcher

Hi "Björn,

I love your patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on next-20191120]
[cannot apply to v5.4-rc8]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Bj-rn-T-pel/Introduce-xdp_call-h-and-the-BPF-dispatcher/20191120-074435
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: i386-randconfig-g003-20191121 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   kernel/bpf/dispatcher.c: In function 'bpf_dispatcher_update':
>> kernel/bpf/dispatcher.c:144:31: error: 'BPF_MOD_JUMP_TO_NOP' undeclared (first use in this function); did you mean 'BPF_MOD_CALL_TO_NOP'?
      bpf_arch_text_poke(d->func, BPF_MOD_JUMP_TO_NOP,
                                  ^~~~~~~~~~~~~~~~~~~
                                  BPF_MOD_CALL_TO_NOP
   kernel/bpf/dispatcher.c:144:31: note: each undeclared identifier is reported only once for each function it appears in
>> kernel/bpf/dispatcher.c:151:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       *ipsp++ = (s64)d->progs[i]->bpf_func;
                 ^
>> kernel/bpf/dispatcher.c:159:37: error: 'BPF_MOD_JUMP_TO_JUMP' undeclared (first use in this function); did you mean 'BPF_MOD_JUMP_TO_NOP'?
      err = bpf_arch_text_poke(d->func, BPF_MOD_JUMP_TO_JUMP,
                                        ^~~~~~~~~~~~~~~~~~~~
                                        BPF_MOD_JUMP_TO_NOP
>> kernel/bpf/dispatcher.c:163:37: error: 'BPF_MOD_NOP_TO_JUMP' undeclared (first use in this function); did you mean 'BPF_MOD_JUMP_TO_JUMP'?
      err = bpf_arch_text_poke(d->func, BPF_MOD_NOP_TO_JUMP,
                                        ^~~~~~~~~~~~~~~~~~~
                                        BPF_MOD_JUMP_TO_JUMP

vim +144 kernel/bpf/dispatcher.c

   135	
   136	static void bpf_dispatcher_update(struct bpf_dispatcher *d)
   137	{
   138		void *old_image = d->image + ((d->selector + 1) & 1) * PAGE_SIZE / 2;
   139		void *new_image = d->image + (d->selector & 1) * PAGE_SIZE / 2;
   140		s64 ips[BPF_DISPATCHER_MAX] = {}, *ipsp = &ips[0];
   141		int i, err;
   142	
   143		if (!d->num_progs) {
 > 144			bpf_arch_text_poke(d->func, BPF_MOD_JUMP_TO_NOP,
   145					   old_image, NULL);
   146			return;
   147		}
   148	
   149		for (i = 0; i < BPF_DISPATCHER_MAX; i++) {
   150			if (d->progs[i])
 > 151				*ipsp++ = (s64)d->progs[i]->bpf_func;
   152		}
   153		err = arch_prepare_bpf_dispatcher(new_image, &ips[0], d->num_progs);
   154		if (err)
   155			return;
   156	
   157		if (d->selector) {
   158			/* progs already running at this address */
 > 159			err = bpf_arch_text_poke(d->func, BPF_MOD_JUMP_TO_JUMP,
   160						 old_image, new_image);
   161		} else {
   162			/* first time registering */
 > 163			err = bpf_arch_text_poke(d->func, BPF_MOD_NOP_TO_JUMP,
   164						 NULL, new_image);
   165		}
   166		if (err)
   167			return;
   168		d->selector++;
   169	}
   170	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (35785 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ