* [PATCH] module: make the modinfo name const
@ 2017-06-29 1:32 Luis R. Rodriguez
2017-06-29 1:34 ` Kees Cook
2017-06-29 12:23 ` Jessica Yu
0 siblings, 2 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2017-06-29 1:32 UTC (permalink / raw)
To: jeyu, rusty; +Cc: keescook, linux-kernel, Luis R. Rodriguez
This can be accomplished by makine blacklisted() also accept const.
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
kernel/module.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index 5ebe3ae2519a..7d679f3bb892 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] module: make the modinfo name const
2017-06-29 1:32 [PATCH] module: make the modinfo name const Luis R. Rodriguez
@ 2017-06-29 1:34 ` Kees Cook
2017-06-29 12:23 ` Jessica Yu
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2017-06-29 1:34 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: Jessica Yu, Rusty Russell, LKML
On Wed, Jun 28, 2017 at 6:32 PM, Luis R. Rodriguez <mcgrof@kernel.org> wrote:
> This can be accomplished by makine blacklisted() also accept const.
Typo "making"
> Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
But otherwise:
Acked-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> kernel/module.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/module.c b/kernel/module.c
> index 5ebe3ae2519a..7d679f3bb892 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -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
>
--
Kees Cook
Pixel Security
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] module: make the modinfo name const
2017-06-29 1:32 [PATCH] module: make the modinfo name const Luis R. Rodriguez
2017-06-29 1:34 ` Kees Cook
@ 2017-06-29 12:23 ` Jessica Yu
1 sibling, 0 replies; 3+ messages in thread
From: Jessica Yu @ 2017-06-29 12:23 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: rusty, keescook, linux-kernel
+++ Luis R. Rodriguez [28/06/17 18:32 -0700]:
>This can be accomplished by makine blacklisted() also accept const.
>
>Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Applied, thanks!
>---
> kernel/module.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/kernel/module.c b/kernel/module.c
>index 5ebe3ae2519a..7d679f3bb892 100644
>--- a/kernel/module.c
>+++ b/kernel/module.c
>@@ -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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-29 12:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 1:32 [PATCH] module: make the modinfo name const Luis R. Rodriguez
2017-06-29 1:34 ` Kees Cook
2017-06-29 12:23 ` Jessica Yu
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).