Received: by 10.192.165.156 with SMTP id m28csp402235imm; Mon, 16 Apr 2018 02:05:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+3LDy/nRKUvfG3OZUVgcTwleMC4d32rxLe0n7hqhA+tiqyd1084LRjOVwaOyfqmq60UzAV X-Received: by 2002:a17:902:7249:: with SMTP id c9-v6mr14669349pll.217.1523869552585; Mon, 16 Apr 2018 02:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523869552; cv=none; d=google.com; s=arc-20160816; b=G19NTfE8okzF/jJ2vzxyN6syWL8zMf08lJn49YvbuVcUg1ZIh/UQzbdcPUz+eLEnjL c73LeKucmi0sO2d33MuDejh1fwh/5JWwDUpTsTlWUVXL5D24cyPswPeqJ0bBBcgVpV94 fbDZfH9drdjRGxJngqVgROwVEvBemfJzDo4d3Rqrbm3dAHIEJBPa79UMe7fXa9h3dOMg WeY9JkNy6SS6DkRZRKUOZqdcLZ4iNY9SfGmc7jzstFOLgklyByOXWxInFllpyWdRN0kx tTmuq9Ue0gpxGos9nDxgblyBX8wzeUo6uIGQkBc3n12GXXWkbH/5OPyISwlihGSS0tEM B5Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=sAtn6YoQih9nmXdvHCYAaNnMhjbe9i5PEi6pCUXALaE=; b=a6gabuz/absVe8MFUmlD8RUbpnvCZv+/33meiyluAml7BYwPPbu9EpIly/4yFqcGlK Y+fxpRBf46T6IuqY5izqJQBY/m9SzlHvMCqmgsPjYeiGR8dtLV9CBkoBJfDNYKE+v3oR 2VaHqUy3kfCju589e8mBptLkXUU6tCj/DK5GxxFXBan7uZob9IsZ1ro4J/7RSXggYLUk 5G0vRzqwR6qJV0u4ngIstNVgtmkMAgKXtswCL0rYdS4rqg6fHf7AXwlrf23C/SIfg90T x04/3KcFvaThL78oRAJfgi025/7zH1DdzfFtj94aXR91kIbnl9I+Q6MWDGvd4QiLa+Sc pdQg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19-v6si10640760pli.600.2018.04.16.02.05.38; Mon, 16 Apr 2018 02:05:52 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754240AbeDPJEU (ORCPT + 99 others); Mon, 16 Apr 2018 05:04:20 -0400 Received: from www62.your-server.de ([213.133.104.62]:55766 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753541AbeDPJES (ORCPT ); Mon, 16 Apr 2018 05:04:18 -0400 Received: from [85.7.107.67] (helo=linux.home) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1f803Y-0000il-BP; Mon, 16 Apr 2018 11:04:12 +0200 Subject: Re: linux-next: build failure after merge of the bpf tree To: Stephen Rothwell , Alexei Starovoitov , Networking Cc: Linux-Next Mailing List , Linux Kernel Mailing List , John Fastabend References: <20180416123000.30fd8a04@canb.auug.org.au> From: Daniel Borkmann Message-ID: Date: Mon, 16 Apr 2018 11:04:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180416123000.30fd8a04@canb.auug.org.au> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.99.3/24484/Mon Apr 16 06:20:38 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen, hi John, On 04/16/2018 04:30 AM, Stephen Rothwell wrote: > Hi all, > > After merging the bpf tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > kernel/bpf/core.o: In function `sock_map_release': > core.c:(.text+0xd04): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > kernel/events/core.o: In function `sock_map_release': > core.c:(.text+0x85cc): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > block/blk-core.o: In function `sock_map_release': > blk-core.c:(.text+0x58e8): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > drivers/net/virtio_net.o: In function `sock_map_release': > virtio_net.c:(.text+0x53ec): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > net/core/dev.o: In function `sock_map_release': > dev.c:(.text+0x6c68): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > net/core/rtnetlink.o: In function `sock_map_release': > rtnetlink.c:(.text+0x63e0): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > net/core/filter.o: In function `sock_map_release': > filter.c:(.text+0x8c8c): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > net/core/sock_reuseport.o: In function `sock_map_release': > sock_reuseport.c:(.text+0x398): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > net/bpf/test_run.o: In function `sock_map_release': > test_run.c:(.text+0x3dc): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > net/packet/af_packet.o: In function `sock_map_release': > af_packet.c:(.text+0x6958): multiple definition of `sock_map_release' > kernel/sysctl.o:sysctl.c:(.text+0x1a50): first defined here > > Caused by commit > > 9b2e8bbc4e7a ("bpf: sockmap, map_release does not hold refcnt for pinned maps") > > I applied the following patch for today: > > From: Stephen Rothwell > Date: Mon, 16 Apr 2018 12:27:24 +1000 > Subject: [PATCH] fix for "bpf: sockmap, map_release does not hold refcnt for > pinned maps" > > Signed-off-by: Stephen Rothwell > --- > include/linux/bpf.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/bpf.h b/include/linux/bpf.h > index f46561de5154..3b6c2b66f414 100644 > --- a/include/linux/bpf.h > +++ b/include/linux/bpf.h > @@ -660,7 +660,7 @@ static inline int sock_map_prog(struct bpf_map *map, > return -EOPNOTSUPP; > } > > -void sock_map_release(struct bpf_map *map) {} > +static inline void sock_map_release(struct bpf_map *map) {} > #endif > > /* verifier prototypes for helper functions called from eBPF programs */ Sigh, yeah, that's buggy. Thanks for catching it! John, given bpf tree hasn't been pushed out, I'm considering to drop the series from the bpf tree so we can have a clean respin of it with this fixed initially and not as follow-up churn. While you're at it, can you just make this a bpf callback, so we have the 'clear' handlers private in prog array and sockmap respectively? This would also have avoided the bug in the first place. Thanks, Daniel