Re: [PATCH -mm 1/5] Blackfin: blackfin architecture patch update

From: Mike Frysinger
Date: Mon Mar 05 2007 - 21:04:30 EST


On 3/5/07, Paul Mundt <lethal@xxxxxxxxxxxx> wrote:
> +config DEBUG_HUNT_FOR_ZERO
> + bool "Catch NULL pointer reads/writes"
> + default y

Is this sane to have conditional?

yes ... with the ability to change the load address of the kernel, you
can create a reserved chunk of memory for users to utilize in their
custom kernel/userspace apps

an abuse of no-mmu to be sure ;)

> +#ifdef CONFIG_BUG
> +#define HAVE_ARCH_BUG
> +#define BUG() do { \
> + dump_stack(); \
> + printk(KERN_WARNING "\nkernel BUG at %s:%d!\n",\
> + __FILE__, __LINE__); \
> + panic("BUG!"); \
> +} while (0)
> +#endif
> +
> +#include <asm-generic/bug.h>
> +#endif

What do you need HAVE_ARCH_BUG for? You're not doing anything with it..

last i checked, the default BUG() does not include the dump_stack()
... if things have changed, then sure the generic bug implementation
is OK, otherwise this helps us with debugging
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/