From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758912AbcLUQGz (ORCPT ); Wed, 21 Dec 2016 11:06:55 -0500 Received: from mail.kernel.org ([198.145.29.136]:35936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752683AbcLUQGx (ORCPT ); Wed, 21 Dec 2016 11:06:53 -0500 Date: Wed, 21 Dec 2016 13:06:47 -0300 From: Arnaldo Carvalho de Melo To: Joe Stringer Cc: LKML , netdev , Wang Nan , ast@fb.com, Daniel Borkmann Subject: Re: [PATCH perf/core REBASE 3/5] tools lib bpf: Add bpf_prog_{attach,detach} Message-ID: <20161221160647.GA3717@kernel.org> References: <20161214224342.12858-1-joe@ovn.org> <20161214224342.12858-4-joe@ovn.org> <20161220141851.GB32756@kernel.org> <20161220143217.GC32756@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Dec 20, 2016 at 10:50:22AM -0800, Joe Stringer escreveu: > On 20 December 2016 at 06:32, Arnaldo Carvalho de Melo wrote: > > Em Tue, Dec 20, 2016 at 11:18:51AM -0300, Arnaldo Carvalho de Melo escreveu: > >> This one makes it fail for CentOS 5 and 6, others may fail as well, > >> still building, investigating... > > > > Ok, fixed it by making it follow the model of the other sys_bpf wrappers > > setting up that bpf_attr union wrt initializing unamed struct members: > > - union bpf_attr attr = { > > - .target_fd = target_fd, > > - }; > > + union bpf_attr attr; > > + > > + bzero(&attr, sizeof(attr)); > > + attr.target_fd = target_fd; > Ah, I just shifted these across originally so the delta would be > minimal but now I know why this code is like this. Thanks. np, making sure this code works in all those environments requires automation, I'd say its impossible otherwise, too many details :-\ Fixed, pushed, merged, should hit 4.10 soon :-) - Arnaldo