Matt Mackall writes: > Add /proc/pid/pagemap interface > > This interface provides a mapping for each page in an address space to > its physical page frame number, allowing precise determination of what > pages are mapped and what pages are shared between processes.
[...] > > +#ifdef CONFIG_PROC_PAGEMAP > +struct pagemapread { > + struct mm_struct *mm; > + unsigned long next; > + unsigned long *buf; > + unsigned long pos; > + size_t count; > + int index; > + char __user *out; > +}; > + > +static int flush_pagemap(struct pagemapread *pm) > +{ > + int n = min(pm->count, pm->index * sizeof(unsigned long)); > + if (copy_to_user(pm->out, pm->buf, n)) > + return -EFAULT; This pushes binary data to the user space. Wasn't /proc supposed to be ascii-based to avoid compatibility problems (e.g., size of unsigned long changing, endianness, etc.)? Nikita. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/