tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SIGBUS + coredump



On Fri, Jan 18, 2019 at 09:25:18AM -0800, Jason Thorpe wrote:
 > 
 > 
 > > On Jan 18, 2019, at 1:12 AM, Kamil Rytarowski <n54%gmx.com@localhost> wrote:
 > > 
 > >> ISTM that it would better to skip the page than write out zeros...
 > >> 
 > > 
 > > This behavior is also fine.
 > > 
 > > Should it be - in this example - a zero-sized segment?
 > 
 > Yes, at the VA where the tail-hole exists, I think you want p_memsz
 > to reflect the size of the tail-hole, but p_filesz should be 0.

That's equivalent to writing out zeros (but more efficient) -- I would
say the page shouldn't appear in the dump at all on the grounds that
it doesn't actually exist.

Whether it's ok to have an empty segment, I dunno. See if gdb chokes
on it :-)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index