Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2209101ybd; Thu, 27 Jun 2019 08:31:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTJZD3OtiqLmZzJH+HtMNxSndnq9vBEzoPhwgq3oKerLnRgeUt3cCUvZDbpmPqnFOECtPH X-Received: by 2002:a63:4c46:: with SMTP id m6mr4453966pgl.59.1561649507065; Thu, 27 Jun 2019 08:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561649507; cv=none; d=google.com; s=arc-20160816; b=hHao2PRtw2NW/ezfx9MqMMJ7lb15noXk7312BdrKmK3slR2ZGFn0+q1+YSLi3Q2rXC EstfyaKFerxThshzfAC/UqDge1T8ywkU/zVzV6+GzBwMtbpHhZUfFFwtHESoEZ0Bt/Jv ES9wErMuFzQl7ecLMUOWwPihTlCMs7vZ+UrbctOFi/enPaiWiQ8eHXb6mDH6VrqupEIf WRg+9fdUd0W0H9EcnXErDCN9gDLMoOmKVnk+q/cje+OONaD7hWO4C3iTZOICQ6KARAEN lOpwKbm7qm806TbUPtYn8VYOnf/PSSrWEOIGT8ASKz+XyAPSbYNZhU+o181VDpAue0Ym S7pw== 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=TuO/waTdEbRopCnF+YINnarVye+qG1Wu8zI6yO1vq2Q=; b=xLZvi+DcozF8GIBjfMdxyrMctajnS3mezWAsHeehXiwPJHoSab8lKKtonlTyz2tAMy vDifsKMtN6iWd7npD1Qs8EK4yesSUexO247Wcn2xJBRm59w2OxCxItE2xLMBcmH0A2br 91qbudjP9snYlJ1PWtGRvi5dnOZyv5DQ7kubjL4OAADYPo1JALwMcseU0iaLbQhZjM8v lep1fbjBwHBDraFTg215hmLLOuwvRh4IKWRIcrzEdbNRAQryHfeFl1+m8H9rGQiJzTDc 7gtoLWZzAaEA43JildYEnarMLKEMVUMIH8tXgg9hO4ZpjA1cGmh0EnHTId6/RmOZsdXn PvFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nnW95Nc4; 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 b19si2888601pfi.175.2019.06.27.08.31.30; Thu, 27 Jun 2019 08:31:47 -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=nnW95Nc4; 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 S1726558AbfF0PbG (ORCPT + 99 others); Thu, 27 Jun 2019 11:31:06 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:40046 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbfF0PbG (ORCPT ); Thu, 27 Jun 2019 11:31:06 -0400 Received: by mail-io1-f67.google.com with SMTP id n5so5657965ioc.7 for ; Thu, 27 Jun 2019 08:31:05 -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=TuO/waTdEbRopCnF+YINnarVye+qG1Wu8zI6yO1vq2Q=; b=nnW95Nc4Sck+SCyLDWb6ekZqtVJR9gFDsyfjGL4qdTmxCKqSDzLNB+q6JY04BCTCox rNzxKwwVKDRt6j/nSCWITR4woKO3Bg6Pi4yh4DIx201Y7mmDE2vv9BJlTOgg0nWuLodi hRrheHz1Qb7gI7AH1/e+uD16A64/DMlbPbvG0GMFSoHN4QgrKWYC61U11c2JmgwNL4fd 57IHFuNC5SRqpkx1wImVnhsWW7VQAb4Gj74fRFKt/WKH/hZHSXsN2VBtrqFRwm0yMHvP qISmxHrhDrDGrXqYK7CvD9tSjcj8q5EF7ls1Z6zh/pEeXldbhUMy3yPshERw4SLH5ZjI zL3A== 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=TuO/waTdEbRopCnF+YINnarVye+qG1Wu8zI6yO1vq2Q=; b=k5OWqBx/Ibm3lXrscmzW6eSr3jLU0xIThgNEX/jtu7FlxnssUGMBKKPVo5OAyTpvZ+ kU55F+ZugxUBSTc1plv798Tbb2jyknMS0d7udxthYg8BoZIv2JNluO6jlHbKBelhNaz9 uR9X+WFKhfc4Ua5rD8ingeBZgLFGyTQvmuxZvRSvbjvUpFsV0nXkf7V9XedABBEpNk4V 8XEWQpOB3nscTnyglONEOm5McHfn6EucyMHn9QraeRX/AR4SMgUM4HILgbskYNGM6oKs lpLDRSSLyxyS00aCAmaCbKa5pqanjNEp6wG6aKBZk4a4rS4bWBgslWVoHDT1M3xebkJy SUuA== X-Gm-Message-State: APjAAAWCotCuBvgU3gYkbsLvrtU3jv2d6Q3MuEwy/aP9MWqnPKngCn/A PRDu3OOBh6IAhLYH+cHcNSW3sM0lPP969EzqZ1jGMA== X-Received: by 2002:a6b:b790:: with SMTP id h138mr5109103iof.64.1561649464641; Thu, 27 Jun 2019 08:31:04 -0700 (PDT) MIME-Version: 1.0 References: <20190622000358.19895-1-matthewgarrett@google.com> <20190622000358.19895-20-matthewgarrett@google.com> <87ef3f3ihh.fsf@dja-thinkpad.axtens.net> In-Reply-To: <87ef3f3ihh.fsf@dja-thinkpad.axtens.net> From: Matthew Garrett Date: Thu, 27 Jun 2019 08:30:52 -0700 Message-ID: Subject: Re: [PATCH V34 19/29] Lock down module params that specify hardware parameters (eg. ioport) To: Daniel Axtens Cc: James Morris , LSM List , Linux Kernel Mailing List , Linux API , David Howells , Alan Cox 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 Wed, Jun 26, 2019 at 6:49 PM Daniel Axtens wrote: > > Matthew Garrett writes: > > + if (kp->flags & KERNEL_PARAM_FL_HWPARAM && > > + security_locked_down(LOCKDOWN_MODULE_PARAMETERS)) > > + return false; > > + return true; > > } > > Should this test occur before tainting the kernel? Seems reasonable.