module: make the modinfo name const
PATCH 1/1 module: make the modinfo name const
This can be accomplished by makine blacklisted() also accept const.
Signed-off-by Luis R. Rodriguez <[email protected]>
--- kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/module.c +2 -2
@@ -302,7 +302,7 @@ int unregister_module_notifier(struct notifier_block *nb)EXPORT_SYMBOL (unregister_module_notifier);struct load_info { -char *name; +const char *name;Elf_Ehdr *hdr;unsigned long len;Elf_Shdr *sechdrs;
@@ -3382,7 +3382,7 @@ int __weak module_frob_arch_sections(Elf_Ehdr *hdr,/* module_blacklist is a comma-separated list of module names */ static char *module_blacklist; -static bool blacklisted (char *module_name) +static bool blacklisted (const char *module_name) {const char *p;size_t len;
Signature · 1 line
2.10.2
Quoted 1 line · Luis R. Rodriguez
This can be accomplished by makine
blacklisted()also accept const.
Typo "making"
Quoted 1 line
Signed-off-by Luis R. Rodriguez <[email protected]>
But otherwise:
Acked-by Kees Cook <[email protected]>
-Kees
Quoted 29 lines
--- kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/module.c +2
-3@@ -302,7 +302,7 @@ int unregister_module_notifier(struct notifier_block *nb)EXPORT_SYMBOL (unregister_module_notifier);struct load_info { -char *name; +const char *name;Elf_Ehdr *hdr;unsigned long len;Elf_Shdr *sechdrs;@@ -3382,7 +3382,7 @@ int __weak module_frob_arch_sections(Elf_Ehdr *hdr,/* module_blacklist is a comma-separated list of module names */ static char *module_blacklist; -static bool blacklisted (char *module_name) +static bool blacklisted (const char *module_name) {const char *p;size_t len; --2.10.2
Signature · 2 lines
Kees Cook Pixel Security
Jessica Yu
Applied+++ Luis R. Rodriguez [28/06/17 18:32 -0700]:
Quoted 3 lines
This can be accomplished by makine
blacklisted()also accept const.Signed-off-by Luis R. Rodriguez <[email protected]>
Applied, thanks!
Quoted 29 lines
---
kernel/module.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)kernel/module.c +2
-2@@ -302,7 +302,7 @@ int unregister_module_notifier(struct notifier_block *nb)EXPORT_SYMBOL (unregister_module_notifier);struct load_info { -char *name; +const char *name;Elf_Ehdr *hdr;unsigned long len;Elf_Shdr *sechdrs;@@ -3382,7 +3382,7 @@ int __weak module_frob_arch_sections(Elf_Ehdr *hdr,/* module_blacklist is a comma-separated list of module names */ static char *module_blacklist; -static bool blacklisted (char *module_name) +static bool blacklisted (const char *module_name) {const char *p;size_t len;Signature · 1 line
2.10.2