Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4616593ybg; Mon, 8 Jun 2020 12:20:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT5WzGW5sLbICct4RyiaIcVgfcIuBCtQKLUiy6O4E6Oq0CbEGIjpMIbghbVZ2UaLJtutuV X-Received: by 2002:a05:6402:2070:: with SMTP id bd16mr22836511edb.35.1591644052347; Mon, 08 Jun 2020 12:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591644052; cv=none; d=google.com; s=arc-20160816; b=m/49/Ra1cpuHQQXmeUWvoMQNurTYgIIEZTDFy6//eukuOS3tma8eqh8y8GoG7V89Gy KzVtmDwenFAj4D8IndoVqhoStM9hV6yT8FgLsLfg0IK4LN0CJOXGNbBVh1ozpgGDGCPl pc8QCvZQ1SjGfatNhbt9Kn27+ckwen6Ml7KztRpPhvxK+D9vFgI+1/f7HcwxV1gWgb+q 7Km2YHMVt14Oovve6MTLj2M6F3gjPZqsMlcBsRc1MR0TdR8AgfsEm502ZJsZaS67a4v0 SH/VTPKfnLNf/H2Zh2ZMLkJhgh2wsbgR1wsCWaI+7dkp2Lx4Zz3tNe3Z4AafDgqPt8M9 q19g== 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; bh=5+aTf2gj2lOJ6qgTzBTSu7Nj1KO1oLISUQJXCwIgKPw=; b=fpkdNPVzKwkrUcPtIrhqri0P8XCAz1smYdzOMBAP5kp8BAQRL7zbJa1PFEXASzzVHn szEW0mCpCFWADMbMpizNZXZ9IPrqb44LlGMlluuuU49XRWWr5q++J+/kPWfuLXOzKz4o R09CxS6Hp4zDTkIjkd98nwiaopQoqtN5yjKr4EmSzNpscgZPl1x1Kcj64WIoioPlf6l/ NXm3Yyhch/eWfuN65Z3yXWhfvMQDl6nXQA+ZgS+XZb/trE7QszcTHATCcZklkggMt+3x zRJ8nR1kczpuU8dMJ2JMuDsa/OHqMpZ8L5TD3c6jQAS1wdH0bQpBEC/QbCh6kXUeUF4v kTXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XycGSfym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc20si8969936edb.108.2020.06.08.12.20.29; Mon, 08 Jun 2020 12:20:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XycGSfym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726445AbgFHTSl (ORCPT + 99 others); Mon, 8 Jun 2020 15:18:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbgFHTSk (ORCPT ); Mon, 8 Jun 2020 15:18:40 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C31F4C08C5C3 for ; Mon, 8 Jun 2020 12:18:37 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id j18so8888724lji.2 for ; Mon, 08 Jun 2020 12:18:37 -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=5+aTf2gj2lOJ6qgTzBTSu7Nj1KO1oLISUQJXCwIgKPw=; b=XycGSfymrTt81KEthuu69tnYBVTU4/J3hiH1z1OY7eG4VVaSI6wY1sNsf3vhH1zEOS dZXPuBt2VedjgwEjaYyqKGA7dFvG4VByaiDcz9wEBUo5Wdk675sUio3QpzXNo5zQfjkB Fdj//4grkPz8ALLWOhe7NYdYjv8ulkjsZ2EH4= 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=5+aTf2gj2lOJ6qgTzBTSu7Nj1KO1oLISUQJXCwIgKPw=; b=LHozDts/noAvD3cZywGuAEQjtAIKEl+LvOrm4vLSRryWAZOkUe7JhZnbNBli1IpBL2 ZUsRww4HDDvCtKBKapPaIwzqqNVDSvvVSKlqvJpTFetgT5lGfXoHuQImD/e/L9RNTnN4 bccdMDi2hGOisdjTvP3MHuxx4Ja7j/iRCm2OY5Ty90G1tFj2VB3yDraMCiHQOJ7fK9iA C3XJHpNzzNWUqaE7EzZQFaxb8+QnXLvF3LYY6EPUhEu/SM29WXXRs9xydXDQ2nElbYsn QEJB9FgQVr56FCGS7Iq5dZpNnLZ0+7sRzTC/kVG7Kz6Plkv5QcgQWwZOmYlUCnS5hY6J Ga+g== X-Gm-Message-State: AOAM530Px9xB9ngJY//JU+7jyly+n3YS3yb4qGdoguTgyYWE1bcXvEBD MaGEQ+5vnXSiDnjNEioBibIiZrbeQ4o= X-Received: by 2002:a2e:884a:: with SMTP id z10mr11065330ljj.208.1591643915482; Mon, 08 Jun 2020 12:18:35 -0700 (PDT) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id k12sm3871907lja.35.2020.06.08.12.18.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2020 12:18:34 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id c17so21927541lji.11 for ; Mon, 08 Jun 2020 12:18:34 -0700 (PDT) X-Received: by 2002:a2e:974e:: with SMTP id f14mr11451625ljj.102.1591643914040; Mon, 08 Jun 2020 12:18:34 -0700 (PDT) MIME-Version: 1.0 References: <20200605142300.14591-1-linux@rasmusvillemoes.dk> <20200608020522.GN23230@ZenIV.linux.org.uk> In-Reply-To: <20200608020522.GN23230@ZenIV.linux.org.uk> From: Linus Torvalds Date: Mon, 8 Jun 2020 12:18:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH resend] fs/namei.c: micro-optimize acl_permission_check To: Al Viro Cc: Rasmus Villemoes , linux-fsdevel , Linux Kernel Mailing List 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 Sun, Jun 7, 2020 at 7:05 PM Al Viro wrote: > > return mask & deny ? -EACCES : 0; I agree that 'deny' would be simpler to read here, but in other places it would look odd. ie the IS_POSIXACL() thing that checks for "are group bits set" still wants the mode. And I'd hate to have us use code that then mixes 'deny' and 'mode' when they are directly related to each other. Anyway, I merged the patch as-is, I guess we can make future changes to this if you feel strongly about it. Linus