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 X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20951C433FF for ; Wed, 7 Aug 2019 09:04:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9DB822305 for ; Wed, 7 Aug 2019 09:04:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cloudflare.com header.i=@cloudflare.com header.b="tm3vjwdr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727522AbfHGJEK (ORCPT ); Wed, 7 Aug 2019 05:04:10 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:41981 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbfHGJEK (ORCPT ); Wed, 7 Aug 2019 05:04:10 -0400 Received: by mail-ot1-f65.google.com with SMTP id o101so101423268ota.8 for ; Wed, 07 Aug 2019 02:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DEID4hdTU9OsE5Olv2ITic1w7RC+FwSfy06kTRhmLAU=; b=tm3vjwdrSmhydT/BngaZ4D2guziS0KvNUwGsyqlHQwb+vS5LAKappAwNqm16YG4s80 1iyco+xqoSe9NicXaMOzfQkqvNQ54gDo442yWGxxUrP44xp9u+toJpj5d7lYRyOJxkwN Y1+9yQtqXWmVbmzbi49/xNT9OaVoZti+48FQU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DEID4hdTU9OsE5Olv2ITic1w7RC+FwSfy06kTRhmLAU=; b=oFgo1igWubdiJdztwLnVBkdpXtPvgcMKyd7MkXwjs+8gVkyC6RxJteTbaAZGSOUHTB ryfF4+zVBvs8K/xr09zQlcA1RUgfLvKzDIt3DYHhDd06bHNlGyZ/n6zLVaRJ71jQTbYa wCcIx1g4RWxtoZIOLUmmYCTtULLQZo27DheJzcj+S+t3k82xmWW2yT1xpCU1KFqUOO3F BuT0WONVCgmD49F/RBZSFAFA2bAy5d088itqy+fRdJuP98Q/ddkM5e+5kNlkBN+MarHK 7QcLigzZeE7rHJxEJDCqBWHUTv1KPqnsxk/YomJub6d4g4aor5t1b+yDo5vI2jozSOAg ea/Q== X-Gm-Message-State: APjAAAWCvUg9P+/tHMv/N5RJqMRHZkxI3MneHcvyeQjrD8iMHdo5mtpt GIwla8S/zSeUN47ZbiX5JyxGqvylQBlRYKZdciJLPw== X-Google-Smtp-Source: APXvYqxo3V1y9sCi7dZxUrDx795buEc6t5ypLDcJyjSBO2fNRxIwTpRSLHtVX8CsTXxFONDTe86DoWRJdEj11+wyvcY= X-Received: by 2002:a05:6830:1485:: with SMTP id s5mr6423742otq.132.1565168649273; Wed, 07 Aug 2019 02:04:09 -0700 (PDT) MIME-Version: 1.0 References: <5A2FCD7E-7F54-41E5-BFAE-BB9494E74F2D@fb.com> <20190805192122.laxcaz75k4vxdspn@ast-mbp> <20190806011134.p5baub5l3t5fkmou@ast-mbp> In-Reply-To: From: Lorenz Bauer Date: Wed, 7 Aug 2019 10:03:57 +0100 Message-ID: Subject: Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf To: Andy Lutomirski Cc: Alexei Starovoitov , Song Liu , Kees Cook , Networking , bpf , Alexei Starovoitov , Daniel Borkmann , Kernel Team , Jann Horn , Greg KH , Linux API , LSM List Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 7 Aug 2019 at 06:24, Andy Lutomirski wrote: > a) Those that, by design, control privileged operations. This > includes most attach calls, but it also includes allow_ptr_leaks, > bpf_probe_read(), and quite a few other things. It also includes all > of the by_id calls, I think, unless some clever modification to the > way they worked would isolate different users' objects. I think that > persistent objects can do pretty much everything that by_id users > would need, so this isn't a big deal. Slightly OT, since this is an implementation question: GET_MAP_FD_BY_ID is useful to iterate a nested map. This isn't covered by rights to persistent objects, so it would need some thought. -- Lorenz Bauer | Systems Engineer 6th Floor, County Hall/The Riverside Building, SE1 7PB, UK www.cloudflare.com