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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 E095FC33CAF for ; Mon, 13 Jan 2020 19:27:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A52B524689 for ; Mon, 13 Jan 2020 19:27:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iTp9iLl+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A52B524689 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3A91D8E0005; Mon, 13 Jan 2020 14:27:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 358878E0003; Mon, 13 Jan 2020 14:27:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26F628E0005; Mon, 13 Jan 2020 14:27:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id 103528E0003 for ; Mon, 13 Jan 2020 14:27:42 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id AF6EE82499A8 for ; Mon, 13 Jan 2020 19:27:41 +0000 (UTC) X-FDA: 76373595522.08.aunt20_603e5d17af14f X-HE-Tag: aunt20_603e5d17af14f X-Filterd-Recvd-Size: 4320 Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Mon, 13 Jan 2020 19:27:41 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id n16so9384467oie.12 for ; Mon, 13 Jan 2020 11:27:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kn52d9L0ca52gNc3n8O9DhLTFY/ai8fCyuw7ZaovG/c=; b=iTp9iLl+2sajghi8PUP9cyUrByJ/eObxBtaFyhGFG1S3lFR2+haIyEe2ZtVDpaV2E9 jxfk7xoaiZ5NLeT/BoK4Sn4m+qduPaBEfQSJCF3vJBXVjZiNZXv1c+Jq864ttV+KMRpC rjzoboLEf4yU93/fqZThB9UCpAqNtbAGJizja5zau4OBqyO16fC2IMLSu1sgpuwgCjUx wmu5FrXUv/yO+C/9+Xvigng1EradwqZY8mhxoxA+dsjLh9DeN1Ff0pVGdLIGv8X7OzSb sr3YGzhAp1G5f1RMCX1bL3QHusPQsxfUw+yugNDtRg5WGLEFtMvKG4ZVygDNAweTfbY8 S6PQ== 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=kn52d9L0ca52gNc3n8O9DhLTFY/ai8fCyuw7ZaovG/c=; b=nfR6kaNypnyGScfV05X6lRA2qgWol2cVVTY/LzcAwqR6euzIRwdSA7vwTxjp7YgLUU WpGhsx9LXjcoRSuIVsYBoAEu1yw2e/m0m0PE3vMvJOegh+leWZ+jN5BC9Nr9Spbxa4wW G0o2KRcL34LwoS2yAoZwbpyE4vQ43VTzyP+4rOdr+XoL8YGMRg5UWu2s5/yvZHjpIJJD whAJRLBAMkIAuqu46tsbKA2Y2g+qzFhjSNnZfnYvAackmSlGOJGN3EK8ktLgOY9hFStw +IsxvNWiBVb6c3yPxlE549zcOh/n2xygnJ+DY/V2YftdfXNnNEqQ8RpUC42wgqKHw6pp uh0Q== X-Gm-Message-State: APjAAAU41nz7HmwJkqvL040Jhauq5xOmzAUsHiNUgvMlRYFBbyFoumLJ /E7IFQRtXW38o09wECAXG26LZTmEIGOT+M3+xT486A== X-Google-Smtp-Source: APXvYqzUy5kz5MCFujOKQJTl7DBbQ2xcSsMVUThyL8uDRUzqtcvXFWS1FCfAHyMFkkflER1Iyz9ACpk9tHPXu+m5Q2A= X-Received: by 2002:aca:f20b:: with SMTP id q11mr13344801oih.78.1578943660130; Mon, 13 Jan 2020 11:27:40 -0800 (PST) MIME-Version: 1.0 References: <20200110213433.94739-1-minchan@kernel.org> <20200110213433.94739-3-minchan@kernel.org> <56ea0927-ad2e-3fbd-3366-3813330f6cec@virtuozzo.com> <20200113104256.5ujbplyec2sk4onn@wittgenstein> <20200113184408.GD110363@google.com> <20200113191046.2tidyvc544zvchek@wittgenstein> In-Reply-To: <20200113191046.2tidyvc544zvchek@wittgenstein> From: Daniel Colascione Date: Mon, 13 Jan 2020 11:27:03 -0800 Message-ID: Subject: Re: [PATCH 2/4] mm: introduce external memory hinting API To: Christian Brauner Cc: Minchan Kim , Kirill Tkhai , Michal Hocko , Andrew Morton , LKML , linux-mm , Linux API , oleksandr@redhat.com, Suren Baghdasaryan , Tim Murray , Sandeep Patil , Sonny Rao , Brian Geffon , Johannes Weiner , Shakeel Butt , John Dias Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jan 13, 2020 at 11:10 AM Christian Brauner wrote: > This does not > affect the permission checking you're performing here. Pidfds-as-capabilities sounds like a good change. Can you clarify what you mean here though? Do you mean that in order to perform some process-directed operation X on process Y, the pidfd passed to X must have been opened with PIDFD_CAP_X *and* the process *using* the pidfds must be able to perform operation X on process Y? Or do pidfds in this model "carry" permissions in the same way that an ordinary file descriptor "carries" the ability to write to a file if it was opened with O_WRONLY even if the FD is passed to a process that couldn't otherwise write to that file? Right now, pidfds are identity-only and always rely on the caller's permissions. I like the capability bit model because it makes pidfds more consistent with other file descriptors and enabled delegation of capabilities across the system.