From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753972AbcICAIH (ORCPT ); Fri, 2 Sep 2016 20:08:07 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:35340 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592AbcICAIG (ORCPT ); Fri, 2 Sep 2016 20:08:06 -0400 Date: Sat, 3 Sep 2016 01:08:01 +0100 From: Al Viro To: Andy Lutomirski Cc: Dmitry Safonov , "linux-kernel@vger.kernel.org" , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , X86 ML , Dmitry Safonov <0x7f454c46@gmail.com>, Oleg Nesterov , Steven Rostedt Subject: Re: [RFC 1/3] x86/vdso: create vdso file, use it for mapping Message-ID: <20160903000800.GY2356@ZenIV.linux.org.uk> References: <20160825152110.25663-1-dsafonov@virtuozzo.com> <20160825152110.25663-2-dsafonov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 29, 2016 at 02:28:08AM -0700, Andy Lutomirski wrote: > On Thu, Aug 25, 2016 at 8:21 AM, Dmitry Safonov 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.