Re: 2.6.11-rc3: Kylix application no longer works?

From: Daniel Jacobowitz
Date: Wed Feb 09 2005 - 10:36:18 EST


On Tue, Feb 08, 2005 at 06:10:18PM -0800, Andrew Morton wrote:
> We could just remove the printk and stick a comment over it. If the
> application later tries to access the not-there pages then it'll just
> fault.
>
> However I worry if there is some way in which we can leave unzeroed memory
> accessible to the application, although it's hard to see how that could
> happen.
>
> Daniel, Pavel cruelly chopped you off the Cc when replying. What's your
> diagnosis on the below?

It's asking for a lot of unwritable zeroed space. See this:

> LOAD 0x000000 0x08048000 0x08048000 0xb7354 0x1b7354 R E 0x1000
> LOAD 0x0b7354 0x08200354 0x08200354 0x1e3e4 0x1f648 RW 0x1000

The 0xb7354 is size to map from the file, the 0x1b7354 is size to map
in memory. We're supposed to zero-fill the rest. Now that I think
about it I can see why this is a problem - the kernel probably assumes
that any segment with MemSiz > FileSiz will be writable. Certainly
it's a bit weird for the app to request unwritable zeroed pages.

clear_user's probably not the right way to provide the extra zeroing.

--
Daniel Jacobowitz
CodeSourcery, LLC
-
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/