Message ID | 97bee75c6b792f49e0b6331c922bd944591206ec.1615293276.git.vilhelm.gray@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=yaRN=IH=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,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 68E79C433DB for <linux-arm-kernel@archiver.kernel.org>; Tue, 9 Mar 2021 13:24:28 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 38B8C64EBB for <linux-arm-kernel@archiver.kernel.org>; Tue, 9 Mar 2021 13:24:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38B8C64EBB 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mcYv2IkhZJ7twHWzJICMJKm0/nloFvIlAAah20qw2ik=; b=IJ2GOhvmXQ16mIFJUPUfh3Ve8 Lmaj15M8l3jIu5r+N6esfNEVKUApwT3rw2BQSuQFXkISipx305spjPYChk9kZS+zOTwVWIQzOybv2 RobSCGQbh23jRwJw+1QWEzJxwaUg7Xe7/iBsQWhEXeZ+E5EBosEbFg3mnOxIi5WLlZ94djOo4iZGn YaK8tO+3OiPfwnC5vzUyI6JTsvk9LvfSJQlowCc/jk3ZsOvq03I8BfKtKnUSDKDr9n8P+1h7gVUSP UvTxMN3UTNhXeQN0S3deSmddMBJXPi8h0M9dvkIFFqD03//2iCBoeczetCLX6oFycN9uSKSChFyRW /hgWKDOnA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJcJd-004api-3H; Tue, 09 Mar 2021 13:22:25 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJcHu-004a5D-Lq for linux-arm-kernel@lists.infradead.org; Tue, 09 Mar 2021 13:20:43 +0000 Received: by mail-pg1-x52e.google.com with SMTP id v14so1827787pgq.2 for <linux-arm-kernel@lists.infradead.org>; Tue, 09 Mar 2021 05:20:38 -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=fGsMq/or5LrbS6jzzwVkZSD8zHMbssCRETsq5AlmHhk=; b=BF2JeSQcBj5jKUajNNhfuC3RoAx40evJrNJ4jcEXKRuM8WUBWCil6hP9b89RjeqSjF iZ3CxQf0Cb6OS5BbtCIonpLqvfb4F4SNvpGxRZV6tUojZBRM9sVIuLyq0Lj9P/ktOram /8kPcJ3OWmvbqzak0914vmxbQn4e+V0D4Wbe9zJcrlQgXsd8wjBx9qPUjRBgGPJnnig6 o6qyI2qyS77Oj9JBLyYKJJMiS8QZt2WaAMYoPuL6xFot8HvZGMGi5OI4lYh7AalKKfba ehY87TN+zKbUk6LJ4nErVtbaQONWCO/flWpdZ5CFWStInUtpqX+UrKEgDecCz27TXZes azuQ== 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=fGsMq/or5LrbS6jzzwVkZSD8zHMbssCRETsq5AlmHhk=; b=n0KVrwbeZnvf/Haalawo7vA6Br66ku2XX00IqlQvcInwelSjy0Q/+r0JwC7xUYGkca YZQquQSqccEaDhqDq7AXJ638NOC6cgPnCT2eg3NeyAqpIHC9qh8g+zhG1TuBj1s/HJ+4 07caFvDfNbJIvzvouzdDWB7GLr4nQ54xecNMfOCPhyxGQdhVdwKxGm2JsLuPA44hhfQ2 BkhHpkoVxdZSwq/seqitsYwNbNAd8V+cfDDofxbxJwCEBYw/wH4iBzsN3j5XNf0mEnv9 Q8myDwqYYAEL/1yXJfV1qVWH01JGCHNL6TRcsQ8h9UFJGlBKbHVF2SBO7VShpt7qToK5 Kw5g== X-Gm-Message-State: AOAM531bp4Dm6BjEHHn+oG5bRrdmUOSaJ81YYnI73pVtGYZVx/rY0ShU cbDM+aLGa5eW79stl3Zyu38= X-Google-Smtp-Source: ABdhPJxYMcx8TAwzEMsyNljEGsxrjAzaeLrqUb84oaUmvtU0ci1sM9AnHXfbQ8l6WsU4z40xxM0RXA== X-Received: by 2002:aa7:8d05:0:b029:1ec:b460:f21d with SMTP id j5-20020aa78d050000b02901ecb460f21dmr26014314pfe.29.1615296037168; Tue, 09 Mar 2021 05:20:37 -0800 (PST) Received: from localhost.localdomain ([156.146.35.76]) by smtp.gmail.com with ESMTPSA id y9sm7647421pfl.201.2021.03.09.05.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 05:20:36 -0800 (PST) From: William Breathitt Gray <vilhelm.gray@gmail.com> To: jic23@kernel.org Cc: kernel@pengutronix.de, linux-stm32@st-md-mailman.stormreply.com, a.fatoum@pengutronix.de, kamel.bouhara@bootlin.com, gwendal@chromium.org, alexandre.belloni@bootlin.com, david@lechnology.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, syednwaris@gmail.com, patrick.havelange@essensium.com, fabrice.gasnier@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, o.rempel@pengutronix.de, William Breathitt Gray <vilhelm.gray@gmail.com> Subject: [PATCH v9 05/33] counter: 104-quad-8: Annotate hardware config module parameter Date: Tue, 9 Mar 2021 22:19:18 +0900 Message-Id: <97bee75c6b792f49e0b6331c922bd944591206ec.1615293276.git.vilhelm.gray@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <cover.1615293276.git.vilhelm.gray@gmail.com> References: <cover.1615293276.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-20210309_132038_822685_E68A9C47 X-CRM114-Status: GOOD ( 19.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 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> 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 233a3acc1377..0fd61cc82d30 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(-)