On Tue, Mar 29, 2011 at 12:05 PM, erik quanstrom <quans...@labs.coraid.com> wrote: > On Tue Mar 29 12:48:21 EDT 2011, fors...@terzarima.net wrote: >> in fact, even 64k might be too big a value for the given buf if it's near the >> top of memory (eg, a local variable on a stack that's in high memory); >> the PowerPC reference in the original comment is misleading because that >> was just a particular system where the general problem appeared. > > if that's the case, isn't this already a bug. the stack doesn't go past > the end of memory, so how could sprint(buf, "x") not overwrite junk > past the end of the stack anyway? > > also, since this is the kernel, you either get a 4k or a 4k - sizeof(Mach) > structure (depending on if up is set or not), so the maximum sprint > to something on the stack is always going to be < 4k.
This discussion is why I did not want to apply that patch, even though it helps. I just want to make sure I understand the issues and was not convinced I did. ron