Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752035AbdHHBUw (ORCPT ); Mon, 7 Aug 2017 21:20:52 -0400 Received: from mail-oi0-f42.google.com ([209.85.218.42]:36382 "EHLO mail-oi0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751828AbdHHBUu (ORCPT ); Mon, 7 Aug 2017 21:20:50 -0400 MIME-Version: 1.0 In-Reply-To: <20170807.112840.395506747161262549.davem@davemloft.net> References: <20170807130602.31785-1-joelaf@google.com> <20170807130602.31785-4-joelaf@google.com> <20170807.112840.395506747161262549.davem@davemloft.net> From: Joel Fernandes Date: Mon, 7 Aug 2017 18:20:49 -0700 Message-ID: Subject: Re: [PATCH RFC v2 3/5] samples/bpf: Fix inline asm issues building samples on arm64 To: David Miller Cc: LKML , Chenbo Feng , Alison Chaiken , Juri Lelli , Alexei Starovoitov , Daniel Borkmann , "open list:BPF (Safe dynamic programs and tools)" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1646 Lines: 46 Hi Dave, On Mon, Aug 7, 2017 at 11:28 AM, David Miller wrote: > > Please, no. Sorry you dislike it, I had intentionally marked it as RFC as its an idea I was just toying with the idea and posted it early to get feedback. > > The amount of hellish hacks we are adding to deal with this is getting > way out of control. I agree with you that hellish hacks are being added which is why it keeps breaking. I think one of the things my series does is to add back inclusion of asm headers that were previously removed (that is the worst hellish hack in my opinion that existing in mainline). So in that respect my patch is an improvement and makes it possible to build for arm64 platforms (which is currently broken in mainline). > > BPF programs MUST have their own set of asm headers, this is the > only way to get around this issue in the long term. Wouldn't that break scripts or bpf code that instruments/trace arch specific code? > > I am also strongly against adding -static to the build. I can drop -static if you prefer, that's not an issue. As I understand it, there are no other cleaner alternatives and this patchset makes the samples work. I would even argue that's its more functional than previous attempts and fixes something broken in mainline in a more generic way. If you can provide an example of where my patchset may not work, I would love to hear it. My whole idea was to do it in a way that makes future breakage not happen. I don't think that leaving things broken in this state for extended periods of time makes sense and IMHO will slow usage of bpf samples on other platforms. thanks, -Joel