lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220412071946.2532318-1-xu.xin16@zte.com.cn>
Date:   Tue, 12 Apr 2022 07:19:46 +0000
From:   cgel.zte@...il.com
To:     bsingharora@...il.com, akpm@...ux-foundation.org
Cc:     linux-kernel@...r.kernel.org, yang.yang29@....com.cn,
        xu xin <xu.xin16@....com.cn>
Subject: [PATCH] kernel: make taskstats available from all net namespaces

From: xu xin <xu.xin16@....com.cn>

If getdelays run in a non-init network namespace, it will fail in
getting delayacct stats even if it has privilege of root user, which
seems to be not very reasonable. We can simply reproduce this by
executing commands:
	unshare -n
	getdelays -d -p <pid>

I don't think net namespace should be an obstacle to the normal
execution of getdelay function. So let's make it available from
all net namespaces.

Signed-off-by: xu xin <xu.xin16@....com.cn>
---
 kernel/taskstats.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index 72415e22342b..f7e246336218 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -688,6 +688,7 @@ static struct genl_family family __ro_after_init = {
 	.module		= THIS_MODULE,
 	.ops		= taskstats_ops,
 	.n_ops		= ARRAY_SIZE(taskstats_ops),
+	.netnsok	= true,
 };
 
 /* Needed early in initialization */
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ