All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jia Zhang <zhang.jia@linux.alibaba.com>
To: jeyu@kernel.org
Cc: linux-kernel@vger.kernel.org, zhang.jia@linux.alibaba.com
Subject: [PATCH 2/4] module: Create the entry point initialize_module()
Date: Thu,  8 Mar 2018 12:27:01 +0800	[thread overview]
Message-ID: <1520483223-6596-3-git-send-email-zhang.jia@linux.alibaba.com> (raw)
In-Reply-To: <1520483223-6596-1-git-send-email-zhang.jia@linux.alibaba.com>

This entry point currently includes the procfs initialization,
and will include a securityfs initialization.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
---
 kernel/module.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/kernel/module.c b/kernel/module.c
index 003d0ab..79825ea 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -4243,7 +4243,11 @@ static int __init proc_modules_init(void)
 	proc_create("modules", 0, NULL, &proc_modules_operations);
 	return 0;
 }
-module_init(proc_modules_init);
+#else	/* CONFIG_PROC_FS */
+static int __init proc_modules_init(void)
+{
+        return 0;
+}
 #endif
 
 /* Given an address, look for it in the module exception tables. */
@@ -4388,3 +4392,11 @@ void module_layout(struct module *mod,
 }
 EXPORT_SYMBOL(module_layout);
 #endif
+
+static int __init initialize_module(void)
+{
+	proc_modules_init();
+
+	return 0;
+}
+module_init(initialize_module);
-- 
1.8.3.1

  parent reply	other threads:[~2018-03-08  4:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08  4:26 [PATCH v2 0/4] modsign enhancement Jia Zhang
2018-03-08  4:27 ` [PATCH 1/4] module: Do not access sig_enforce directly Jia Zhang
2018-03-08  4:27 ` Jia Zhang [this message]
2018-03-08  4:27 ` [PATCH 3/4] module: Support to show the current enforcement policy Jia Zhang
2018-03-08  4:27 ` [PATCH 4/4] module: Support to disable validity enforcement in runtime Jia Zhang
2018-03-12 13:28 ` [PATCH v2 0/4] modsign enhancement Jessica Yu
2018-03-12 14:15   ` Jia Zhang
  -- strict thread matches above, loose matches on Subject: below --
2018-03-01  9:09 [PATCH 1/4] module: Do not access sig_enforce directly Jia Zhang
2018-03-01  9:09 ` [PATCH 2/4] module: Create the entry point initialize_module() Jia Zhang

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=1520483223-6596-3-git-send-email-zhang.jia@linux.alibaba.com \
    --to=zhang.jia@linux.alibaba.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.