Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp940172ybe; Wed, 4 Sep 2019 09:59:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+2JInn+pKLo0kbDPHxvc40T5//ZjbgIr4xOyg7Dw+DWbDQDxuey38h/i4MU2RD/EU4foB X-Received: by 2002:a62:cd45:: with SMTP id o66mr48199251pfg.112.1567616347925; Wed, 04 Sep 2019 09:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567616347; cv=none; d=google.com; s=arc-20160816; b=Ii5BzChBX5Y1qgrl38bss0u+I84ka6lRabEY6p0MndTJ7kxc79vS6aGrRtnWjH8TFl ZT6n2Hpj+ZZwhtYC4mgZKoj6Lx0/3t2nXdm74P8tKvSAFWPlH5SuK2ajlfHZotiNmFGz K07qiLp4GO9iuxaJgCgTwArotl686jN3/9rUClShAZen8TD2fRugdONfhTVH/2DlbRZE vwA2dfn7ShfvuP4NA3XyLD+Z57PKu5IFILQmmbroBTh1bNjulOeV1GgRQT21kC1+PM+E ZOlBg/EuWEMBmEHXsn8IRNwn/obupFr7qi3UPCldVljEON/x7SyExc1am3EC4EfUnU9g HB4g== 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 :in-reply-to:references:mime-version:dkim-signature; bh=I4AEVHZWDKj5M3XNGlUJpNgGM5Z1l9AtMPF1Hqde4DM=; b=zn++M1oa13N3EQi5a9czeE02HqjdaZHuWdNukC4iM7ebM7rP89BOJsx7d7kazifDmN 3dz1wjFZsaPAbd6bi2m1+IbCO7BjDjt6YvPHR7p5bJ2ZtkzltGWyd0yq2aHxWV0o+7X8 YKFgtOEtY7LeOEe5epcdCDwgmK3eLQDoZqorBlgKKxNkAXRgndLTWsbPzRSwwIe0rV5i fgqQKLGsevBJX/6uKrtYDl3xeHl4ou30ub8/dQFOKFA9PYg2y/b+mBMQrJURgDDdV6AY FDx1EMzkuAYHQwW7QIFop82SCb4mEmS1svHtBFahFvsg4NYdeFU52ZPf+6PtPW4gmpVz Jhhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=asWc2sqI; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si11012443pfn.277.2019.09.04.09.58.51; Wed, 04 Sep 2019 09:59:07 -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=@google.com header.s=20161025 header.b=asWc2sqI; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732313AbfIDQ6E (ORCPT + 99 others); Wed, 4 Sep 2019 12:58:04 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:34104 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731564AbfIDQ6E (ORCPT ); Wed, 4 Sep 2019 12:58:04 -0400 Received: by mail-io1-f68.google.com with SMTP id s21so45824338ioa.1 for ; Wed, 04 Sep 2019 09:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I4AEVHZWDKj5M3XNGlUJpNgGM5Z1l9AtMPF1Hqde4DM=; b=asWc2sqIHddJtfzpGPSflNT5pALrlHIbgF4I0kHpFB1oZPYM9gDBwVZGGi7OtxWdXG PPLjQaihV0MOd2qP3s+pRow5caaVDzoXH65KvyTmbH6UL6DMpMt+2d17Z1AfLZjo8ep3 hMdZZxJELA2F5afBUr10xth92mqJc8bLt5d+nWpYIUhxfUurKK4W4Emy+SQnkZRhYi4G hjZKiEtB39XoumJNkg1WOWUEmIA6i+ZwBZtg7rStpIivhqv8ekIGDdUZmtoLo/uQshqW SgwZHF7mgB/lRouNZ4D25erP6OjzyBkkz78zvxvjAEX6cR1uHIpXgziTDvHHsZpY0+ny O8Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I4AEVHZWDKj5M3XNGlUJpNgGM5Z1l9AtMPF1Hqde4DM=; b=ex4B+GDqieMOWMS3ku+HmPNAH/vOxvcMJS6yQRr2NxBRfBS8EGtjS7gQTm6kJraOwb e2ukJG42bOPTyxoad5MP/tMJLsqMwAw4dTvFQRJA8Bb26+rvBS+EBIevc3DmVqAE4QJR N/SKIWpRg+6RgthvjKtW+kFhOpvMrJq4co2z53dHI9BOV/aveM9EFW93+XLd5RgmiLuO KFBWu8ElDAu2ho13cLs3vZBJbQcwNfH5oaQmooJDmb7O3FkGirUyr03XDhjvnnByRW+X qQ686MAAidq3vztiVMuZYuDEBI8oc6MqWsSudffNr+CBHQeYsO92G2i8D6T+a/OvvZJ0 vl4Q== X-Gm-Message-State: APjAAAWVpwndjYL1c1Rg4jMC8TEZaNWeks8XFf63AJ59+TFkR5RlzQLI rGhGACiyOBcj+/JaJ6W4JHYli4F16JI16v8Rpp35sQ== X-Received: by 2002:a02:354b:: with SMTP id y11mr17856473jae.53.1567616283414; Wed, 04 Sep 2019 09:58:03 -0700 (PDT) MIME-Version: 1.0 References: <20190820001805.241928-1-matthewgarrett@google.com> <20190820001805.241928-5-matthewgarrett@google.com> <3638.1567182673@warthog.procyon.org.uk> In-Reply-To: <3638.1567182673@warthog.procyon.org.uk> From: Matthew Garrett Date: Wed, 4 Sep 2019 09:57:52 -0700 Message-ID: Subject: Re: [PATCH V40 04/29] lockdown: Enforce module signatures if the kernel is locked down To: David Howells Cc: James Morris , LSM List , Linux Kernel Mailing List , Linux API , Kees Cook , 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 Fri, Aug 30, 2019 at 9:31 AM David Howells wrote: > > Matthew Garrett wrote: > > > enum lockdown_reason { > > LOCKDOWN_NONE, > > + LOCKDOWN_MODULE_SIGNATURE, > > LOCKDOWN_INTEGRITY_MAX, > > LOCKDOWN_CONFIDENTIALITY_MAX, > > }; > > Aren't you mixing disjoint sets? The goal is to be able to check whether any given lockdown reason is a matter of integrity or confidentiality in a straightforward way. > > + [LOCKDOWN_MODULE_SIGNATURE] = "unsigned module loading", > > Wouldn't it be better to pass this string as a parameter to > security_locked_down()? I thought about that, but it's not how any other LSM hooks behave. I think it's probably easier to revisit that when we see how other LSMs want to make use of the data.