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: <1330965473-5401-1-git-send-email-paul.gortmaker@windriver.com>
Date:	Mon,  5 Mar 2012 11:37:53 -0500
From:	Paul Gortmaker <paul.gortmaker@...driver.com>
To:	siddhesh.poyarekar@...il.com, akpm@...ux-foundation.org
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: [PATCH] mm: fix task_nommu build regressions

Commit a69b756788619171e65c4d7081e9e3b8fbc4646a (linux-next)

  "procfs: mark thread stack correctly in proc/<pid>/maps"

introduced this failure on ARM's at91x40_defconfig:

In file included from fs/proc/task_nommu.c:3:
include/linux/mm.h: In function 'vm_is_stack_for_task':
include/linux/mm.h:1048: error: implicit declaration of function 'task_stack_page'
fs/proc/task_nommu.c: In function 'nommu_vma_show':
fs/proc/task_nommu.c:178: warning: no return statement in function returning non-void
fs/proc/task_nommu.c: At top level:
fs/proc/task_nommu.c:180: error: expected ')' before '\xa'
fs/proc/task_nommu.c:181: error: expected identifier or '(' before 'return'
fs/proc/task_nommu.c:182: error: expected identifier or '(' before '}' token

There are two reasons for the failure.  1) sched.h is needed for
task_stack_page, which is used by the newly added KSTK_ESP calls.
2) The above commit clearly left off an opening "{" in the line
"if (...) {" that it was altering.

Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>

diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index bdfff69..239fbd4 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -1,4 +1,5 @@
 
+#include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/file.h>
 #include <linux/fdtable.h>
@@ -170,7 +171,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
 		pad_len_spaces(m, len);
 		seq_path(m, &file->f_path, "");
 	} else if (mm) {
-		if (vm_is_stack(priv->task, vma, is_pid))
+		if (vm_is_stack(priv->task, vma, is_pid)) {
 			pad_len_spaces(m, len);
 			seq_puts(m, "[stack]");
 		}
-- 
1.7.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ