Thread (37 messages) 37 messages, 7 authors, 2014-09-15

Re: [PATCH 1/2] sched: Add helper for task stack page overrun checking

From: Peter Zijlstra <peterz@infradead.org>
Date: 2014-09-04 15:30:54
Also in: lkml

On Thu, Sep 04, 2014 at 03:50:23PM +0100, Aaron Tomlin wrote:
quoted hunk ↗ jump to hunk
@@ -537,8 +535,8 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
 	printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n",
 		regs->nip);
 
-	stackend = end_of_stack(current);
-	if (current != &init_task && *stackend != STACK_END_MAGIC)
+	if (current != &init_task &&
+		task_stack_end_corrupted(current))
superfluous linebreak.
quoted hunk ↗ jump to hunk
@@ -2614,6 +2615,8 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
 }
 
 #endif
Here otoh we could do with some extra whitespace
quoted hunk ↗ jump to hunk
@@ -171,8 +170,8 @@ check_stack(unsigned long ip, unsigned long *stack)
 			i++;
 	}
 
-	if ((current != &init_task &&
-		*(end_of_stack(current)) != STACK_END_MAGIC)) {
+	if (current != &init_task &&
+		task_stack_end_corrupted(current)) {
Again, superfluous linebreak.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help