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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=ham 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 ABA19C282C4 for ; Sat, 9 Feb 2019 14:07:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F7FE2084D for ; Sat, 9 Feb 2019 14:07:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ieee.org header.i=@ieee.org header.b="ELubXEU2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726858AbfBIOHr (ORCPT ); Sat, 9 Feb 2019 09:07:47 -0500 Received: from mail-qt1-f182.google.com ([209.85.160.182]:37534 "EHLO mail-qt1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbfBIOHr (ORCPT ); Sat, 9 Feb 2019 09:07:47 -0500 Received: by mail-qt1-f182.google.com with SMTP id a48so7232480qtb.4 for ; Sat, 09 Feb 2019 06:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=vsBaxt/6rYUnRDgKZtDuwUTC8S34xcz4lqgBR2Z2PBQ=; b=ELubXEU2MQ646a0Re5wmVLmbBZ3XHc0j+Tp7X/P+jvl+ZTnYBl6g/TGPBMDL/IQyCc 604ihDDAdXJhzHmYy3SEneKPy0tmiVuHaiG4WSl5q3qWYXNlMfuJTQ+pL8OA7lWa3Vmc 4n1YDedQ34aRiDq33T/ZJB4sTKcMyPDtjBSGM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vsBaxt/6rYUnRDgKZtDuwUTC8S34xcz4lqgBR2Z2PBQ=; b=DOrlx1jxGhbQWMfawFkCxSKv/Uq2gCMhOM3UqQUPE48AHySqblqfQIBROYWiDHOb7y NdiBz/9pL0LEABHcMkS94CRPeU3GqzormIUayK7w6ZEakwts8z4wnzQQRMK6XdFrHK16 ivlwzOG/XDurHZOiL5sJRCqn0v48p2JjiKW3lmvfwo8HCWZL1lZ/9YsmpB4vsD/BItoE rwUeYQFW65Qg3ZcHxM9wdQv62eb9ekjOYUqZTQSxlToXvKTCAsNuBDuNgn8DMlmL0yLd d4zHhDmE0LxrNvnwx2oE1wSSp4l1zXbPokJLYj+2ECmbx87CpjCQAYqwJD3BZmOcLy2m h+YA== X-Gm-Message-State: AHQUAua90entEf7D+X3JsgPF3LqGSbuLyQCJuDlSOCyPIK0IiFgDKua9 9MB3cLTpCSFg1LnWHPSTcXU20D1sJK8= X-Google-Smtp-Source: AHgI3IY0iaeHHeijdmoD5Sp62SJsAZ6Vdxg4X4TsSoOesmz7aXwMR71OCyuuyRtxPlus+MPfVn6wJg== X-Received: by 2002:ac8:cc9:: with SMTP id o9mr10867680qti.206.1549721265989; Sat, 09 Feb 2019 06:07:45 -0800 (PST) Received: from [192.168.1.190] (pool-108-15-23-247.bltmmd.fios.verizon.net. [108.15.23.247]) by smtp.gmail.com with ESMTPSA id d50sm10469212qta.31.2019.02.09.06.07.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Feb 2019 06:07:45 -0800 (PST) Subject: Re: read_file_perms vs mmap_read_file_perms To: Russell Coker , "selinux-refpolicy@vger.kernel.org" References: <1938152.zeI3LBqMHI@liv> From: Chris PeBenito Message-ID: <402f8da9-de40-3a9d-f767-324bc6f0e60b@ieee.org> Date: Sat, 9 Feb 2019 09:07:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <1938152.zeI3LBqMHI@liv> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: selinux-refpolicy-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 2/9/19 5:25 AM, Russell Coker wrote: > define(`read_file_perms',`{ getattr open read lock ioctl }') > define(`mmap_read_file_perms',`{ getattr open map read ioctl }') > > I think that the general expectation would be that mmap_read_file_perms is a > superset of read_file_perms. Is there any reason why mmap_read_file_perms > doesn't include lock permission? If not I think we should add it to avoid > surprises. You are correct, it should be a proper superset. However, my preference would be to go the other way and eliminate lock from read_file_perms, which is what I'm trying to do with mmap_read_file_perms not being a proper superset. -- Chris PeBenito