Re: [RFC 1/3] x86/vdso: create vdso file, use it for mapping
From: Al Viro
Date: Fri Sep 02 2016 - 20:08:18 EST
On Mon, Aug 29, 2016 at 02:28:08AM -0700, Andy Lutomirski wrote:
> On Thu, Aug 25, 2016 at 8:21 AM, Dmitry Safonov <dsafonov@xxxxxxxxxxxxx> wrote:
> > I added here a new in-kernel fs with ramfs-like options.
> > Created vdso file in this fs (yet for testing, only 64-bit vdso).
> > Mapped this file to process's mm on setup_additional_pages.
> > Just for testing purpose it's done only for specific UID.
>
> I'm wondering whether all this code could be easily moved into the
> core special mapping helpers so that all special mappings get the same
> benefit. We could embed a struct file * (or struct inode or whatever)
> in special_mapping if needed.
>
> Also, could this be simplified to use anon_inode?
Please, don't. anon_inode is for situations when you don't mind sharing
the _same_ inode for different things. This one very clearly isn't that.