From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD54EC433EF for ; Tue, 16 Nov 2021 22:00:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB6146322D for ; Tue, 16 Nov 2021 22:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbhKPWD3 (ORCPT ); Tue, 16 Nov 2021 17:03:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231699AbhKPWD2 (ORCPT ); Tue, 16 Nov 2021 17:03:28 -0500 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E608C061570; Tue, 16 Nov 2021 14:00:31 -0800 (PST) Received: by mail-yb1-xb31.google.com with SMTP id e136so1077902ybc.4; Tue, 16 Nov 2021 14:00:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IhxZXD5NEyOlbJBzVToA3gUj1KVfrk+O3Zu96bMrpOk=; b=H9C6fELVjUQLJuG9T4sRvylDFgeWhj7p59TauhrHUIYRpQGfmZgfmtf9x3vHstCKuc wtHaS+69PAbJnNs3onAIUBO9lH8fszRfLIgxpL23l1CRQOMDFhZZsFuWJLIx2A5GGtym Rxy5nWJSl1QtjguUgzC9SlUKdv1cpqPkUcmehGMz2zvQ2gXFfLkTj1SzDH/nyLKqPCAM uH3QffC67U+Pb0dJp6e+cWdUjb8bBfMozObFDfaKspyJk002gK0p47/ycgZ7PCdgJYJB 8EEkCCB0ZTp08yp3sDZ0dI6zuzJXxYA9db6MskdNE62SXCsWNykKNH7CgjACt8YsHNdF BdzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IhxZXD5NEyOlbJBzVToA3gUj1KVfrk+O3Zu96bMrpOk=; b=COzRBU54/ZsPMjDR1ePp6loFZcdHBHbqdU4/Y+R1YaXfvDRqslzHKlXxYa/hVe7+5o gqVOOoPQy+aiXVuECE0oPB/nY+j8Fwhat5YmgC8vX8C1x+TI7E+cD/CaPG7HNZBevYMd 7TzuJHQC2cr7EBgHALsarAynZCyTLkO9W0f5fUl2UuVxyzKeVuVvzReHd9iAFiqVv8zE Yp5fqx9FgduswMc9y0/22fV1eWg05cmUsLR1bnmzsW5ZzMdK7SKjG2Kpd/MTQta1kcG2 Otb6j6ALLJUQee3ZU12rcPpl0cd/aaGA7b5DuhiKmcfw3nI8BIfB74yMYu44GSdqxmMk yaFQ== X-Gm-Message-State: AOAM532o2khbxzUYd90DQkHGJmglm8VUGGBBipGTkakA5ocDbx/QLorU iFn0yJr8RFY7tBvnvs0jCUAOr/ENthCj9qJwi1w= X-Google-Smtp-Source: ABdhPJx39gY4v+RDAEyNKPNnkxArx5NkgQPrhzVox7loApPpnqfkAGM+708ESMPgFkPM8zEajuE2xRnD5EcsrzxR2LA= X-Received: by 2002:a25:cc4c:: with SMTP id l73mr11561801ybf.114.1637100030581; Tue, 16 Nov 2021 14:00:30 -0800 (PST) MIME-Version: 1.0 References: <54d3cb9669644995b6ae787b4d532b73@crowdstrike.com> <0b80c79b-de0c-931c-262d-4da6e2add9f9@iogearbox.net> In-Reply-To: <0b80c79b-de0c-931c-262d-4da6e2add9f9@iogearbox.net> From: Andrii Nakryiko Date: Tue, 16 Nov 2021 14:00:19 -0800 Message-ID: Subject: Re: Clarification on bpftool dual licensing To: Daniel Borkmann Cc: Martin Kelly , "bpf@vger.kernel.org" , Alexei Starovoitov , "netdev@vger.kernel.org" , "kernel-team@fb.com" , "David S. Miller" , Andrii Nakryiko Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Tue, Nov 16, 2021 at 2:16 AM Daniel Borkmann wrote: > > On 11/15/21 7:20 PM, Martin Kelly wrote: > > Hi, > > > > I have a question regarding the dual licensing provision of bpftool. I > > understand that bpftool can be distributed as either GPL 2.0 or BSD 2-clause. > > That said, bpftool can also auto-generate BPF code that gets specified inline > > in the skeleton header file, and it's possible that the BPF code generated is > > GPL. What I'm wondering is what happens if bpftool generates GPL-licensed BPF > > code inside the skeleton header, so that you get a header like this: > > > > something.skel.h: > > /* this file is BSD 2-clause, by nature of dual licensing */ > > Fwiw, the generated header contains an SPDX identifier: > > /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ > /* THIS FILE IS AUTOGENERATED! */ > > > /* THIS FILE IS AUTOGENERATED! */ > > > > /* standard skeleton definitions */ > > > > ... > > > > s->data_sz = XXX; > > s->data = (void *)"\ > > > > "; > > > > My guess is that, based on the choice to dual-license bpftool, the header is > > meant to still be BSD 2-clause, and the s->data inline code's GPL license is > > not meant to change the licensing of the header itself, but I wanted to Yes, definitely that is the intent (but not a lawyer either). > > double-check, especially as I am not a lawyer. If this is indeed the intent, > > is there any opposition to a patch clarifying this more explicitly in > > Documentation/bpf/bpf_licensing.rst? > > Not a lawyer either, but my interpretation is that this point related to "packaging" > of BPF programs from the bpf_licensing.rst would apply here (given this is what it > does after all): > > Packaging BPF programs with user space applications > =================================================== > > Generally, proprietary-licensed applications and GPL licensed BPF programs > written for the Linux kernel in the same package can co-exist because they are > separate executable processes. This applies to both cBPF and eBPF programs. Yep. If someone packages proprietary BPF ELF into a skeleton, that doesn't make the BPF ELF suddenly GPL or BSD, I'd imagine.