From: Bryan R. <br...@ix...> - 2000-11-21 21:29:45
|
Jesper Skov wrote: > I don't agree. Nasty DOS you could get out of that - simply make an > infinite loop read from odd addresses and the kernel will be wasting > tons of time fixing up those accesses. User space apps should die if > they do unaligned access. As a tangential question, is there a way to have the build process (gcc/as/whatever) warn on unaligned access? Obviously there are some (most?) that it can't catch because the pointer changes at run time. But I would really like some error/warning if the linker places a structure's long on a non-long boundary, for instance. I guess what I'm also asking for is a pack or balign or similar directive that works in C, to prevent the problem in the first place. About three weeks ago, one of the guys here lost two days to a structure alignment issue that caused his thread to suddenly zombie after a misaligned memory access. I was a bit shocked at how the current kernel handled this problem... no kernel message, it just terminates the damn thing? For the non-buildtime alignment issues, could we have a build option in the kernel to correct them? (and a note about the potential DoS risk, which is irrelevant to most of us using embedded systems) Or at =least= do a printk? I understand the problems with the kernel workaround, but higher level developers should not have to worry about their process suddenly dying because of some architecture specific alignment behavior. I am bothered by the current behavior of just killing the process with no squawk... That is not robust, and is not easy to debug for people who are not completely familiar with all of the LinuxSH4 internals. Thanks, Bryan --- Bryan Rittmeyer mailto:br...@ix... Ixia Communications 26601 W. Agoura Rd. Calabasas, CA 91302 |