Re: [PATCH] Fix max-stack calculators to skip canary

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Joe Perches
Date: Tuesday, April 22, 2008 - 10:33 am

On Tue, 2008-04-22 at 12:18 -0500, Eric Sandeen wrote:

Wouldn't it be better to have exactly the same code?
How about using a statement expression macro?

#define DEBUG_STACK_FREE(process) \
({ \
	unsigned long *n = end_of_stack(process); \
	do { 	/* Skip over canary */\
		n++; \
	} while (!*n); \
	(unsigned long)n - (unsigned long)end_of_stack(process); \
})

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix max-stack calculators to skip canary, Eric Sandeen, (Tue Apr 22, 10:18 am)
Re: [PATCH] Fix max-stack calculators to skip canary, Joe Perches, (Tue Apr 22, 10:33 am)
Re: [PATCH] Fix max-stack calculators to skip canary, Eric Sandeen, (Tue Apr 22, 11:09 am)
Re: [PATCH] Fix max-stack calculators to skip canary, Ingo Molnar, (Mon Apr 28, 10:28 am)