Message ID | b16b0f7e882a80924d785f022f8ff6b160f9d288.1613131238.git.vilhelm.gray@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=WxR5=HO=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3E77C433E0 for <linux-arm-kernel@archiver.kernel.org>; Fri, 12 Feb 2021 12:16:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5309A64E30 for <linux-arm-kernel@archiver.kernel.org>; Fri, 12 Feb 2021 12:16:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5309A64E30 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DwY1xCsTAWiihk6MSgoKbRmr8ldvWOhmXRnIjHz9Rzo=; b=nb6jfFOLV04liH/U0ts0O/7Cf x0aQ6wq+ky1hjgyc6zb7SDiljlVadM+VE4zfvgwMdtdxwUFe+jIb8D7zRfsmifu84I5wMvFU+qRfu wOJ6Y3DWuV0OpyWBv6QLHzg45HsXrfgBI1X+jp6VJF+ona6pM4hlVwp3tUq6GnGy5KQFSKPNSASSK 0PAKY13j2p8C6dshm47iI46SWhYu1ELp7/HrRsitWvOwSZHIurAfJzPkhDFtp+7bCrpypLm8Lctpu y6SzMlel3iJw9gwICt625eDfyV6oQJRT4x+IssSgF0QRb4Wckp/F/YSjwB44evvds8a7lt26m8Hii VvB2XeNyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAXLF-0006GX-Os; Fri, 12 Feb 2021 12:14:33 +0000 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAXL6-0006Dl-D2 for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2021 12:14:25 +0000 Received: by mail-qk1-x72d.google.com with SMTP id m144so8400158qke.10 for <linux-arm-kernel@lists.infradead.org>; Fri, 12 Feb 2021 04:14:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6xiffz/2juDPYZZmbqjFbaJKECdvS7YcRGaS6EInCRI=; b=mZwTrnYBpzn4XVHU4cjflgs4dw3om1p7+bsPTTIGiZD2NCewK4MDA6YLmPTaDa6DMu Ge04VhdsHPF4MRQu30KIcCqwXytSwbkASdr+K1rrR67Uv9HT8pQZivCSWDLOaNXHa+3M TGh9iaQ4NiaLDiIFFXI1FEPic/hMSPuaFhzexZOXuh9Mc6E5AxBlw1Mnt7EhujKKYvK3 sWRt1tNWuoZz4jm/M7mZWE2JOvL1aQF6cEuA5eracV6uuSMk+BARM+N/EVLNw/fUJA4v 7kebs8UyURXh0sS+M8bV0F8gP2jaAGrrDKi6gl38qEe+fn80R4JoTK3zJb+lSPfxZKxI +ZBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6xiffz/2juDPYZZmbqjFbaJKECdvS7YcRGaS6EInCRI=; b=LBcqwkfqgwuP2RWhu7YoGUlmy0LnupO2NDE7Nxti1X2oMDCS+KUKD1C70JvoLpcqx7 3cTkO3cicg/HRr1F7TqOtvlheu9bmUIIt04aERwZCUXfHykAwymIlZbdgUw3w1lA2QL6 tzD+4v9I+u6yxy73oktL13NTA435UftN3jaR3cVbIsbtSglCCIwyYM1f8BlxHePqjZDe oYqP7pma6XleM9Xut9RU3lhSj5PBMZfUrcC82dLAOegU99FOFlizYK3QNO3wf1kIO18U yF3oqwnqfxxCcRN4+/dfoSi+SRyLW9xnB4pJa5SLzx4pKfnp6GKN7BEgkprwoebnjV8x cAxw== X-Gm-Message-State: AOAM531fQbFrkDlwi5bRYFaAkQPI98+Z/iSXmkmYBUOQIkvUPDql6hJa FOYZAAHuVRSuO256GvBzpZo= X-Google-Smtp-Source: ABdhPJwoTxWbQejBvfQ1z5Et+JABQcqujW3McbDYqiMJyzm1dfG/tggH8StL/8Q1BhTbF/53po07Dw== X-Received: by 2002:a37:6cc6:: with SMTP id h189mr1325495qkc.195.1613132062689; Fri, 12 Feb 2021 04:14:22 -0800 (PST) Received: from localhost.localdomain ([193.27.12.132]) by smtp.gmail.com with ESMTPSA id y135sm6278534qkb.14.2021.02.12.04.14.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 04:14:22 -0800 (PST) From: William Breathitt Gray <vilhelm.gray@gmail.com> To: jic23@kernel.org Subject: [PATCH v8 04/22] counter: 104-quad-8: Annotate hardware config module parameter Date: Fri, 12 Feb 2021 21:13:28 +0900 Message-Id: <b16b0f7e882a80924d785f022f8ff6b160f9d288.1613131238.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <cover.1613131238.git.vilhelm.gray@gmail.com> References: <cover.1613131238.git.vilhelm.gray@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210212_071424_483983_FFBD82FE X-CRM114-Status: GOOD ( 18.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: kamel.bouhara@bootlin.com, gwendal@chromium.org, a.fatoum@pengutronix.de, david@lechnology.com, linux-iio@vger.kernel.org, patrick.havelange@essensium.com, alexandre.belloni@bootlin.com, mcoquelin.stm32@gmail.com, linux-kernel@vger.kernel.org, o.rempel@pengutronix.de, kernel@pengutronix.de, William Breathitt Gray <vilhelm.gray@gmail.com>, fabrice.gasnier@st.com, syednwaris@gmail.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, alexandre.torgue@st.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Introduce the Counter character device interface
|
expand
|
diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c index f0608b21196a..37551d3016de 100644 --- a/drivers/counter/104-quad-8.c +++ b/drivers/counter/104-quad-8.c @@ -21,7 +21,7 @@ static unsigned int base[max_num_isa_dev(QUAD8_EXTENT)]; static unsigned int num_quad8; -module_param_array(base, uint, &num_quad8, 0); +module_param_hw_array(base, uint, ioport, &num_quad8, 0); MODULE_PARM_DESC(base, "ACCES 104-QUAD-8 base addresses"); #define QUAD8_NUM_COUNTERS 8
When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates the 104-QUAD-8 driver. Cc: Syed Nayyar Waris <syednwaris@gmail.com> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> --- drivers/counter/104-quad-8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)