Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753845AbdDRMid convert rfc822-to-8bit (ORCPT ); Tue, 18 Apr 2017 08:38:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39238 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbdDRMia (ORCPT ); Tue, 18 Apr 2017 08:38:30 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0CF7C8124D Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dhowells@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0CF7C8124D Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <149141141298.29162.5612793122429261720.stgit@warthog.procyon.org.uk> <149141142839.29162.10470212173396183651.stgit@warthog.procyon.org.uk> To: Thomas Gleixner Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk, gregkh@linuxfoundation.org, nouveau@lists.freedesktop.org, x86@kernel.org, Steven Rostedt , linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, "H. Peter Anvin" , Ingo Molnar Subject: Re: [PATCH 02/38] Annotate hardware config module parameters in arch/x86/mm/ MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10431.1492519106.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 18 Apr 2017 13:38:26 +0100 Message-ID: <10432.1492519106@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 18 Apr 2017 12:38:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1249 Lines: 32 Thomas Gleixner wrote: > > -module_param(mmio_address, ulong, 0); > > +module_param_hw(mmio_address, ulong, iomem, 0); > > MODULE_PARM_DESC(mmio_address, " Start address of the mapping of 16 kB " > > "(or 8 MB if read_far is non-zero)."); > > The copied boilerplate above is really nonsensical here. The default > address is 0, so the init function will emit: > > pr_err("you have to use the module argument mmio_address.\n"); > pr_err("DO NOT LOAD THIS MODULE UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!\n"); > > Pretty useless when you can't supply a valid address. > > if (kernel_locked_down()) { > pr_info("This is not allowed because ..."); > return -EPERM; > } > > would make too much sense for the user, right? In some drivers, this would be wrong - ipmi, for example - and we've already been through this. The hwparam series of patches annotates *all* ioport/iomem/irq/dma specifiers unconditionally. The hwparam series is the way it is is because this has no overhead if it's not used - and also has the potentially useful side effect of making such parameters greppable. It may well make sense to add your above suggestion also - but in the other patch series. David