* [PATCH] kmemleak: change /sys/kernel/debug/kmemleak permissions from 0444 to 0644
@ 2017-10-06 11:39 Konstantin Khlebnikov
2017-10-06 13:55 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khlebnikov @ 2017-10-06 11:39 UTC (permalink / raw)
To: linux-mm, Andrew Morton, linux-kernel, Catalin Marinas
Kmemleak could be tweaked in runtime by writing commands into debugfs file.
Root anyway can use it, but without write-bit this interface isn't obvious.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
mm/kmemleak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 7780cd83a495..fca3452e56c1 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -2104,7 +2104,7 @@ static int __init kmemleak_late_init(void)
return -ENOMEM;
}
- dentry = debugfs_create_file("kmemleak", S_IRUGO, NULL, NULL,
+ dentry = debugfs_create_file("kmemleak", 0644, NULL, NULL,
&kmemleak_fops);
if (!dentry)
pr_warn("Failed to create the debugfs kmemleak file\n");
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kmemleak: change /sys/kernel/debug/kmemleak permissions from 0444 to 0644
2017-10-06 11:39 [PATCH] kmemleak: change /sys/kernel/debug/kmemleak permissions from 0444 to 0644 Konstantin Khlebnikov
@ 2017-10-06 13:55 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2017-10-06 13:55 UTC (permalink / raw)
To: Konstantin Khlebnikov; +Cc: linux-mm, Andrew Morton, linux-kernel
On Fri, Oct 06, 2017 at 02:39:25PM +0300, Konstantin Khlebnikov wrote:
> Kmemleak could be tweaked in runtime by writing commands into debugfs file.
> Root anyway can use it, but without write-bit this interface isn't obvious.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> ---
> mm/kmemleak.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
> index 7780cd83a495..fca3452e56c1 100644
> --- a/mm/kmemleak.c
> +++ b/mm/kmemleak.c
> @@ -2104,7 +2104,7 @@ static int __init kmemleak_late_init(void)
> return -ENOMEM;
> }
>
> - dentry = debugfs_create_file("kmemleak", S_IRUGO, NULL, NULL,
> + dentry = debugfs_create_file("kmemleak", 0644, NULL, NULL,
> &kmemleak_fops);
> if (!dentry)
> pr_warn("Failed to create the debugfs kmemleak file\n");
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
--
Catalin
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-06 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-06 11:39 [PATCH] kmemleak: change /sys/kernel/debug/kmemleak permissions from 0444 to 0644 Konstantin Khlebnikov
2017-10-06 13:55 ` Catalin Marinas
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).