Re: [PATCH RFC] drivers/char/mem: byte generating devices and poisoned mappings

From: Kirill A. Shutemov
Date: Tue Apr 01 2014 - 12:08:43 EST


On Tue, Apr 01, 2014 at 07:15:31PM +0400, Konstantin Khlebnikov wrote:
> On Tue, Apr 1, 2014 at 2:36 PM, Kirill A. Shutemov <kirill@xxxxxxxxxxxxx> wrote:
> > On Tue, Apr 01, 2014 at 01:16:07AM +0400, Konstantin Khlebnikov wrote:
> >> This patch adds 256 virtual character devices: /dev/byte0, ..., /dev/byte255.
> >> Each works like /dev/zero but generates memory filled with particular byte.
> >
> > Shouldn't /dev/byte0 be an alias for /dev/zero?
> > I see you reuse ZERO_PAGE(0) for that, but what about all these special
> > cases /dev/zero has?
>
> What special cases? I found rss-accounting part, you've mentioned coredump.

I'm not sure what else is there. It's probably good idea to check all
users of vm_normal_page().

One thing is zero page coloring which some archs have.

--
Kirill A. Shutemov
--
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/