Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4564420imm; Mon, 17 Sep 2018 16:41:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbbGAsWBp4+ud7edemjTGtzF/P/NNiGj5FjFpc7LZl7z6X5R7M/ibwz5yR3OBo6UF3g+JQX X-Received: by 2002:a63:881:: with SMTP id 123-v6mr25447402pgi.244.1537227701193; Mon, 17 Sep 2018 16:41:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537227701; cv=none; d=google.com; s=arc-20160816; b=wMXOoxIJmqnrwkzzR9vTduZE56FkFM2bVdOYLrMRNrT2O/33T4rniD5H0PmWK2zMU5 kGTRBbwejmwjbdDXY8uRggc5G8T6C5PYRKHy4xTSd5jmupnzt6PDeCe1mtXXD6x+2++B HIwdFV1abOhg+ng36GbQ0b6Prw3xc5+VP3ODexZ60eUxc+0EBBy+macaU3/aZcBbnW3Q L01T70HR3S3q+tYZk4t3P8QoEJXpNUeHXxfHQuhz4zbRR9bveeLKvaTZl8u0l9AUS3MP zFaPGWWmnHRwYP7z/nrzmzS9wX/6nzBVfyfOXSaA7wxXURnxFuLLntt5ilIXZ3bTCrrR HU0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=1xTiVgLZrE4AKSCW6kvUVMKw8bOMVjK/n/crsoP6FZs=; b=DMi44z2dwzUlFHZOyKq8eoGM2yse6aXSZzu4RXnDXv4gTL24vEZIEzqHnnmbyEqutb 8aJyhyuEmTAK1CAPulq2vsI9ioeTSJOiOMYG4rCS9wN/gPGYxW1l1SkDOGjqA65QujdL 44dEFClvunMWGXY8aV2eh7tA26EPDFgfClPVAQecFEcYYWoxaR6U+FYI7Z9kEQ4XrF2h sd9jwdxYJh4vwPVKiLv6OiJFtq3yrWIlMhjGV7mIVji110t4VGG6MVURyZew0+3KAaBQ clwg6M+xvaJRXgXyrdwe2qodbQWHqCPrSju4s41cLlR8ox+JNl9L4VVzfuWKAiVSpW8u kwiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=uOghUlH6; 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 g9-v6si16343183plb.107.2018.09.17.16.41.25; Mon, 17 Sep 2018 16:41:41 -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=@yahoo.com header.s=s2048 header.b=uOghUlH6; 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 S1728530AbeIRFKf (ORCPT + 99 others); Tue, 18 Sep 2018 01:10:35 -0400 Received: from sonic304-18.consmr.mail.bf2.yahoo.com ([74.6.128.41]:38965 "EHLO sonic304-18.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbeIRFKf (ORCPT ); Tue, 18 Sep 2018 01:10:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1537227655; bh=1xTiVgLZrE4AKSCW6kvUVMKw8bOMVjK/n/crsoP6FZs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=uOghUlH6hFxRzddS2Vx9nja3zM28UuxyeT4fN+v3b5w/zCmC9ZPqELJoqMIQ+FN6+lmfCoDMbIW5H6jMa+5S1p4O5AVAJPQY3BEU/OIasmZZwqrx66L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oF_lRlBn3j2qgno3F.Kqu2YXnLVvIqr6CN3T3tGEpn.mCaZKixwVUkGW z.zV8QgRHxSyXo0aqz4prJ8g9MyIh3eKiD0Nc4jO1g4H2uaJsnf0SCTlC1mJ4XwMUcHiO8QeA5zw JHvJ3uNJVwAY2ao81iroiQrmw7ZJ91gqEy7wU2_QuhC9aAAcfxj0xo6c_Wh0VeO86WcqvLwq1M9M Gks4pGftLJQHWqID8gQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Mon, 17 Sep 2018 23:40:55 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.102]) ([67.169.65.224]) by smtp410.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e917b0489f2593a57538db83364356ca; Mon, 17 Sep 2018 23:40:54 +0000 (UTC) Subject: Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering To: Kees Cook , John Johansen Cc: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= , James Morris , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , LKLM References: <20180916003059.1046-1-keescook@chromium.org> <20180916003059.1046-17-keescook@chromium.org> <84e1a5a8-8997-829f-cf09-1d29895a3f99@schaufler-ca.com> <35b0af5b-e37e-e192-73b5-0d0b37d9e37f@schaufler-ca.com> <8f0bd39b-29a6-325d-4558-d9f484249c22@schaufler-ca.com> <53377892-695f-6336-8574-54c7aa0a4201@schaufler-ca.com> <7ecfffc3-d2a4-3ff7-4bf5-db3029d73c59@canonical.com> <060150b2-4bb4-bdcb-760a-5aa5e1ade381@canonical.com> From: Casey Schaufler Message-ID: Date: Mon, 17 Sep 2018 16:40:50 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/17/2018 4:28 PM, Kees Cook wrote: > On Mon, Sep 17, 2018 at 4:26 PM, John Johansen > wrote: >> On 09/17/2018 04:20 PM, Kees Cook wrote: >>> On Mon, Sep 17, 2018 at 4:10 PM, Mickaël Salaün wrote: >>>> Landlock, because it target unprivileged users, should only be called >>>> after all other major (access-control) LSMs. The admin or distro must >>>> not be able to change that order in any way. This constraint doesn't >>>> apply to current LSMs, though. >>> Good point! It will be easy to add LSM_ORDER_LAST, though, given the >>> machinery introduced in this series. >>> >> And when we have two LSMs that want to use that? > We'll cross that bridge when we come to it, but perhaps "last > exclusive"? (lsm.enable/disable to choose) If we define restrictions on use of LSM_ORDER_LAST like we have for LSM_ORDER_FIRST (only for capabilities) before anyone starts abusing it we may be OK. Since an LSM_ORDER_LAST has to know that it can't count on getting called (a non-last module may return -EACCES) I don't see any way that having multiple LSM_ORDER_LAST modules in any given order would be a real problem. Of course, a module could be doing state management that *really* requires it be last, but that would be a badly designed module and someone sensible would NAK it.