Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2062260imm; Thu, 21 Jun 2018 06:43:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIOs2CVCKLIHw+FYMET3EdK0UOuifFNoB1l5URxLlOfDnvQ2LPkpPJ4xCfjQpRCv0zr/2F3 X-Received: by 2002:a63:b812:: with SMTP id p18-v6mr23243440pge.11.1529588594234; Thu, 21 Jun 2018 06:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529588594; cv=none; d=google.com; s=arc-20160816; b=BNfxP6hDmxQn8J0Zx2lZBjkqwRW9s8I4Gfyk4j4YpGQoxi6zlFq9z0KdOGCyKcvxOv GsIE+vNQrSY/mbCtzlKDQVBkZ4t2uGDb0W5nqGmdpV08cwsOF0tG4V1EB3KV46ZJtBfZ 3KIDCGpVp4acjih/a8+X33oH2h7bd/ZYT5LTQrZ2CesIFdl5ckPiW/BgN2Dqi+moL517 O2NmIrRtp086Zea9QX6WJsVsXg86IkRlyAE9jYjmRllvfOlA5dxpu1bp7C39mMenF/7v PpriNxEkScWrEy44p5IiKi9eVfHIYWMpkD6OE0f9DQ3skrvgEQc7cq0TDbDMI7nv0v6+ 2hNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=/E6pIjXYo0X7FrBgWrDJ1hiO9AfD9QApx8/CmEai3Tk=; b=Br1mhttFBFCVOceBqC32VEoL6wjt6qS11KnuKdaeznDKhkfeV62Ywk0fq8or4gsIMw Yp/q3HeMB7CwC3oKKrSlsVIk6oQWDvOTT/n8Fc11HGcpqdvnGwCpqpdYNzpoyN1AlDum MNRWq3duI15TBQpfQAsRfeaZUklzhWuMtlt53fUafYkIN1stC1FE6ep67dO5l+mGtPhH RvHUww7SyJPHF5TgW1eVylZ2dE9E2rECn+7CUeUseXxS4ZhPa28O0NY8WEqQ3VHWKMSe PeuEo6N3N1HsuDekivRTUX+HsH0Q4s1aA/rVzokymMQZBSh2N2NFF0jj5AGjb0fg1FwS y+6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t80-v6si4760672pfe.59.2018.06.21.06.42.59; Thu, 21 Jun 2018 06:43:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933383AbeFUNlW (ORCPT + 99 others); Thu, 21 Jun 2018 09:41:22 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:41683 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932918AbeFUNlU (ORCPT ); Thu, 21 Jun 2018 09:41:20 -0400 Received: by mail-lj1-f194.google.com with SMTP id v12-v6so269018ljj.8 for ; Thu, 21 Jun 2018 06:41:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/E6pIjXYo0X7FrBgWrDJ1hiO9AfD9QApx8/CmEai3Tk=; b=JNyww6y1ewoDCWqprip645Tehv+PDT3qeWwIhOG1HUnxc20zpu+/Px0ydowJbZ09Up TYWQzfJO7xtrJB3C0j6DE4wbRajRcI8OAXXM4ouvgDfyxdWqdyisKQ5vjg83qMCYZoJi NCYn2a27TR+AK4o84Zqcr+tzkQAWVuNxwaqDVVXTePURfal6WjQ2VQRFF/3LjO/tBx+M 7DAAlLH7wvSrhO1Nlu/+Nm+Rt35ZLJaj8laTeZyQJvxnq7cDnxfsnX3btfVONnLGoQEw 9mfTE4clAbJ622eMQIyRqwWu/baULqTH1B9tXLoKWSiDCPPyM8Ebc1qx8dduve1tOZ+Y HZPQ== X-Gm-Message-State: APt69E2b86oAPScyEti5oXkq18k0/SU4A89bTiq1VTAbWFaJPBmIFe3R gnl34GYOg6Le/8HZHATCy3YKkArMei7iQUcT+ThV50ZEerU= X-Received: by 2002:a2e:4189:: with SMTP id d9-v6mr16626375ljf.36.1529588479489; Thu, 21 Jun 2018 06:41:19 -0700 (PDT) MIME-Version: 1.0 References: <20180620.213540.214945910722071226.davem@davemloft.net> <20180621084510.GA22870@gmail.com> In-Reply-To: <20180621084510.GA22870@gmail.com> From: Matteo Croce Date: Thu, 21 Jun 2018 13:40:43 +0000 Message-ID: Subject: Re: [GIT] Networking To: mingo@kernel.org Cc: "David S . Miller" , alexei.starovoitov@gmail.com, sfr@canb.auug.org.au, torvalds@linux-foundation.org, akpm@linux-foundation.org, netdev , linux-kernel@vger.kernel.org, tglx@linutronix.de Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 21, 2018 at 8:46 AM Ingo Molnar wrote: > > > * David Miller wrote: > > > 1) Fix crash on bpf_prog_load() errors, from Daniel Borkmann. > > > Daniel Borkmann (4): > > Merge branch 'bpf-misc-fixes' > > bpf: fix panic in prog load calls cleanup > > bpf: reject any prog that failed read-only lock > > bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize > > JFYI, I'm still seeing this BPF build error upstream, on a 32-bit allyesconfig I'm > getting: > > LD vmlinux.o > ld: i386:x86-64 architecture of input file `net/bpfilter/bpfilter_umh.o' is incompatible with i386 output > Makefile:1010: recipe for target 'vmlinux' failed > make: *** [vmlinux] Error 1 > > A similar looking build bug was reported by sfr three weeks ago: > > > Subject: linux-next: build failure after merge of the net-next tree > > > > ... > > > > x86_64-linux-ld: unknown architecture of input file `net/bpfilter/bpfilter_umh.o' > > is incompatible with i386:x86-64 output > > > > Caused by commit > > > > d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") > > > > In my builds, the host is PowerPC 64 LE ... > > > > I have reverted that commit along with > > > > 61a552eb487f ("bpfilter: fix build dependency") > > 13405468f49d ("bpfilter: don't pass O_CREAT when opening console for debug") > > > > for today. > > Is there a fix I could try? > > Thanks, > > Ingo Hi Ingo, are you compiling a 32 bit kernel on an x86_64 host? I tried to compile an i386 bit kernel on an i386 host and I have no issue, running objdump by hand produces correct output: $ uname -a Linux debian32 4.16.0-2-686-pae #1 SMP Debian 4.16.16-1 (2018-06-19) i686 GNU/Linux $ objdump -f net/bpfilter/bpfilter_umh |awk -F' |,' '/file format/{print "-O",$NF} /^architecture:/{print "-B",$2}' -O elf32-i386 -B i386 then I tried to compile an i386 kernel on an x86_64 host and I get the same error: $ make -j8 ARCH=i386 ... LD vmlinux.o ld: i386:x86-64 architecture of input file `net/bpfilter/bpfilter_umh.o' is incompatible with i386 output make: *** [Makefile:1015: vmlinux] Error 1 the problem seems to be that bpfilter_umh is compiled with host flags, and so it's a 64 bit binary in my case: gcc -static -o net/bpfilter/bpfilter_umh net/bpfilter/main.o objcopy -I binary `LC_ALL=C objdump -f net/bpfilter/bpfilter_umh |awk -F' |,' '/file format/{print "-O",$NF} /^architecture:/{print "-B",$2}'` --rename-section .data=.init.rodata net/bpfilter/bpfilter_umh net/bpfilter/bpfilter_umh.o ld -m elf_i386 -r -o vmlinux.o --whole-archive built-in.a --no-whole-archive --start-group lib/lib.a arch/x86/lib/lib.a --end-group ld: i386:x86-64 architecture of input file `net/bpfilter/bpfilter_umh.o' is incompatible with i386 output Any idea how to fix it without building it twice, for host and target? -- Matteo Croce per aspera ad upstream