Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2067334imm; Thu, 21 Jun 2018 06:47:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKpPg72EQfGH6ISETgQoVV0K6+v9MElce0QBL6Ki8geYW/AImy60sx9l5daTAxxkyI66lxv X-Received: by 2002:a62:dc1c:: with SMTP id t28-v6mr27483129pfg.137.1529588868276; Thu, 21 Jun 2018 06:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529588868; cv=none; d=google.com; s=arc-20160816; b=MmIcfEP4CK+kNWtUJ80qcP5wJ1/W6HbI5DF8rQM/CjLMqABM8FLuH6E78u1+vb9FgT wUs7cmMUvJFX5jSlLhxMdtuX1Mpq8+n9/4CvByNmxICnG6hvS9WBDDSWqT4Gfq6D15oQ gDw57Sdqca92EZgfeiUJvN1U9DW6ASA7rlzGhON8kO+ChbH3lZT9MCaIDSAAkkdpa+ek tE303DDrpcKndHOYJH99vxPHEyZ0uk+7g0N3Mu7zao6feKKmIY9ckZntHMvPe01f1kPg NKuwMzvMTX+NhVA+vZGoOIooAaquAnfg70AFz/Z+VDMQ5te9A/khzPoLZE+D4rEsNyK2 4U4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=opEAPqCRZraK1F+FTGNvPGOwdWd+t5XrrvIaa6Ki3So=; b=wvD8FGkA1wEgGaFgvHHCFUsR0dJcB1HUFf1UejVlDZWh6aEY7/gRlmsQjMIe8Xqesq KGjdzAYqmk3RGdAIU7fdOSRUytEfAhjQBcvbSTXjU9svL8L/cr8TjeBGpnZWWhn2HmdL ZUXWrgMMp9RjI07XbxsLECFtL+xTkvD/Zv7wvNeFH4QmCi2Gi6XJ3L9yb+JlEf9wWDnV eO0EAQ0la9l5IwqY3P1eO4gWKsutGOqOfadQqCXi8iaS7Sg5dayFyuW+rrU9bFeiWKKl cdVFO4I3BjGjq7+FhAkSD1IcoDOFC9pq/PHEMRNZ80wFbSlAdY0f1ywNsLi0lHbypffE 2A7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=pTiU18K5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18-v6si3968963pge.66.2018.06.21.06.47.33; Thu, 21 Jun 2018 06:47:48 -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; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=pTiU18K5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933323AbeFUNqx (ORCPT + 99 others); Thu, 21 Jun 2018 09:46:53 -0400 Received: from ozlabs.org ([203.11.71.1]:38501 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933219AbeFUNqu (ORCPT ); Thu, 21 Jun 2018 09:46:50 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 41BNKM4kgBz9s19; Thu, 21 Jun 2018 23:46:47 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1529588808; bh=TbTl3SSzyWBcrHng5jFVCNv5aZ3aeKO9eCcxeSxRS+o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pTiU18K5byUrEXzVlVBDP2zYXAXje8uixCkl+tgz5k6kK283BTnOQqjpIOklYWwzw W7lnv2GA/sN8nUggJRxJ61Szmb2vCphPknRc7fkZFPLmBBu1A5X/LoddHbCFCUZKTu +gAyBg+bwLlqChCOX0hq74Z8lBwKGb9+0Tvql5RWUNpxqJvVxKFlTSMMBNmJ0VxnX7 undLL1Oh3lsB+iMturyNupgZe+wGXmawv2U05buDh54s2AFavXV5U7QejufI9i0sUs VRY1r+ZMMN7Kr++nJCVQFfXvklzCHkbQReKclEptGG+04u5ttXpbTjTeF5F3kzwZil ZJW7AsVym7/tA== Date: Thu, 21 Jun 2018 23:46:46 +1000 From: Stephen Rothwell To: Matteo Croce Cc: mingo@kernel.org, "David S . Miller" , alexei.starovoitov@gmail.com, torvalds@linux-foundation.org, akpm@linux-foundation.org, netdev , linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: Re: [GIT] Networking Message-ID: <20180621234646.3aed20b9@canb.auug.org.au> In-Reply-To: References: <20180620.213540.214945910722071226.davem@davemloft.net> <20180621084510.GA22870@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/xv6CjjNrjE7bD6EFJGZCKU1"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/xv6CjjNrjE7bD6EFJGZCKU1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Matteo, On Thu, 21 Jun 2018 13:40:43 +0000 Matteo Croce wrote: > > On Thu, Jun 21, 2018 at 8:46 AM Ingo Molnar wrote: > > > > * David Miller wrote: > > =20 > > > 1) Fix crash on bpf_prog_load() errors, from Daniel Borkmann. =20 > > =20 > > > 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 =20 > > > > JFYI, I'm still seeing this BPF build error upstream, on a 32-bit allye= sconfig 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: > > =20 > > > Subject: linux-next: build failure after merge of the net-next tree > > > > > > ... > > > > > > x86_64-linux-ld: unknown architecture of input file `net/bpfilter/bpf= ilter_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. =20 > > > > Is there a fix I could try? >=20 > 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: >=20 > $ 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 >=20 > then I tried to compile an i386 kernel on an x86_64 host and I get the > same error: >=20 > $ make -j8 ARCH=3Di386 > ... > 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 >=20 > the problem seems to be that bpfilter_umh is compiled with host flags, > and so it's a 64 bit binary in my case: >=20 > gcc -static -o net/bpfilter/bpfilter_umh net/bpfilter/main.o > objcopy -I binary `LC_ALL=3DC objdump -f net/bpfilter/bpfilter_umh |awk > -F' |,' '/file format/{print "-O",$NF} /^architecture:/{print > "-B",$2}'` --rename-section .data=3D.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 >=20 > Any idea how to fix it without building it twice, for host and target? This presumably has the same root cause that means I can't build a big endian PowerPC version on a little endian host ... Either I have to have CONFIG_BPFILTER turned off (or maybe just CONFIG_BPFILTER_UMH) or build with a compiler that cannot link user mode programs (which effectively does the same). --=20 Cheers, Stephen Rothwell --Sig_/xv6CjjNrjE7bD6EFJGZCKU1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAlsrrEYACgkQAVBC80lX 0GzjQQf9F/JrmeUq3TMYazH9gCuP27sSvCKKVXegO7ryCef/zEH7Vk+DOsi2IMYD jfu57WtRSoH/QStFIq3UG2x2V8uhIgjyrXTukHQEsjYW0bwZdLeBMldBH7dCdOMk 8x+9TFZQ9Ya37JeQfF3AG7++7Cob0n/74V8fzNdC7UEMd9sSmCZfhVGDpvUb7q3U wwZt5qvCmd2hueHLBzOrKORG1dSu1DBX/0yNyhdpC65LF2+XCLwUMwkdKWF5ODxE OjqT7wqVmoE1QwgexJxdhItAbbGfHbxZD5jJVokJg2W49+U+4Y++YEIRuBnF+2Vh OTP3ZbzdrWaTWajoLT0r4UV9b/DKYw== =Qfuh -----END PGP SIGNATURE----- --Sig_/xv6CjjNrjE7bD6EFJGZCKU1--