Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp162889imm; Mon, 4 Jun 2018 15:03:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJKOADsAu86Po5kDL8x6Z4RQrHPpG5vz3OzY9Sd0qgqT7ylEorNU3+N3dD33rvWOROe11Vm X-Received: by 2002:a17:902:145:: with SMTP id 63-v6mr23752194plb.332.1528149832099; Mon, 04 Jun 2018 15:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528149832; cv=none; d=google.com; s=arc-20160816; b=0mlvBtlwF+tmmoh6quvkCre1C8BUrj+MIHGLX7k6U9Ctqt+EsoJZmYWQcze45TjFOK pKhnm8ClWz4OS/BmDmv9gjazAyCJXrQmNdjnK9whNCqiE8jLHX4MooEL5et/wj+5zUws caRkInsP6fn8Y8xIBdFr7tYZguYHWGnassu+rSoXHvSoanFsZyImD9AjGndzNfR45AEm S5uAGvnPHnF9EXfv8BAqjq3JeHSCMmV1tiPQN9ADrbZkOuOXsD1TQc2CVEP8Yf3yxhED lQTHq5++deJXS07A/5StVQJVTECO/e/pNr3Ogm4UCwJaKI148WKZqeEo1lvdSVvPFGmL BwmQ== 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 :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=N2l6a1WYXxr0Y2c+TSjLWpEkLc8zlo6Y/UZBknS/pyg=; b=Qchb/gS+WhMNY9FfWCS4JW75whirmNBjpFYih4KJP2mnvybBR0laCEyS7m0CrL5wOp rGuwyeVw6+JJJQI2FCLjpWYWN3jfOnoFNNj3fY1arnm7FJGUav1FscbTQX7PkotPlxCs 7I+lxFgidVzAQqzvUkB86W1sTdQiZV4lYIX7xisVWlONUyA4578mRA21cctdlXaIg+XC Tr/4xh9EAal888KO2Y0Xo0e6CHfhGeAbotYadlU2xzrG3SWyUSo9UuVqFsemLeKz88kc uAiKBBZkcuxEtRlOLLjf7OGIpeQvV3+jfwGsQbmX/LY6ZQKVIyAq2I6orC243Jodg4GA uvfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=UTlqTp8F; dkim=fail header.i=@chromium.org header.s=google header.b=RYugXKOX; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9-v6si45755896plb.522.2018.06.04.15.03.37; Mon, 04 Jun 2018 15:03:52 -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=fail header.i=@google.com header.s=20161025 header.b=UTlqTp8F; dkim=fail header.i=@chromium.org header.s=google header.b=RYugXKOX; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751509AbeFDWDF (ORCPT + 99 others); Mon, 4 Jun 2018 18:03:05 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:44136 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751464AbeFDWDD (ORCPT ); Mon, 4 Jun 2018 18:03:03 -0400 Received: by mail-vk0-f65.google.com with SMTP id x4-v6so135944vkx.11 for ; Mon, 04 Jun 2018 15:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=N2l6a1WYXxr0Y2c+TSjLWpEkLc8zlo6Y/UZBknS/pyg=; b=UTlqTp8F4C9D2vnvDy/0EFlZirx+UOko+aIH6Xxd8WoEasEvTX1VPWHd2aIblYXSuy jWan+X9w1UKG1oUCcmc81SGCVhCQuA0MRHIL5x+PWGDA7ZDu5FOLGRT8PXs5QawpQXZW ITlNTt4CRkFRqzAUrrmA5AzYRqKAcKqokJzlJ89Q9fI1ugiSE1JxuAHoMYP5qg0c2zuz 7HAjy68sDJyeBGdDwORvcWlBvZfM3j3LX/GMH0vpXFCI2WDB5Y88GNhEUG4P3lUC5R7n sJYDxCYdzFB1tM4vcBuCUXdJ5RyG9OdqiaPHKNWzKT8MMhC5F66hHksdu7R1J8nWlQ0N WuCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=N2l6a1WYXxr0Y2c+TSjLWpEkLc8zlo6Y/UZBknS/pyg=; b=RYugXKOXiIKcQBuD8ooDkoxQHDG5QpitF3VO9JCZeDhgiXAIlEOQS+uzQlZUp2Msbm 1PrzyhfH8L8Ny1BikOaizvbCC0fJUdxdAPMRZvyP3pG5NvIT6/fLbdLNW5i0hX8chdYX F+6OITmawqKbGSxg+ud14xHNz920dpNSCnH3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=N2l6a1WYXxr0Y2c+TSjLWpEkLc8zlo6Y/UZBknS/pyg=; b=gsVQGAHoOp8SifCjuwf41jLxDrnzmel1DVIvv2na4o3tP4LGZGVb/iLBP6JMDeBMTO BtEyWOBxvptlX/9FjpawOZq2y5FUrKYIiqK3D5WAm62QnMl8jX16Kw6YMvjEbGw4al+Y MrKs5V+ktivJj6rzl2LQ+uEJfP1GM7vSqiCrZ1yl82SmwgcmnorQp6M6/eZDfFpDJ4o9 rax1KXReYN9qmUqiAYgJIVsHIRq88v1PQy8roFpPKd3tnnaq9zh6GrkPmZVYFtRS1DDf 65HqtRPm+qjbseE7+74j1qV4WGC0WFw0lGaLnK8ucYPx9Bf5GxDkcwuaV0BQAq1+TIC5 k5/g== X-Gm-Message-State: ALKqPwc0vtV058uF2oFBylJGm2QGTsrx2hv5Ymvgp2a79s5bVPlbrKAz 61kTtIvSAFaw4zM+Vjkyw0tBen3EU1KUIe3Jl20RLA== X-Received: by 2002:a1f:78a:: with SMTP id 132-v6mr15171442vkh.96.1528149781974; Mon, 04 Jun 2018 15:03:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:a085:0:0:0:0:0 with HTTP; Mon, 4 Jun 2018 15:03:01 -0700 (PDT) In-Reply-To: <1528121025.3237.116.camel@linux.vnet.ibm.com> References: <1527616920-5415-1-git-send-email-zohar@linux.vnet.ibm.com> <1528121025.3237.116.camel@linux.vnet.ibm.com> From: Kees Cook Date: Mon, 4 Jun 2018 15:03:01 -0700 X-Google-Sender-Auth: qAmtPcDbTkBG7pKXqGyycWIw_og Message-ID: Subject: Re: [PATCH v4 0/8] kexec/firmware: support system wide policy requiring signatures To: Mimi Zohar Cc: 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 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 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. 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