Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2342496imm; Tue, 10 Jul 2018 18:49:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpetTp6iAYxL+Iwv9QapzpVT+4w+FoWL/O05mceM41db0dg1BDZtUY0FYbUTMSyXJ2SE1TaH X-Received: by 2002:a65:5141:: with SMTP id g1-v6mr24521654pgq.418.1531273770521; Tue, 10 Jul 2018 18:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531273770; cv=none; d=google.com; s=arc-20160816; b=HIxea5i2PczD2c6YLRba5WCtU8mkP3gy9PHE1CrV6eGIJhlSa0BQalhzojklO9OUOO i4SLe9Cs0czWsJuZOOr8tixsFMQTwUSVBbtKlDD/bYHoC9VeXRianeYN1dM/jigxz03O JODN3qyIFeOIRj8UOpupUM0JtSJhWb15sXCFPS3kmLL6jEAgVFKlzWyVgyY/5E4oU8Af w/dvJC9sSLbvr4h7QlNkbmwIbBINbnIpTeKFWz76B/NAgB8lgxiogTwG/2Imt0qQrYQH gRZVhXp+YyPNSfIc9ucGLUhujzHZ6si86WJSXypPsl+6c2zrP1D8vhGKStOPW0PS8kR1 NfcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=BxkyOn/QIS6pU9oXaGfQafuVWHGJkT+Qcz/JR0fwk7A=; b=ilWvMAMybIPUYx/KZNfCr3Im8LhCIIEbWDNYAJSKDhEehfmolE206oOD8vZbU8tl6r rqW6x7WLpJTpiYZgWyF2Z7bK4APGUU9/NiYwiYtDMnUvF9THkr4q2jtncrTHd1FF2IlT oy4vDH9v2GzdCgPXOy1SNKS9o4nDLZzgfSY2JejNdsngVHX0UuAaYz/7laWdeHZaiPro DvEQ8n/Q2ULoiAHuz5Rjs052H2P/8Xl77V5TcANNNURC6YzedaZ8zEd/iiQShIPKQKSk wv0ogANeGR5F6Xv1sw7FtWYa7rlufgwrj0l/uomCpu3vbrzo0xxgsO7y04DUGlBIMSWQ JNLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="A/TRGQ/r"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23-v6si16454801pgl.282.2018.07.10.18.49.14; Tue, 10 Jul 2018 18:49:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="A/TRGQ/r"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732381AbeGKBuc (ORCPT + 99 others); Tue, 10 Jul 2018 21:50:32 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:52849 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732278AbeGKBuc (ORCPT ); Tue, 10 Jul 2018 21:50:32 -0400 Received: by mail-it0-f68.google.com with SMTP id p4-v6so1454445itf.2; Tue, 10 Jul 2018 18:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BxkyOn/QIS6pU9oXaGfQafuVWHGJkT+Qcz/JR0fwk7A=; b=A/TRGQ/rQT/smpA/xQMo1OieoZNpg5PyOAYN6xf46/qgyvX0+dPrEpK21CW0swjlVL xfGWdMixUp5Kikx9YVuAMD1wbYoc/HbzcQNOOJCZE5sR5d6lpKR/70slquNyU48QbhD6 lKIOEtqJspIEEK+M/HkGxpWnTgFMDXrJEkxAI= 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=BxkyOn/QIS6pU9oXaGfQafuVWHGJkT+Qcz/JR0fwk7A=; b=kOGPitZWr8uI7j8rAvskccLn6aaYukRrAPvvXmHw2wsk6hkE9bsC+T6oNuUKKvVAPf /YTx7yazdV35goM7Zix3FN46uzQdtyXXJeplUb9f1rib3ZQXKMAN3xsPtVXr4xnyvWB1 sdvlN+QO8bm1Z7JB3z6ybiUoheY9/kGS41SnRsp3KoVt9Qh38nCu7M3Xh+lST+8ZDpF1 ActrbdiMZHDJQnQfJT+8Ulr5dBrzKalsBMYbxtRtCmar1hxqMTmC5JgsrhlAzRR7zD0G IQqMgQuUjvS2W+Av77rRUgfnF1rP3yxKnHyP94XPDw9enqRTc1C6GF3qsdyUG/iFCMez lHfQ== X-Gm-Message-State: APt69E3xJcB/nluQZUPuSuc16o3sGAH7DHVKxphNiO9k14dDrW91z5PJ btq8ktOljrHxv48I+287q63ixOKweN5qmyR2nFM= X-Received: by 2002:a24:d0d7:: with SMTP id m206-v6mr20590388itg.1.1531273721639; Tue, 10 Jul 2018 18:48:41 -0700 (PDT) MIME-Version: 1.0 References: <153126248868.14533.9751473662727327569.stgit@warthog.procyon.org.uk> <153126264966.14533.3388004240803696769.stgit@warthog.procyon.org.uk> <686E805C-81F3-43D0-A096-50C644C57EE3@amacapital.net> <20180711011520.GL30522@ZenIV.linux.org.uk> In-Reply-To: <20180711011520.GL30522@ZenIV.linux.org.uk> From: Linus Torvalds Date: Tue, 10 Jul 2018 18:48:30 -0700 Message-ID: Subject: Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9] To: Al Viro Cc: Andy Lutomirski , David Howells , Linux API , linux-fsdevel , Linux Kernel Mailing List , Jann Horn Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 10, 2018 at 6:15 PM Al Viro wrote: > > Umm... How about "use credentials of opener for everything"? yeah, we have that for writes in general. Nobody ever actually follows that rule. They may *think* they do, and then they call to some helper that does "capability(CAP_SYS_WHATEVAH)" without even realizing it. But I'm certainly ok with writes, if it's just filling a buffer. Preferably a standard buffer we already have, like a seqfile or pipe (hey, splice!) or whatever. And then you have that final op to actually "commit" the state. Which shouldn't be a write (and not the close). Linus