2018-06-20 12:36:50

by David Miller

[permalink] [raw]
Subject: [GIT] Networking


1) Fix crash on bpf_prog_load() errors, from Daniel Borkmann.

2) Fix ATM VCC memory accounting, from David Woodhouse.

3) fib6_info objects need RCU freeing, from Eric Dumazet.

4) Fix SO_BINDTODEVICE handling for TCP sockets, from David Ahern.

5) Fix clobbered error code in enic_open() failure path, from
Govindarajulu Varadarajan.

6) Propagate dev_get_valid_name() error returns properly, from
Li RongQing.

7) Fix suspend/resume in davinci_emac driver, from Bartosz
Golaszewski.

8) Various act_ife fixes (recursive locking, IDR leaks, etc.)
from Davide Caratti.

9) Fix buggy checksum handling in sungem driver, from Eric
Dumazet.

Please pull, thanks a lot!

The following changes since commit 35773c93817c5f2df264d013978e7551056a063a:

Merge branch 'afs-proc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (2018-06-16 16:32:04 +0900)

are available in the Git repository at:

[email protected]:/pub/scm/linux/kernel/git/davem/net.git

for you to fetch changes up to 9887cba19978a5f288100ef90a37684cc8d5e0a6:

ip: limit use of gso_size to udp (2018-06-20 14:41:04 +0900)

----------------------------------------------------------------
Alexei Starovoitov (1):
Merge branch 'bpf-fixes'

Anders Roxell (1):
selftests: bpf: config: add config fragments

Arnd Bergmann (1):
ptp: replace getnstimeofday64() with ktime_get_real_ts64()

Bartosz Golaszewski (1):
net: ethernet: fix suspend/resume in davinci_emac

Bhadram Varka (1):
stmmac: fix DMA channel hang in half-duplex mode

Bj?rn T?pel (1):
xsk: re-add queue id check for XDP_SKB path

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

Daniel Lezcano (1):
net/usb/drivers: Remove useless hrtimer_active check

David Ahern (1):
net/tcp: Fix socket lookups with SO_BINDTODEVICE

David S. Miller (4):
Merge git://git.kernel.org/.../bpf/bpf
bluetooth: hci_nokia: Don't include linux/unaligned/le_struct.h directly.
Merge branch 'qed-fixes'
Merge branch 'NCSI-silence-warning-messages'

David Woodhouse (1):
atm: Preserve value of skb->truesize when accounting to vcc

Davide Caratti (2):
net/sched: act_ife: fix recursive lock and idr leak
net/sched: act_ife: preserve the action control in case of error

Dinh Nguyen (1):
net: stmmac: socfpga: add additional ocp reset line for Stratix10

Eric Dumazet (2):
net/ipv6: respect rcu grace period before freeing fib6_info
net: sungem: fix rx checksum support

Govindarajulu Varadarajan (2):
enic: initialize enic->rfs_h.lock in enic_probe
enic: do not overwrite error code

Jakub Kicinski (2):
tools: bpftool: improve accuracy of load time
selftests/bpf: test offloads even with BPF programs present

Jian Wang (1):
bpf, selftest: check tunnel type more accurately

Joel Stanley (4):
net/ncsi: Silence debug messages
net/ncsi: Drop no more channels message
net/ncsi: Use netdev_dbg for debug messages
MAINTAINERS: Add Sam as the maintainer for NCSI

Konstantin Khlebnikov (1):
net_sched: blackhole: tell upper qdisc about dropped packets

Li RongQing (1):
net: propagate dev_get_valid_name return code

Liran Alon (1):
net: net_failover: fix typo in net_failover_slave_register()

Matteo Croce (2):
bpfilter: fix build error
bpfilter: ignore binary files

Stefan Agner (1):
net: hamradio: use eth_broadcast_addr

Sudarsana Reddy Kalluru (3):
qed: Fix possible memory leak in Rx error path handling.
qed: Add sanity check for SIMD fastpath handler.
qed: Do not advertise DCBX_LLD_MANAGED capability.

Toshiaki Makita (1):
xdp: Fix handling of devmap in generic XDP

Willem de Bruijn (1):
ip: limit use of gso_size to udp

William Tu (1):
bpf, selftests: delete xfrm tunnel when test exits.

Xin Long (1):
ipvlan: use ETH_MAX_MTU as max mtu

Yonghong Song (1):
tools/bpftool: fix a bug in bpftool perf

MAINTAINERS | 5 +++++
drivers/bluetooth/hci_nokia.c | 2 +-
drivers/net/ethernet/cisco/enic/enic_clsf.c | 3 +--
drivers/net/ethernet/cisco/enic/enic_main.c | 12 ++++++------
drivers/net/ethernet/faraday/ftgmac100.c | 4 ++--
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 7 +++----
drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 11 ++++-------
drivers/net/ethernet/qlogic/qed/qed_ll2.c | 11 +++++++++--
drivers/net/ethernet/qlogic/qed/qed_main.c | 12 ++++++++++--
drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 18 ++++++++++++++----
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++++++++
drivers/net/ethernet/sun/sungem.c | 22 ++++++++++++----------
drivers/net/ethernet/ti/davinci_emac.c | 15 +++++++++++++--
drivers/net/hamradio/bpqether.c | 8 ++------
drivers/net/ipvlan/ipvlan_main.c | 1 +
drivers/net/net_failover.c | 2 +-
drivers/net/usb/cdc_ncm.c | 3 +--
drivers/ptp/ptp_chardev.c | 4 ++--
drivers/ptp/ptp_qoriq.c | 2 +-
include/linux/atmdev.h | 15 +++++++++++++++
include/linux/bpf.h | 12 ++++++++++++
include/linux/filter.h | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
include/net/ip6_fib.h | 5 +++--
kernel/bpf/core.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
kernel/bpf/devmap.c | 14 ++++++++++++++
kernel/bpf/syscall.c | 12 +++---------
net/atm/br2684.c | 3 +--
net/atm/clip.c | 3 +--
net/atm/common.c | 3 +--
net/atm/lec.c | 3 +--
net/atm/mpc.c | 3 +--
net/atm/pppoatm.c | 3 +--
net/atm/raw.c | 4 ++--
net/bpfilter/.gitignore | 1 +
net/bpfilter/Makefile | 6 ++++--
net/core/dev.c | 4 ++--
net/core/filter.c | 21 ++++-----------------
net/ipv4/inet_hashtables.c | 4 ++--
net/ipv4/ip_output.c | 3 ++-
net/ipv6/inet6_hashtables.c | 4 ++--
net/ipv6/ip6_fib.c | 5 +++--
net/ipv6/ip6_output.c | 3 ++-
net/ncsi/ncsi-aen.c | 10 +++++-----
net/ncsi/ncsi-manage.c | 49 ++++++++++++++++++++++---------------------------
net/sched/act_ife.c | 12 +++++-------
net/sched/sch_blackhole.c | 2 +-
net/xdp/xsk.c | 3 +++
tools/bpf/bpftool/perf.c | 5 +++--
tools/bpf/bpftool/prog.c | 4 +++-
tools/testing/selftests/bpf/config | 10 ++++++++++
tools/testing/selftests/bpf/test_offload.py | 12 ++++++++++--
tools/testing/selftests/bpf/test_tunnel.sh | 26 ++++++++++++++------------
53 files changed, 371 insertions(+), 195 deletions(-)
create mode 100644 net/bpfilter/.gitignore


2018-06-21 08:46:14

by Ingo Molnar

[permalink] [raw]
Subject: Re: [GIT] Networking


* David Miller <[email protected]> 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

2018-06-21 13:43:14

by Matteo Croce

[permalink] [raw]
Subject: Re: [GIT] Networking

On Thu, Jun 21, 2018 at 8:46 AM Ingo Molnar <[email protected]> wrote:
>
>
> * David Miller <[email protected]> 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

2018-06-21 13:47:48

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [GIT] Networking

Hi Matteo,

On Thu, 21 Jun 2018 13:40:43 +0000 Matteo Croce <[email protected]> wrote:
>
> On Thu, Jun 21, 2018 at 8:46 AM Ingo Molnar <[email protected]> wrote:
> >
> > * David Miller <[email protected]> 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?
>
> 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?

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).
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-06-21 16:34:42

by Ingo Molnar

[permalink] [raw]
Subject: Re: [GIT] Networking


* Matteo Croce <[email protected]> wrote:

> Hi Ingo,
>
> are you compiling a 32 bit kernel on an x86_64 host?

Yes.

> 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

Correct.

> Any idea how to fix it without building it twice, for host and target?

No idea, sorry ...

Thanks,

Ingo