linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Jessica Yu <jeyu@kernel.org>
Cc: Kees Cook <keescook@chromium.org>, Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] module: Prepare to convert all module_param_call() prototypes
Date: Tue, 17 Oct 2017 19:04:41 -0700	[thread overview]
Message-ID: <1508292283-140003-2-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1508292283-140003-1-git-send-email-keescook@chromium.org>

After actually converting all module_param_call() function prototypes, we
no longer need to do a tricky sizeof(func(thing)) type-check. Remove it.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 include/linux/moduleparam.h | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 1ee7b30dafec..037a90a522a5 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -228,18 +228,10 @@ struct kparam_array
 
 /* Obsolete - use module_param_cb() */
 #define module_param_call(name, set, get, arg, perm)			\
-	static const struct kernel_param_ops __param_ops_##name =		\
+	static const struct kernel_param_ops __param_ops_##name =	\
 		{ .flags = 0, (void *)set, (void *)get };		\
 	__module_param_call(MODULE_PARAM_PREFIX,			\
-			    name, &__param_ops_##name, arg,		\
-			    (perm) + sizeof(__check_old_set_param(set))*0, -1, 0)
-
-/* We don't get oldget: it's often a new-style param_get_uint, etc. */
-static inline int
-__check_old_set_param(int (*oldset)(const char *, struct kernel_param *))
-{
-	return 0;
-}
+			    name, &__param_ops_##name, arg, perm, -1, 0)
 
 #ifdef CONFIG_SYSFS
 extern void kernel_param_lock(struct module *mod);
-- 
2.7.4

  reply	other threads:[~2017-10-18  2:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18  2:04 [RESEND][PATCH 0/3] module: Do not paper over type mismatches in module_param_call() Kees Cook
2017-10-18  2:04 ` Kees Cook [this message]
2017-10-18  2:04 ` [PATCH 2/3] treewide: Fix function prototypes for module_param_call() Kees Cook
2017-10-18  2:04 ` [PATCH 3/3] module: Do not paper over type mismatches in module_param_call() Kees Cook
2017-10-18 10:12 ` [RESEND][PATCH 0/3] " Arnd Bergmann
2017-10-18 14:21   ` Kees Cook
2017-10-30 21:20 ` Kees Cook
2017-10-31 14:46   ` Jessica Yu
  -- strict thread matches above, loose matches on Subject: below --
2017-10-18  2:01 [PATCH 0/3] " Kees Cook
2017-10-18  2:01 ` [PATCH 1/3] module: Prepare to convert all module_param_call() prototypes Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1508292283-140003-2-git-send-email-keescook@chromium.org \
    --to=keescook@chromium.org \
    --cc=arnd@arndb.de \
    --cc=jeyu@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).