summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAmulya Y <ayarlagadda@nvidia.com>2018-04-05 14:30:07 -0700
committerWinnie Hsu <whsu@nvidia.com>2018-04-19 10:57:28 -0700
commitba7727c3c66d5bd035ed8df69c74a613a6a7f9da (patch)
treea744b40ad3bd1548f9d618e6d325f555402ede66 /kernel
parent9616bef14596d892b6f9c1292c15fe4758c51873 (diff)
cgroup: Correct the address format specifier
The format specifier %p can leak kernel addresses while not valuing the kptr_restrict system settings.The fix is designed to use %pK instead of %p, which also evaluates whether kptr_restrict is set. Bug 1823317 Bug 1935735 Change-Id: I19dc309e7f5341663add987f5d0b47ee32e1be50 Signed-off-by: Gagan Grover <ggrover@nvidia.com> Signed-off-by: Amulya Yarlagadda <ayarlagadda@nvidia.com> Reviewed-on: http://git-master/r/1260110 (cherry picked from commit d018ef6518a7527562bedae1eab86838cfcc0570) Reviewed-on: https://git-master.nvidia.com/r/1690299 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 05b36e7b9e6b..1e2c3588b990 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5449,7 +5449,7 @@ static int cgroup_css_links_read(struct cgroup *cont,
struct css_set *cg = link->cg;
struct task_struct *task;
int count = 0;
- seq_printf(seq, "css_set %p\n", cg);
+ seq_printf(seq, "css_set %pK\n", cg);
list_for_each_entry(task, &cg->tasks, cg_list) {
if (count++ > MAX_TASKS_SHOWN_PER_CSS) {
seq_puts(seq, " ...\n");