Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp424175imm; Mon, 4 Jun 2018 21:10:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIx4Cgcy3MO1K3zxtPDYs/rL4BX4XxuBTRwQIK6NFGmecHRFYSLCe0dPCFlwkLI8i/qirgU X-Received: by 2002:a63:24c4:: with SMTP id k187-v6mr16679771pgk.434.1528171809327; Mon, 04 Jun 2018 21:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528171809; cv=none; d=google.com; s=arc-20160816; b=yrIAItSnE5k5qHXMLKtTR5ouail9FNWc6/aA4QZ5/OSt+KG8N7NDZjNeTD1tLLSa0J jiWGCroaoxMd7ytRvt5btQj/lJVw1C/LFw7yhP/IZXHabwscw5AwxaMZdTXoqpJepAsC ltwv9m/KunH+Xn2ZRu3sYuZfo1WtoXZNqbdml4cejAN9eRgJs67bKJEq0uPnunEv8R+X g/I1lNPzOfXvqc6ccZ2aF8y/BXImmnNTcQbh1Fj2JPDr9XmvNPsA/qvo6Wyea0a78p26 KUtabznIdIxbb8R3OYiNCYeLxXGy9MjS6JEj6X+g/xTZmEnUThwsbx0D0JvfJ34sdfUc QQMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=XosU6zlL9RwlUfrK6WalMtFh7ELBtcPWC8rYcvX+rxo=; b=MjbyP9VjCvpZmGdbvW+cgnmLSV0P64LC9z3WoHSGWp4BGxotzjSFwDjiSKlMm61Dq4 mhttQJtkCNutaMIVPCy2+BMoeMLcVcrf8k1+lxtbArVHY8gsFDzXF66DpUVLV0ZF7Nov qF/EiPu2A2fna7B5j3hqqXMOnX8xR0ftNSa5mlo4OIm9y/Q21qNd61qMCoVmK56wwskP oRplV86vCSo2bfKNhmUU6nFWIrJKa15B+qBzxilKMhT01XDV3nNU3CIXyjX5jSd84XCF CvNjIQwyPRKExjjIHPLftuziDbM8rUHYJZx4yuAGgDl12J53Nc01aHmfHEzNBtsLtVp+ xTlw== ARC-Authentication-Results: i=1; mx.google.com; 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 l1-v6si15494958plt.389.2018.06.04.21.09.55; Mon, 04 Jun 2018 21:10:09 -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; 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 S1751481AbeFEEJX (ORCPT + 99 others); Tue, 5 Jun 2018 00:09:23 -0400 Received: from h2.hallyn.com ([78.46.35.8]:41648 "EHLO mail.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751437AbeFEEJW (ORCPT ); Tue, 5 Jun 2018 00:09:22 -0400 Received: by mail.hallyn.com (Postfix, from userid 1001) id 52BAB1203FC; Mon, 4 Jun 2018 23:09:20 -0500 (CDT) Date: Mon, 4 Jun 2018 23:09:20 -0500 From: "Serge E. Hallyn" To: Kees Cook Cc: Mimi Zohar , Casey Schaufler , James Morris , Paul Moore , "Serge E. Hallyn" , linux-integrity , linux-security-module , LKML , David Howells , "Luis R . Rodriguez" , Eric Biederman , Kexec Mailing List , Andres Rodriguez , Greg Kroah-Hartman , Ard Biesheuvel , Jessica Yu Subject: Re: [PATCH v4 0/8] kexec/firmware: support system wide policy requiring signatures Message-ID: <20180605040920.GA19747@mail.hallyn.com> References: <1527616920-5415-1-git-send-email-zohar@linux.vnet.ibm.com> <1528121025.3237.116.camel@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Kees Cook (keescook@chromium.org): > On Mon, Jun 4, 2018 at 7:03 AM, Mimi Zohar wrote: > > On Tue, 2018-05-29 at 14:01 -0400, Mimi Zohar wrote: > >> Instead of adding the security_kernel_read_file LSM hook - or defining a > >> wrapper for security_kernel_read_file LSM hook and adding it, or > >> renaming the existing hook to security_kernel_read_data() and adding it > >> - in places where the kernel isn't reading a file, this version of the > >> patch set defines a new LSM hook named security_kernel_load_data(). > >> > >> The new LSM hook does not replace the existing security_kernel_read_file > >> LSM hook, which is still needed, but defines a new LSM hook allowing > >> LSMs and IMA-appraisal the opportunity to fail loading userspace > >> provided file/data. > >> > >> The only difference between the two LSM hooks is the LSM hook name and a > >> file descriptor. Whether this is cause enough for requiring a new LSM > >> hook, is left to the security community. > > > > Paul does not have a preference as to adding a new LSM hook or calling > > the existing hook. Either way is fine, as long as both the new and > > existing hooks call the existing function. > > > > Casey didn't like the idea of a wrapper. > > James suggested renaming the LSM hook. > > > > The maintainers for the callers of the LSM hook prefer a meaningful > > LSM hook name. The "null" argument is not as much of a concern. Only > > Eric seems to be asking for a separate, new LSM hook, without the > > "null" argument. > > > > Unless someone really objects, to accommodate Eric we'll define a new > > LSM hook named security_kernel_load_data. Eric, are you planning on > > Ack'ing patches 1 & 2? > > I'm sorry I'm late to review this series. Reading through what you > have, it seems like the existing hook is fine. If the name has > slipped, we can rename it, but I think adding another hook for the > same logical action (loading something into the kernel) is confusing. Personally I agree with Eric and prefer a new hook. I don't feel strongly enough about it to keep bikeshedding, but since this set already exists, it seems like the way to go. > It seems that only patches needed are 2 & 4 (new hook callsites), 5, 6 > & 7 (IMA coverage and policy). 1 and 8 seem needless to me. If the > objection is that isn't use on non-file objects, sure, rename it. But > I don't see a _logical_ difference between the proposed and existing > callsites. enum kernel_read_file_id covers the "type" already.... > > -Kees > > -- > Kees Cook > Pixel Security