From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752005AbbATFqT (ORCPT ); Tue, 20 Jan 2015 00:46:19 -0500 Received: from ozlabs.org ([103.22.144.67]:55449 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751932AbbATFqR (ORCPT ); Tue, 20 Jan 2015 00:46:17 -0500 From: Rusty Russell To: Dmitry Torokhov , Greg Kroah-Hartman , "Luis R . Rodriguez" , Tejun Heo Cc: linux-kernel@vger.kernel.org, Arjan van de Ven , Olof Johansson , Tetsuo Handa Subject: Re: [PATCH 7/8] module: add core_param_unsafe In-Reply-To: <1421451197-19723-8-git-send-email-dmitry.torokhov@gmail.com> References: <1421451197-19723-1-git-send-email-dmitry.torokhov@gmail.com> <1421451197-19723-8-git-send-email-dmitry.torokhov@gmail.com> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Tue, 20 Jan 2015 16:13:38 +1030 Message-ID: <87vbk2atx1.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dmitry Torokhov writes: > Similarly to module_param_unsafe(), add the helper to be used by core > code wishing to expose unsafe debugging or testing parameters that taint > the kernel when set. > > Signed-off-by: Dmitry Torokhov Acked-by: Rusty Russell Thanks, Rusty. > --- > include/linux/moduleparam.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h > index 1392370..6480dca 100644 > --- a/include/linux/moduleparam.h > +++ b/include/linux/moduleparam.h > @@ -310,6 +310,15 @@ static inline void __kernel_param_unlock(void) > #define core_param(name, var, type, perm) \ > param_check_##type(name, &(var)); \ > __module_param_call("", name, ¶m_ops_##type, &var, perm, -1, 0) > + > +/** > + * core_param_unsafe - same as core_param but taints kernel > + */ > +#define core_param_unsafe(name, var, type, perm) \ > + param_check_##type(name, &(var)); \ > + __module_param_call("", name, ¶m_ops_##type, &var, perm, \ > + -1, KERNEL_PARAM_FL_UNSAFE) > + > #endif /* !MODULE */ > > /** > -- > 2.2.0.rc0.207.ga3a616c