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=-3.7 required=3.0 tests=BAYES_00, 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 A6D7DC433E6 for ; Fri, 12 Feb 2021 23:45:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70DA164D9A for ; Fri, 12 Feb 2021 23:45:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229980AbhBLXpW (ORCPT ); Fri, 12 Feb 2021 18:45:22 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:37708 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbhBLXpS (ORCPT ); Fri, 12 Feb 2021 18:45:18 -0500 Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lAi72-001KCr-76; Fri, 12 Feb 2021 16:44:36 -0700 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=fess.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lAi70-00AAP5-Mb; Fri, 12 Feb 2021 16:44:35 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: Joe Perches Cc: Andrew Morton , Alexey Dobriyan , linux-fsdevel , LKML References: <85ff6fd6b26aafdf6087666629bad3acc29258d8.camel@perches.com> <130bc5f98c2fd501d32024d267ea73f1fb9d88b6.camel@perches.com> Date: Fri, 12 Feb 2021 17:44:16 -0600 In-Reply-To: <130bc5f98c2fd501d32024d267ea73f1fb9d88b6.camel@perches.com> (Joe Perches's message of "Fri, 12 Feb 2021 14:51:26 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1lAi70-00AAP5-Mb;;;mid=;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+qBXDbfZLXHXoONMPahKJzWEoz0+wrmrk= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH] proc: Convert S_ permission uses to octal X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Joe Perches writes: > On Fri, 2021-02-12 at 16:01 -0600, Eric W. Biederman wrote: >> Joe Perches writes: >> >> > Convert S_ permissions to the more readable octal. >> > >> > Done using: >> > $ ./scripts/checkpatch.pl -f --fix-inplace --types=SYMBOLIC_PERMS fs/proc/*.[ch] >> > >> > No difference in generated .o files allyesconfig x86-64 >> > >> > Link: >> > https://lore.kernel.org/lkml/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com/ >> >> >> I will be frank. I don't know what 0644 means. I can never remember >> which bit is read, write or execute. So I like symbolic constants. >> >> I don't see a compelling reason to change the existing code. > > Did you read Linus' message in the Link: above? > > It was a reply to what Ingo Molnar suggested here: > > https://lore.kernel.org/lkml/20160803081140.GA7833@gmail.com/ Only if you read in reverse chronological order. Ingo's message was in reply to Linus and it received somewhat favorable replies and was not shot down. I certainly do not see sufficient consensus to go around changing code other people maintain. My suggest has the nice property that it handles all 512 different combinations. I think that was the only real downside of Ingo's suggestion. There are just too many different combinations to define a set of macros to cover all of the cases. Eric