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 44038C32751 for ; Wed, 7 Aug 2019 09:04:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C8DE22305 for ; Wed, 7 Aug 2019 09:04:13 +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 S1727987AbfHGJEK (ORCPT ); Wed, 7 Aug 2019 05:04:10 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:39166 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727522AbfHGJEK (ORCPT ); Wed, 7 Aug 2019 05:04:10 -0400 Received: by mail-ot1-f66.google.com with SMTP id r21so95423822otq.6 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=GdDDhSMtmVajl4cNLEp3Qq7IRsmE6NQvcDQIT8E2LHibG+bGksqrMMvBGRJ2S403WE 55vJ/RMZCR7u7vPHnlsturm5nGJwyM6VekzXs0n9KeEJAPOZpG73SnnOAYCNixo3Rs2x O1dGm+HJmEcW/shKT+mAOwvvprC5kPoBIiDyUrWV69nOoqxeaGSUIzpfdGoG4BRta+Z1 sCS8/uYb5BsWHjdKRojvI43M2EPg+zFmnZ3EXuT520c73IvOe3QuaLD6cvHF5n23RhVz vPiEfDRqrKw+RC5KLLv4K/eBcBos7T/TX3TT/Poc4UMA4al80EWugIOUBZqab9FHnoe6 qPVQ== X-Gm-Message-State: APjAAAXFusrRYetjBlWoMmQM4SQ7T4Vli2lYaL1zV3pcPCwK1OR26FXj wMTjaFV4MmWiYrbKwB6fgxbGX3VGbujcWeAU6Wycmg== 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: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@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